Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
text-to-html-converter
Advanced tools
A conversion tool made for converting .txt and .md files to standard HTML.
The main purpose of this program is to create TIL (Today I learned) HTML files for blogging and personal purposes. A TIL can be pretty useful to anyone creating one as they can write down important things that they learned about and share it with others, or just keep it for themselves as something to reference. However, you can also use it as a simple .txt or .md to HTML converter. For setup look at the setup section in the CONTRIBUTING.md file.
<code>
tag.<strong>
tag.<hr>
tag.Argument | Purpose |
---|---|
-s, --stylesheet | Changes the default CSS stylesheet provided for the generated files |
-l, --lang | Specifies language used when generating HTML files. If not used, the default will be en-CA |
-c, --config | Allows for multiple arguments to be used at once, without having to type it all into a CLI |
-o, --output | Specifies a different output directory for the generated HTML files, instead of the default TIL directory |
-sb, --sidebar | Currently in preview, but generates a table of contents for you based on the already provided sidebar.py file |
-v, --version | Displays program name and current versions |
-h, --help | Provides help on the CLI explaining arguments and shows an example of execution |
Customizing the Stylesheet
python txt_to_html.py -s https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css filename.txt
or python txt_to_html.py --stylesheet https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css filename.txt
Changing the output directory
python txt_to_html.py -o .\foldername filename.txt
or python txt_to_html.py --output .\foldername filename.txt
Using a TOML config file
python txt_to_html.py -c filename.toml
or python txt_to_html.py --config filename.toml
Generating a table of contents (sidebar)
python txt_to_html.py -sb sidebar.py filename.txt
or python txt_to_html.py --sidebar sidebar.py filename.txt
Changing the lang attribute
python txt_to_html -l fr filename.txt
or python txt_to_html --lang fr filename.txt
All the examples above can be used together on the CLI or in a TOML config file.
Checking the version of TXT to HTML Converter
python txt_to_html.py -v
or python txt_to_html.py --version
Getting help for TXT to HTML Converter
python txt_to_html.py -h
or python txt_to_html.py --help
Example output of the program can be found in the examples folder.
FAQs
A package that allows for txt and md conversion to HTML files.
We found that text-to-html-converter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.