Skip to content

OpenPecha/pecha_uploader

Repository files navigation

README

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.)


OpenPecha

Pecha Uploader

Owner(s)

Table of contents

Project descriptionWho this project is forProject dependenciesInstructions for useContributing guidelinesAdditional documentationHow to get helpTerms of use


Project description

This package is used for uploading Pechas(JSON format) to pecha.org via Sefaria platform.

Who this project is for

This project is intended for Data Engineers who wants to upload pechas to our pecha.org website.

Project dependencies

Before using Project Name, ensure you have:

  • python version 3.8 >=
  • Network Connection
  • PECHA_API_KEY(ask from owner)

Instructions for use

Install

pip install git+https://github.com/OpenPecha/pecha_uploader.git

Run

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)

Overwrite Run

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)

Troubleshoot

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.

  1. success.txt : This file contains the list of pechas that are successfully uploaded.
  2. errors.txt : This file contains the list of pechas that are failed to upload with error description.
  3. error_ids.txt: This file contains the list of pechas that are failed to upload with pecha id.

Contributing guidelines

If you'd like to help out, check out our contributing guidelines.

Additional documentation

Include links and brief descriptions to additional documentation.

For more information:

How to get help

  • File an issue.
  • Email us at openpecha[at]gmail.com.
  • Join our discord.

Terms of use

Project Name is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages