Skip to main content

A python package to create markdown text.

Project description

PyPI - Version GitHub License PyPI - Downloads Publish PyPi CI

pymarkdownroh

The pymarkdownroh package contains python modules to create markdown text from python scripts.

Table of Contents

  1. Introduction
  2. Getting started
    1. Prerequisites
    2. Installation
  3. How to use
    1. How to import
    2. Using the module
  4. Releasing
  5. License

Introduction

This package contains different modules which enable users to write markdown text via python objects. It implements all aspects of the official Markdown Documentation.

The intention of this package is to automatically write markdown files using scripts with templates.

Now it supports extended functionality like tables which are often used in github flavored markdown.

Getting started

Prerequisites

  • Python installed
  • Operatingsystem: Linux or Windows, not tested on mac
  • IDE like VS Code, if you want to contribute or change the code

Installation

There are two ways to install this module depending on the way you work and the preinstalled modules:

  1. pip install pymarkdownroh
  2. python -m pip install pymarkdownroh

How to use

How to import

You can import the module in two ways:

    import pymarkdownroh

This will import all functions. Even the ones that are not supposed to be used (helper functions).

    from pymarkdownroh import *

This will import only the significant functions, meant for using.

Using the module

Example 1:

# Import all modules from package.
from pymarkdownroh import *

print(create_headline(1, "Document Title"))

# Output:
# 
# "# Document Title"
# Import all modules from package.
from pymarkdownroh import *

l = ["Apples", "Bananas", "Cherries"]

print(create_list(l, True, True))

# Output:
#
# 1. [] Apples
# 2. [] Bananas
# 3. [] Cherries
from pymarkdownroh import create_table

table = create_table(
    ["Name", "Age"],
    [["Alice", "23"], ["Bob", "30"]],
    alignments=["left", "right"],
)
print(table)

# Output:
#
# | Name  | Age |
# | :---- | --: |
# | Alice |  23 |
# | Bob   |  30 |

Releasing

Releases are published automatically when a tag is pushed to GitHub.

# Create release variable.
$Release = "x.x.x"
# Create commit.
git commit --allow-empty -m "Release $Release"
# Create tag.
git tag -a $Release -m "Version $Release"
# Push from original.
git push origin --tags
# Push from fork.
git push upstream --tags

License

MIT

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

pymarkdownroh-0.0.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

pymarkdownroh-0.0.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pymarkdownroh-0.0.2.tar.gz.

File metadata

  • Download URL: pymarkdownroh-0.0.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pymarkdownroh-0.0.2.tar.gz
Algorithm Hash digest
SHA256 84546bf7a04672f7a6649b665106be092cd17ff9ce12bed59bffa405113b18b9
MD5 c328df9cc88969ec231f5b57c1ed7ce2
BLAKE2b-256 d1bc9386555a7ee9d9bf60a0a42835b703a7c442d8f9b903e20e78407a141902

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymarkdownroh-0.0.2.tar.gz:

Publisher: release.yaml on IT-Administrators/pymarkdownroh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymarkdownroh-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pymarkdownroh-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pymarkdownroh-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0c901042e343e2e098c0b1e18362324a4b306d2006b4b1fd6634b98d3e11a43
MD5 d58069c3522f6d5ed169d483dffbb8b3
BLAKE2b-256 0e837bd601b5721e6aea19e711d214b7676671c4a3aee33f26dcc57c7331f5fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymarkdownroh-0.0.2-py3-none-any.whl:

Publisher: release.yaml on IT-Administrators/pymarkdownroh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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