Skip to main content

anchor_txt: attributes in markdown

anchor_txt adds the ability to embed attributes in markdown files so that external tools can more easily link them to eachother and code, as well as perform other operations.

Use anchor_txt.Section.from_md_path to load a markdown file.

# Markdown Syntax The syntax for anchor_txt attributes is simple.

  • Headers of the form # header {#anchor} will have the anchor tag extracted and available in Header.anchor

  • A header creates a Section, which can have sub sections.

  • Sections have attributes, which are embedded yaml either inline or in fenced code blocks, shown below.

An inline attribute looks like one of these: ` `@{foo}` `@{bar: 2}` `

Fenced code block attributes look like below. They must include the identifier yaml (or json) and end with a @

`yaml @ foo: None bar: 2 `

Attributes blocks within a Section are combined through the same process as dict.update, except overlapping keys throw an error.

# Developer Run make init to create the necessary virtualenv

Run make test for basic tests or make check for lints and formatting.

# License

The source code is Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Metadata

Release files for anchor-txt 0.1.4

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

Source distribution (sdist)

Source distribution for anchor-txt 0.1.4
File Size Uploaded Provenance
anchor_txt-0.1.4.tar.gz 7.0 kB Without provenance Details

Release files / anchor_txt-0.1.4.tar.gz

Download URL anchor_txt-0.1.4.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9b0788988483468e580bc4e2d06fdfbf0d3d19de693b448874473ff557f03b00
BLAKE2b-256 checksum
How to use checksums
afcaeb50b8c689099b8582052a5dc9177962d699094875f5bcf907ef3bf42320
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5

Security for anchor-txt 0.1.4

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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