Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
f66fc3b6
Commit
f66fc3b6
authored
Jun 28, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-openalex' into dev
parents
95e4bc90
5638ff2b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Types.purs
...text/Components/Forest/Tree/Node/Action/Search/Types.purs
+6
-0
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Search/Types.purs
View file @
f66fc3b6
...
...
@@ -102,6 +102,7 @@ datafield2database _ = Empty
data Database = All_Databases
| Empty
| OpenAlex
| PubMed
| Arxiv
| HAL (Maybe Org)
...
...
@@ -116,6 +117,7 @@ derive instance Generic Database _
-- derive instance BoundedEnum Database
instance Show Database where
show All_Databases = "All Databases"
show OpenAlex = "OpenAlex"
show PubMed = "PubMed"
show Arxiv = "Arxiv"
show (HAL _) = "HAL"
...
...
@@ -128,6 +130,7 @@ instance Show Database where
instance Doc Database where
doc All_Databases = "All databases"
doc OpenAlex = "OpenAlex db"
doc PubMed = "All Medical publications"
doc Arxiv = "Arxiv"
doc (HAL _) = "All open science (archives ouvertes)"
...
...
@@ -158,6 +161,7 @@ instance JSON.WriteForeign Database where
allDatabases :: Array Database
allDatabases = [ Empty
, OpenAlex
, PubMed
-- , Arxiv
, HAL Nothing
...
...
@@ -171,6 +175,7 @@ allDatabases = [ Empty
dbToInputValue :: Database -> String
dbToInputValue All_Databases = "all_databases"
dbToInputValue OpenAlex = "openalex"
dbToInputValue PubMed = "pubmed"
dbToInputValue Arxiv = "arxiv"
dbToInputValue (HAL _) = "hal"
...
...
@@ -181,6 +186,7 @@ dbToInputValue Empty = "empty"
dbFromInputValue :: String -> Maybe Database
dbFromInputValue "all_databases" = Just All_Databases
dbFromInputValue "openalex" = Just OpenAlex
dbFromInputValue "pubmed" = Just PubMed
dbFromInputValue "arxiv" = Just Arxiv
dbFromInputValue "hal" = Just (HAL Nothing)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment