[tsv] tsvv4 first draft

parent f0d581ec
Pipeline #7993 passed with stages
in 24 minutes and 47 seconds
......@@ -172,21 +172,24 @@ actionDownloadNodeListCpt = here.component "actionDownloadNodeList" cpt
info :: NodeListDownloadFormat -> String
info t = "Info about the Documents as " <> show t <> " format"
data NodeTextsDownloadFormat = NT_TSV | NT_JSON | NT_JSON_ZIP
data NodeTextsDownloadFormat = NT_TSV4 | NT_TSV | NT_JSON | NT_JSON_ZIP
derive instance Eq NodeTextsDownloadFormat
derive instance Generic NodeTextsDownloadFormat _
instance Show NodeTextsDownloadFormat where
show NT_TSV4 = "TSV v4"
show NT_TSV = "TSV"
show NT_JSON = "JSON"
show NT_JSON_ZIP = "JSON (zipped)"
urlNodeTextsDownloadFormat :: NodeTextsDownloadFormat -> String
urlNodeTextsDownloadFormat NT_TSV4 = "tsvv4"
urlNodeTextsDownloadFormat NT_TSV = "tsv"
urlNodeTextsDownloadFormat NT_JSON = "json"
urlNodeTextsDownloadFormat NT_JSON_ZIP = "json.zip"
readNodeTextsDownloadFormat :: String -> NodeTextsDownloadFormat
readNodeTextsDownloadFormat "TSV v4" = NT_TSV4
readNodeTextsDownloadFormat "TSV" = NT_TSV
readNodeTextsDownloadFormat "JSON" = NT_JSON
readNodeTextsDownloadFormat "JSON (zippped)" = NT_JSON_ZIP
......@@ -214,7 +217,8 @@ actionDownloadNodeTextsCpt = here.component "actionDownloadNodeTexts" cpt
, defaultValue: show downloadFormat'
, on: { change: onChange downloadFormat }
}
[ opt NT_TSV
[ opt NT_TSV4
, opt NT_TSV
, opt NT_JSON
, opt NT_JSON_ZIP
]
......
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