Note: This readme template is based on one from the Good Docs Project. You can find it and a guide to filling it out here. (Erase this note after filling out the readme.)
Project description • Who this project is for • Project dependencies • Instructions for use • Contributing guidelines • Additional documentation • How to get help • Terms of use
This package is used for uploading Pechas(JSON format) to pecha.org via Sefaria platform.
This project is intended for Data Engineers who wants to upload pechas to our pecha.org website.
Before using Project Name, ensure you have:
- python version 3.8 >=
- Network Connection
- PECHA_API_KEY(ask from owner)
pip install git+https://github.com/OpenPecha/pecha_uploader.git
from pathlib import Path
from pecha_uploader.pipeline import upload_root, upload_commentary
root_pecha_path = Path("path/to/root/pecha")
upload_root(root_pecha_path)
commentary_pecha_path = Path("path/to/commentary/pecha")
upload_commentary(commentary_pecha_path)
from pathlib import Path
from pecha_uploader.pipeline import upload_root, upload_commentary
root_pecha_path = Path("path/to/root/pecha")
upload_root(root_pecha_path, overwrite=True)
commentary_pecha_path = Path("path/to/commentary/pecha")
upload_commentary(commentary_pecha_path, overwrite=True)
In your home directory, there would be a folder named .pecha_uploader
.And regarding when uploading
the pechas.If you go inside inner folder called texts
.There would be three .txt files.
success.txt
: This file contains the list of pechas that are successfully uploaded.errors.txt
: This file contains the list of pechas that are failed to upload with error description.error_ids.txt
: This file contains the list of pechas that are failed to upload with pecha id.
If you'd like to help out, check out our contributing guidelines.
Include links and brief descriptions to additional documentation.
For more information:
- File an issue.
- Email us at openpecha[at]gmail.com.
- Join our discord.
Project Name is licensed under the MIT License.