Commit e7e6adee authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[arxiv] more work on arxiv code

parent 8c18bf76
...@@ -95,7 +95,6 @@ library ...@@ -95,7 +95,6 @@ library
Gargantext.Core.Viz.Phylo.SynchronicClustering Gargantext.Core.Viz.Phylo.SynchronicClustering
Gargantext.Core.Viz.Types Gargantext.Core.Viz.Types
other-modules: other-modules:
ConcurrentTest
Gargantext.API.Admin.Auth Gargantext.API.Admin.Auth
Gargantext.API.Admin.FrontEnd Gargantext.API.Admin.FrontEnd
Gargantext.API.Admin.Orchestrator Gargantext.API.Admin.Orchestrator
......
...@@ -42,19 +42,20 @@ get la q l = do ...@@ -42,19 +42,20 @@ get la q l = do
toDoc :: Lang -> Arxiv.Result -> HyperdataDocument toDoc :: Lang -> Arxiv.Result -> HyperdataDocument
toDoc l (Arxiv.Result { abstract toDoc l (Arxiv.Result { abstract
, authors = aus , authors = aus
, categories --, categories
, doi , doi
, id
, journal , journal
, primaryCategory --, primaryCategory
, publication_date , publication_date
, title , title
, total --, total
, url , url
, year } , year }
) = HyperdataDocument { _hd_bdd = Just "Arxiv" ) = HyperdataDocument { _hd_bdd = Just "Arxiv"
, _hd_doi = Nothing , _hd_doi = Just $ Text.pack doi
, _hd_url = Nothing , _hd_url = Just $ Text.pack url
, _hd_uniqId = Just $ Text.pack doi , _hd_uniqId = Just $ Text.pack id
, _hd_uniqIdBdd = Nothing , _hd_uniqIdBdd = Nothing
, _hd_page = Nothing , _hd_page = Nothing
, _hd_title = Just $ Text.pack title , _hd_title = Just $ Text.pack title
...@@ -73,13 +74,13 @@ toDoc l (Arxiv.Result { abstract ...@@ -73,13 +74,13 @@ toDoc l (Arxiv.Result { abstract
where where
authors :: [Ax.Author] -> Maybe Text authors :: [Ax.Author] -> Maybe Text
authors [] = Nothing authors [] = Nothing
authors aus = Just $ (Text.intercalate ", ") authors aus' = Just $ (Text.intercalate ", ")
$ map Text.pack $ map Text.pack
$ map Ax.auName aus $ map Ax.auName aus'
institutes :: [Ax.Author] -> Maybe Text institutes :: [Ax.Author] -> Maybe Text
institutes [] = Nothing institutes [] = Nothing
institutes aus = Just $ (Text.intercalate ", ") institutes aus' = Just $ (Text.intercalate ", ")
$ (map (Text.replace ", " " - ")) $ (map (Text.replace ", " " - "))
$ map Text.pack $ map Text.pack
$ map Ax.auFil aus $ map Ax.auFil aus'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment