markapp


Namemarkapp JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/ddrscott/markapp
SummaryA simple markdown to HTML compiler
upload_time2023-06-19 20:33:33
maintainer
docs_urlNone
authorScott Pierce
requires_python>=3.10
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```sh
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:
>   ```javascript > src/index.js
>   console.log('hello')
>   ```
> - Example append block:
>   ```javascript >> src/index.js
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ddrscott/markapp",
    "name": "markapp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "Scott Pierce",
    "author_email": "ddrscott@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/33/8f/763a4241d9131c2c9835434104299f3e755cea27bff51ee271e1a6daa82e/markapp-0.3.1.tar.gz",
    "platform": null,
    "description": "# Markapp\n\nLiterate Markdown for Apps\u2122\n\nThis project helps generates `index.html`, `style.css`, and `script.js` from code blocks in Markdown files.\n\nGenerative AI is all the rage, but it can be cumbersome to try out code that it generates.\nThis script allows us to manages notes and code snippets in a single file and\nbreak them up into multiple files for easy web serving.\n\n## Example Usage\n\n```sh\npip install markapp\n\n# Get list of options\nmarkapp --help\n\n#   Usage: markapp [OPTIONS] SRC\n#   \n#     Compile markdown files into HTML\n#   \n#   Options:\n#     --output-dir TEXT   Output directory\n#     --watch             Watch for changes and recompile\n#     --debounce INTEGER  Debounce time in milliseconds\n#     --serve             Serve the output directory\n#     --host TEXT         Serve host\n#     --port INTEGER      Serve port\n#     --help              Show this message and exit.\n#     Compile markdown files into HTML\n\nmarkapp tests/sample.md --output-dir .\n\n# Will generate `sample` directory with the following structure:\ntree sample\n#  sample\n#  \u251c\u2500\u2500 index.html\n#  \u251c\u2500\u2500 script.js\n#  \u2514\u2500\u2500 style.css\n```\n\n## Sample Markdown\n\n    # Really Cool Prompt\n\n    Make me a website with html, css, and javascript in their own files.\n    \n    ```html\n    inner html\n    ```\n    \n    ```css\n    inner css\n    ```\n    \n    ```javascript\n    inner javascript\n    ```\n\n## Markdown Options\n\nHere is a slightly more complex example.\n\n    # Really Cool Prompt\n\n    Make me a website with html, css, and javascript in their own files.\n    \n    ```html > index.html\n    inner html\n    ```\n    \n    ```css > css/style.css\n    inner css\n    ```\n    \n    ```javascript >> script/app.js\n    inner javascript\n    ```\n\n## How to tell your generative AI to create these code blocks?!\n\nHere is an example prompt to get you started:\n\n> Your MUST respond with Literate Markdown. For example:\n> - Each fenced code block must begin with three backticks followed by a language, space, greater than, space, and a file path.\n> - You may append to a previous file by using two greater thans and then the file name.\n> - Example create block:\n>   ```javascript > src/index.js\n>   console.log('hello')\n>   ```\n> - Example append block:\n>   ```javascript >> src/index.js\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A simple markdown to HTML compiler",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/ddrscott/markapp"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c6fd950a4f7f8c838014ab8a7ba59e31d3a693158e5a040cd00be0d9b252f87",
                "md5": "e6250b1a52eb39af63582e076cb7aa97",
                "sha256": "010dbeabe78de0530bcb0d6fe795a602ef42835754d3d6e8f736ef63ecd6096c"
            },
            "downloads": -1,
            "filename": "markapp-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6250b1a52eb39af63582e076cb7aa97",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6152,
            "upload_time": "2023-06-19T20:33:29",
            "upload_time_iso_8601": "2023-06-19T20:33:29.977919Z",
            "url": "https://files.pythonhosted.org/packages/4c/6f/d950a4f7f8c838014ab8a7ba59e31d3a693158e5a040cd00be0d9b252f87/markapp-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "338f763a4241d9131c2c9835434104299f3e755cea27bff51ee271e1a6daa82e",
                "md5": "f664a490adf32dfe0e1356ed4565f33e",
                "sha256": "bf751deae314e42e0aebae24792753a6d4b9a25942dfd643312fef5a03fba56d"
            },
            "downloads": -1,
            "filename": "markapp-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f664a490adf32dfe0e1356ed4565f33e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5679,
            "upload_time": "2023-06-19T20:33:33",
            "upload_time_iso_8601": "2023-06-19T20:33:33.190013Z",
            "url": "https://files.pythonhosted.org/packages/33/8f/763a4241d9131c2c9835434104299f3e755cea27bff51ee271e1a6daa82e/markapp-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-19 20:33:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ddrscott",
    "github_project": "markapp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "markapp"
}
        
Elapsed time: 0.10793s