|
|
## How Can I Create a Data Package from Existing CSV Data?
|
|
|
If you are comfortable working with JSON and CSV you can create your own package to import. Quotemarks supports a variation of the [Tabular Data Package format](About-the-Backup-Format) which is essentially a folder with some CSV files containing your data and an index that glues it together.
|
|
|
If you are comfortable working with JSON and CSV you can create your own package to import. Quotemarks supports a variation of the [Tabular Data Package format](About-the-Backup-Format) which is essentially a folder with some CSV files containing your data and an index that glues it all together.
|
|
|
|
|
|
We recommend that you back up any existing data you have in the app first, and then start with a fresh app install.
|
|
|
|
|
|
1. Create a new folder and rename it to add `.tabular` after the folder name.
|
|
|
2. Inside this folder create a new file called `datapackage.json`. This file describes where to find your CSV, the format of the data (called a "schema"), and how its encoded (the CSV "dialect"). Save the following json in this file:
|
|
|
1. Create a new folder and rename it to add `.tabular` at the end of the folder name.
|
|
|
2. Inside this folder create a new file called `datapackage.json` using a plain text editor. This file describes where to find your CSV, the format of the data (called a "schema"), and how its encoded (the CSV "dialect"). Save the following text in this file:
|
|
|
```
|
|
|
{
|
|
|
"resources" : [
|
... | ... | @@ -82,5 +82,5 @@ We recommend that you back up any existing data you have in the app first, and t |
|
|
"profile" : "tabular-data-package"
|
|
|
}
|
|
|
```
|
|
|
3. Inside the same folder, save a CSV file called `quotation.csv` with your quotations including this header as the first line: `"_id","quote","note","source","author","dateAdded","tags","events"`. In each row leave the fields "_id", "tags", and "events" blank although all of these fields can be blank. Order matters. A spreadsheet editor may help you here.
|
|
|
3. Inside the same folder, save a CSV file called `quotation.csv` with your quotations including this header as the first line: `"_id","quote","note","source","author","dateAdded","tags","events"`. In each row leave the fields `_id`, `tags`, and `events` blank. Order matters. A spreadsheet editor may help you here.
|
|
|
4. If necessary, update the `dialect` object in to reflect the formatting of your CSV file. See [CSV Dialect](https://frictionlessdata.io/specs/csv-dialect/#specification) for more about this. |
|
|
\ No newline at end of file |