FerdiantJoshua / LiturgiToEwsFormatConverter

A church liturgy format converter from PDF to TXT. This app extracts texts from .pdf files, clean them, and reformat them to be used (copy-pasted) to EasyWorship 5.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Liturgi PDF to EasyWorship-ready Format Converter

Requirements

  1. Python 3.6

  2. Packages

    pip install -r requirements.txt    

GUI Mode

  1. Double click the main.py, or run this command in terminal:

    python main.py
  2. Follow the navigation in the GUI: load a PDF file, convert it, then copy to clipboard

API Mode

  1. Copy .env.example, rename it to .env

  2. Run this command in terminal:

    • Production

      python api_entrypoint.py
    • Development

      uvicorn api_entrypoint:liturgi_format_converter_api --host=0.0.0.0 --port=1234 --reload
  3. Access the webpage from http://HOST:PORT. By default it's http://localhost:1234

CLI Mode

Run Script

  1. Put liturgi files (.pdf only) inside input/

  2. Open the .bat files (run_convert.bat or run_convert_short.bat or run_convert_long.bat)
    As this script automatically separate too long lines into several lines. run_convert_short.bat will separate the too-long-line into shorter lines, so is its long-version (run_convert_long.bat).

    OR run this command in terminal:

    python parse_pdf.py
  3. Resulting files will be inside output/

More Usage

Run this command in terminal:

python parse_pdf.py -h

This will show all available arguments:

usage: parse_pdf.py [-h] [-id INPUT_DIR] [-od OUTPUT_DIR] [-d]
                    [-m MAX_CHAR_PER_LINE]

optional arguments:
  -h, --help            show this help message and exit
  -id INPUT_DIR, --input_dir INPUT_DIR
  -od OUTPUT_DIR, --output_dir OUTPUT_DIR
  -d, --debug
  -m MAX_CHAR_PER_LINE, --max_char_per_line MAX_CHAR_PER_LINE

Author

Ferdiant Joshua Muis

About

A church liturgy format converter from PDF to TXT. This app extracts texts from .pdf files, clean them, and reformat them to be used (copy-pasted) to EasyWorship 5.


Languages

Language:Python 61.8%Language:HTML 22.3%Language:JavaScript 12.6%Language:CSS 3.1%Language:Batchfile 0.2%