Crates.io | pukram2html |
lib.rs | pukram2html |
version | 0.1.1 |
source | src |
created_at | 2024-09-21 11:55:11.522584 |
updated_at | 2024-09-21 11:55:11.522584 |
description | A Rust library for converting Pukram-formatted text to HTML. |
homepage | https://gitlab.com/porky11/pukram2html |
repository | https://gitlab.com/porky11/pukram2html |
max_upload_size | |
id | 1382153 |
size | 22,690 |
The pukram2html
library is a Rust library that converts text written in the Pukram markup language to HTML. Pukram is a simple and intuitive markup language inspired by Markdown, designed for easy formatting of text content. The library is primarily targeted at developers building web servers who need to convert Pukram-formatted text into HTML for displaying on websites. Additionally, it can be used to convert Pukram text files to HTML, which can then be further converted to PDF using other tools.
Pukram is a lightweight markup language that supports basic formatting and structural elements. Here are the key features of Pukram:
Headers in Pukram are created by starting a line with one or more #
characters. The number of #
determines the header level (e.g., #
for <h1>
, ##
for <h2>
, etc.).
Lists in Pukram are created by starting a line with -
for unordered lists or +
for special list elements. Lists can be nested by increasing the indentation level.
List elements starting with +
can have special behavior defined for them, such as inserting links, images, or audio files.
Pukram supports the following formatting markups:
*
characters (e.g., *bold*
)./
characters (e.g., /italic/
).`
characters (e.g., `mono`
).^
characters (e.g., ^superscript^
).|
characters (e.g., |subscript|
).^|
and |^
delimiters (e.g., ^|small|^
)._
characters (e.g., _underscore_
).~
characters (e.g., ~strikethrough~
).Note that formatting is reset at the end of each line, so you can apply formatting to an entire line without needing closing delimiters.
The pukram2html
library consists of several components that work together to convert Pukram text to HTML:
TextInfo
struct: Holds information about the converted text, such as the number of lines, words, and characters.convert
function: The main entry point for converting Pukram text to HTML.convert_subheader
function: Converts Pukram text to HTML with subheaders.convert_extended
function: Converts Pukram text to HTML with extended settings.Settings
struct: Holds configuration settings for the conversion process.FormattingExtensions
trait: Provides methods for handling formatting markups.The API reference documentation provides detailed information about each module, struct, trait, and function in the pukram2html
library, including their parameters, return values, and behavior. Consult the API reference for a comprehensive understanding of the library's components and how to use them effectively.
If you encounter any issues while using the pukram2html
library, refer to the troubleshooting section for common problems and their solutions. The FAQs section addresses frequently asked questions and provides additional guidance on using the library.
If you still have questions or need further assistance, don't hesitate to reach out to the library's maintainers or the Rust community for support.