Skip to content

Commit

Permalink
docs(import): add CLI usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed May 16, 2019
1 parent 9d2dd3e commit 41bd073
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ A digital representation of Sikh Bani and other Panthic texts with a public logb
- [Build](#build)
- [Database](#database)
- [JSON](#json)
- [Import](#import)
- [Contributing](#contributing)
- [Folder structure](#folder-structure)
- [Releases](#releases)
Expand Down Expand Up @@ -94,6 +95,22 @@ It is best practice to build the database, make changes to `database.sqlite`, an

**Docker** - `docker-compose up build-json`

## Import

The import CLI can be used to automate the import of new data, allocating new IDs to Shabads and Lines.

It will generate placeholder Sources, Translation Sources, and fill in `-1` for Shabad sections and Writer IDs.

Once the script has completed, these must all be corrected in `build/database.sqlite`. After this, run `npm run build-json`, followed by `npm run build-sqlite`, to generate all the corrected field changes and verify the import was succesful.

Run `npm run import -- --help` to see all options.

E.g.

```bash
npm run import -- nandlal.sqlite nandlal -o ID -s ShabadID -2 ShabadID -S SourceID -t English -t Punjabi -p PageNo -l LineNo -g Gurmukhi
```

# Contributing

By making a pull request of changes to the `data` folder, others can submit spelling mistakes, grammar errors, and translation improvements. Format for errors should follow the guideline for git commits:
Expand Down

0 comments on commit 41bd073

Please sign in to comment.