https://github.com/jwhittle933/text_seeder
Text Seeder for MT and LXX Texts
https://github.com/jwhittle933/text_seeder
Last synced: about 2 months ago
JSON representation
Text Seeder for MT and LXX Texts
- Host: GitHub
- URL: https://github.com/jwhittle933/text_seeder
- Owner: jwhittle933
- Created: 2020-10-26T00:47:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-26T00:48:47.000Z (over 4 years ago)
- Last Synced: 2025-02-02T18:33:07.815Z (4 months ago)
- Language: Python
- Size: 8.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Text Parser + CouchDB Inserts
This module parses the texts contained in [starter](./starter) and inserts them into CouchDB as a document. The scripts in this directory will only work in the virtual environment, which uses [pipenv](https://pypi.org/project/pipenv/). To start the environment, run `pipenv shell`. Without this, several dependencies will throw errors unless you have them installed globally. To exit the shell, type `exit`. If a new dependency is needed, run `pipenv install `, which will add it to your Pipfile.Example execution for directory:
```bash
python3 seed_text.py \
--dir ./starter/mt/Tanach_vow \
--write --insert
```The script also handles single files:
```bash
python3 seed_text.py \
--file ./starter/mt/Tanach_vow.Joshua.txt \
--write --insert
```### Flags
`--dir` - Select the directory that contains valid file. Overridden by `--file`
`--file` - Select the file to parse. Overrides `--dir`
`--pattern` - Filename pattern to search. Use with `--dir`. Defaults to `*.txt*`
`--insert` - Bool flag that triggers a database insert.
`--write` - Bool flag that writes triggers json file creation