Skip to main content

pslmw-md-workers is a python tool for creating a `TOC` content from the .md file inside of it, using CLI.

Project description

pslmw-md-workers

pslmw-md-workers is a python tool for creating a Table of Contents TOC from a directory with a simple execution.

Installation

To install and use md-worker, follow these steps:

  1. Clone the repository:
git clone https://github.com/porsilasmoscasweb/pslmw-md-workers.git
  1. Go to the project folder:
cd md-worker
  1. Use the helper to now better what args do you will use:
python3 main.py -h 
# Output

usage: main.py [-h] [-t] [-i [IGNORE ...]] [-otf OUTPUT_TOC_FILENAME] [-o [OUTPUT_DIR ...]] root_dir

Generate TOC for Markdown files.

positional arguments:
  root_dir              Root path

options:
  -h, --help            show this help message and exit
  -t, --toc             To generate TOC.
  -i [IGNORE ...], --ignore [IGNORE ...]
                        List of directories (without absolute path) to ignore (separated by spaces).
  -otf OUTPUT_TOC_FILENAME, --output_toc_filename OUTPUT_TOC_FILENAME
                        Name of the output file (No extension). By default: 'TOC'
  -o [OUTPUT_DIR ...], --output_dir [OUTPUT_DIR ...]
                        Generates a copy of all files to an specified destination path or the default path '_output' and works on this directory.
  1. The output from the command will be:
python3 main.py [-t | --toc]

TESTING

You can run tests to see if everything it is working properly.

To do it, follow these steps:

  1. Install dependencies:
pip install -r requirements_test.txt
  1. Use pytest to run the test
pytest  test/test_args.py [-v -vv]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pslmw_md_workers-1.0.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pslmw_md_workers-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pslmw_md_workers-1.0.0.tar.gz.

File metadata

  • Download URL: pslmw_md_workers-1.0.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for pslmw_md_workers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ef5759e4d1f86e565fde087dd88c57bca9add322651405207745bc39afe69b5a
MD5 5e4e5dc3ab8cde3981ec720c772146fe
BLAKE2b-256 80f852477c36d30606ff53cca29071f025a3d03953b2e54144797a3cc67d0d62

See more details on using hashes here.

File details

Details for the file pslmw_md_workers-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pslmw_md_workers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 510a807e23b62575cb66130a7916235f04b546e690795880d088411a0bad131f
MD5 baeb19db2d4974cf24dcd62fa45d8fdf
BLAKE2b-256 d79072760f60dad52ba992a2e6df155346cac6b0f28193767b35cbe09f5bd255

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page