Skip to main content

Celes 0.1 — a tag-based markup language toolkit

Project description

Celes 0.1

A tag-based markup language and toolkit. Write documents in Celes, convert to HTML, validate, or round-trip with Markdown.

Install

pip install celes

CLI Usage

# Convert a Celes file to HTML
celes parse doc.celes doc.html

# Validate a Celes file
celes validate doc.celes

# Convert Markdown to Celes
celes md README.md README.celes

# Convert Celes to Markdown
celes tomd doc.celes doc.md

Python API

from celes import parse_celes, validate_celes, convert_md_to_celes, convert_celes_to_md

# Parse to HTML
html = parse_celes(source)

# Validate
is_valid, errors = validate_celes(source)
for e in errors:
    print(e)  # "  ✗ Line 3: <header> is missing required -size attribute"

# Convert
celes_source = convert_md_to_celes(markdown_source)
markdown_source = convert_celes_to_md(celes_source)

Celes Syntax (0.1)

<!Celes-0.1>
; This is a comment
<title>{My Page}
<header -size=1>{Hello, World!}
<line>{This is <bold>{bold} and <italic>{italic} text.}
<list -bullet=circle>{Item one}<sublist -bullet=circle>{Sub-item}
<list -bullet=number>{Numbered item}
<table>{Name, Age}
<item>{Alice, 30}
<codeblock>{print("hello")}
<image>{photo.png}
<linkimage -image=photo.png>{https://example.com}
<blockquote>{A quote <nestquote>{nested}}
<line -align=center>{Centered}
<newline>
<pagebreak>
<insertspace>
<empty>{<raw> text with <angle> brackets}

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

celes-0.1.3.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

celes-0.1.3-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file celes-0.1.3.tar.gz.

File metadata

  • Download URL: celes-0.1.3.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for celes-0.1.3.tar.gz
Algorithm Hash digest
SHA256 38aa796ae77c9874d63f4dab2c655ca45863198263136db4c8ca77a521f82285
MD5 fd3e991c280451a0e2f06d158d5097fe
BLAKE2b-256 43b52f765da1f42ba8f4040a72936c23efbdfa6adb1cfe58f5c511b5d51decb1

See more details on using hashes here.

File details

Details for the file celes-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: celes-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for celes-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d6371dd2e87c205c3e26092d93d8bb119bf14c5cd428dfd00937f19f8cb00897
MD5 6fc10b75485bd34244f8156682395a9e
BLAKE2b-256 e7e41356a6c4658acb03d962243b5746fcd399bcf17a7e7021e1e2c2468cb823

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