A simple markdown to HTML compiler
Project description
Markapp
Literate Markdown for Apps™
This project helps generates index.html
, style.css
, and script.js
from code blocks in Markdown files.
Generative AI is all the rage, but it can be cumbersome to try out code that it generates. This script allows us to manages notes and code snippets in a single file and break them up into multiple files for easy web serving.
Example Usage
pip install markapp
# Get list of options
markapp --help
# Usage: markapp [OPTIONS] SRC
#
# Compile markdown files into HTML
#
# Options:
# --output-dir TEXT Output directory
# --watch Watch for changes and recompile
# --debounce INTEGER Debounce time in milliseconds
# --serve Serve the output directory
# --host TEXT Serve host
# --port INTEGER Serve port
# --help Show this message and exit.
# Compile markdown files into HTML
markapp tests/sample.md --output-dir .
# Will generate `sample` directory with the following structure:
tree sample
# sample
# ├── index.html
# ├── script.js
# └── style.css
Sample Markdown
# Really Cool Prompt
Make me a website with html, css, and javascript in their own files.
```html
inner html
```
```css
inner css
```
```javascript
inner javascript
```
Markdown Options
Here is a slightly more complex example.
# Really Cool Prompt
Make me a website with html, css, and javascript in their own files.
```html > index.html
inner html
```
```css > css/style.css
inner css
```
```javascript >> script/app.js
inner javascript
```
How to tell your generative AI to create these code blocks?!
Here is an example prompt to get you started:
Your MUST respond with Literate Markdown. For example:
- Each fenced code block must begin with three backticks followed by a language, space, greater than, space, and a file path.
- You may append to a previous file by using two greater thans and then the file name.
- Example create block:
console.log('hello')- Example append block:
</code></pre> </li> </ul> </blockquote> <pre><code>
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
markapp-0.3.1.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file markapp-0.3.1.tar.gz
.
File metadata
- Download URL: markapp-0.3.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf751deae314e42e0aebae24792753a6d4b9a25942dfd643312fef5a03fba56d |
|
MD5 | f664a490adf32dfe0e1356ed4565f33e |
|
BLAKE2b-256 | 338f763a4241d9131c2c9835434104299f3e755cea27bff51ee271e1a6daa82e |
File details
Details for the file markapp-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: markapp-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 010dbeabe78de0530bcb0d6fe795a602ef42835754d3d6e8f736ef63ecd6096c |
|
MD5 | e6250b1a52eb39af63582e076cb7aa97 |
|
BLAKE2b-256 | 4c6fd950a4f7f8c838014ab8a7ba59e31d3a693158e5a040cd00be0d9b252f87 |