Skip to content

Commit 60a9f2f

Browse files
committed
consistent abbreviation (CSV, TSV)
1 parent ce20fc4 commit 60a9f2f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

trove/render/html_browse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
mediatypes.JSONLD,
3030
# TODO: below are only for search/index-card views
3131
mediatypes.JSON,
32-
mediatypes.TAB_SEPARATED_VALUES,
33-
mediatypes.COMMA_SEPARATED_VALUES,
32+
mediatypes.TSV,
33+
mediatypes.CSV,
3434
)
3535

3636

trove/render/simple_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77

88
class TrovesearchSimpleCsvRenderer(TrovesearchSimpleTsvRenderer):
9-
MEDIATYPE = mediatypes.COMMA_SEPARATED_VALUES
9+
MEDIATYPE = mediatypes.CSV
1010
CSV_DIALECT = csv.excel

trove/render/simple_tsv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
class TrovesearchSimpleTsvRenderer(SimpleTrovesearchRenderer):
21-
MEDIATYPE = mediatypes.TAB_SEPARATED_VALUES
21+
MEDIATYPE = mediatypes.TSV
2222
INDEXCARD_DERIVER_IRI = TROVE['derive/osfmap_json']
2323
CSV_DIALECT: type[csv.Dialect] = csv.excel_tab
2424

trove/vocab/mediatypes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
JSONLD = 'application/ld+json'
44
TURTLE = 'text/turtle'
55
HTML = 'text/html'
6-
TAB_SEPARATED_VALUES = 'text/tab-separated-values'
7-
COMMA_SEPARATED_VALUES = 'text/csv'
6+
TSV = 'text/tab-separated-values'
7+
CSV = 'text/csv'
88

99

1010
_file_extensions = {
@@ -13,8 +13,8 @@
1313
JSONLD: '.json',
1414
TURTLE: '.turtle',
1515
HTML: '.html',
16-
TAB_SEPARATED_VALUES: '.tsv',
17-
COMMA_SEPARATED_VALUES: '.csv',
16+
TSV: '.tsv',
17+
CSV: '.csv',
1818
}
1919

2020

0 commit comments

Comments
 (0)