Current format version: 2.0
You can import CSV (comma-separated values) and TSV (tab-separated values) files onto tagtog ๐ป. This also means, you can easily import any excel sheet onto tagtog ๐.
How itโs parsed
An imported file is parsed as follows:
-
The first row is considered the header. Each column represents a section in tagtog, and the header gives the title for each.
Optionally, if the first row starts with the character
#
, then no titles will be created. Please note that still the first row (the header) must exist. -
Each subsequent row represents a document. Each column represents a paragraph in a section in tagtog, whose header is given by the corresponding header column.
Content rows with a different number of columns than the headerโs are allowed. In case the row has less columns, everything remains equal. If the row has more columns than the headerโs, then a stub title for the column section is created with the pattern:
"Column-#{columnNumber}"
. Of course, if no titles header was chosen, then no titles will be added in the documents.
โ๏ธ Note: the imported file must have at least 2 rows: 1 for the header and the other for the first document. Each subsequent row is another document.
โ๏ธ Note: double quotes, commas, tabs, and even new lines are accepted. This means that CSV/TSV files exported from spreadsheets applications are accepted. Special characters (e.g. newlines) are accepted as long as they are wrapped in double quotes. If we want to import the double quote character itself when the text is already quoted, then the quote has to be doubled, like in this example:
"this is one cell value with comma (,), new lines
and ""double quote""
inside"
Example
How the parsing works is best explained with an example ๐. Say you start with an Excel file (or numbers file on macOS) like the following:
You can save the file as CSV:
The file will look like this in a text editor:
Uploading that CSV file, will result in 6 documents on tagtog:
And, for example, the first document (the last on the list) will look like this:
Note that the headers are in bold, and the paragraphs are in regular font.
Also note how the upload preserves new lines, commas, and quotes from the original spreadsheet source.