Skip to main content

pipe2codeblock

Pipe text into a code block in a markdown file.

Originally designed for putting a terminal command's --help text into a README.md.

Usage

Put a fenced codeblock in your target file with the info string help.

The fenced codeblock is defined as it is by CommonMark, with the exception that it cannot be indented (to prevent spaces being lstripped inside the block).

Then do

your_awesome_tool --help | p2c README.md

to pipe the text in, or

p2c README.md input_file.txt

to read from a file.

The --tgt option allows you to choose which info string to target (instead of "help"). Only the first instance will be used.

Usage

usage: p2c [-h] [--tgt TGT] outfile [infile]

Pipe text into a code block in a markdown file.

positional arguments:
  outfile
  infile

optional arguments:
  -h, --help  show this help message and exit
  --tgt TGT   Target a code block with a different info string (default
              'help')

Generated by dogfooding: p2c --help | p2c README.md

Metadata

Release files for pipe2codeblock 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipe2codeblock 1.0.0
File Size Uploaded Provenance
pipe2codeblock-1.0.0.tar.gz 2.6 kB Without provenance Details

Release files / pipe2codeblock-1.0.0.tar.gz

Download URL pipe2codeblock-1.0.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b7795ac21d61b6d2f0520d8699baa9b4d19d84612e0926678cff97af5f9bfbfd
BLAKE2b-256 checksum
How to use checksums
4e6998f167113bd954f0b99568ddf92a7be927f775ef7883146fde1440430dfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Security for pipe2codeblock 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page