coltrane


Namecoltrane JSON
Version 0.38.5 PyPI version JSON
download
home_pageNone
SummaryA minimal app framework for content sites 🎵
upload_time2025-01-19 03:44:25
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.10
licenseMIT License Copyright (c) 2022 Adam Hill Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords django markdown python static
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://coltrane.readthedocs.io"><h1 align="center">coltrane</h1></a>
</p>
<p align="center">A minimal app framework for content sites 🎵</p>

![PyPI](https://img.shields.io/pypi/v/coltrane?color=blue&style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/coltrane?color=blue&style=flat-square)
![GitHub Sponsors](https://img.shields.io/github/sponsors/adamghill?color=blue&style=flat-square)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

📖 Complete documentation at https://coltrane.readthedocs.io.

📦 Package located at https://pypi.org/project/coltrane/.

## ⭐ Features

- Render `markdown` files as HTML with automatic URL routing based on the filesystem
- Use JSON files as data sources in HTML templates or `markdown`
- Automatic generation of `sitemap.xml` and `rss.xml` files
- Can serve non-markdown files like `robots.txt`
- Local development server which includes [live re-rendering of markdown and data](https://twitter.com/adamghill/status/1487522925393715205) via https://github.com/adamchainz/django-browser-reload
- Site-wide redirects
- Deployment best practices with `whitenoise` and `gunicorn` already configured
- Leverage the power of built-in `Django` templates, template tags, and filters inside `markdown` files
- Any custom template tags and filters are enabled automatically for use in `markdown` or HTML templates
- Include any third-party [`Django` app](https://djangopackages.org) for additional functionality
- Serve multiple domains with custom sites
- Optional command to generate static HTML files
- Can be integrated into a regular `Django` project as a standard third-party `Django` app to render markdown content

## ⚡ Quick start

1. `mkdir new-site && cd new-site` to create a new folder
1. `python3 -m venv .venv && source .venv/bin/activate && pip install coltrane` to install the `coltrane` package
1. `coltrane create` to create the folder structure for a new site
1. `coltrane play` to start local development server
1. Go to http://localhost:8000 to see the original markdown rendered into HTML
1. Update `content/index.md`
1. Refresh http://localhost:8000 to see the updated markdown rendered into HTML
1. Optional: run `coltrane record` to build static HTML files

### Generated `coltrane` file structure

```bash
.
├── .gitignore
├── Dockerfile
├── README.md
├── pyproject.toml
└── site
    ├── .env
    ├── .watchmanconfig
    ├── __init__.py
    ├── app.py
    ├── content
    │   └── index.md
    ├── data
    ├── gunicorn.conf.py
    ├── static
    └── templates
```

## 📝 Content

Add `markdown` files or sub-directories to the `content` directory and rendered HTML will be accessible via auto-generated routes.

- `/` would render the `markdown` in `content/index.md`
- `/about/` would render the `markdown` in `content/about.md`
- `/articles/this-is-the-first-article/` would render the content from `/content/articles/this-is-the-first-article.md`
- `/not-there/` will 404

HTML will also be served automatically if a `markdown` file can not be found.

- `/app/` would render the HTML from `/templates/app.html` or `/templates/app/index.html`
- `/app/some-user` would render the HTML from `/templates/app/*.html`

## Deployment

Example `Dockerfile` and `gunicorn.conf.py` files are created when an app is created, and optional dependencies can be installed for efficient `static` serving with `whitenoise`.

# 📖 Documentation

Read all of the documentation at https://coltrane.readthedocs.io.

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tbody>
    <tr>
      <td align="center"><a href="https://github.com/Tobi-De"><img src="https://avatars.githubusercontent.com/u/40334729?v=4?s=100" width="100px;" alt="Tobi DEGNON"/><br /><sub><b>Tobi DEGNON</b></sub></a><br /><a href="https://github.com/adamghill/coltrane/commits?author=Tobi-De" title="Tests">⚠️</a> <a href="https://github.com/adamghill/coltrane/commits?author=Tobi-De" title="Code">💻</a></td>
    </tr>
  </tbody>
  <tfoot>
    
  </tfoot>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "coltrane",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "django, markdown, python, static",
    "author": null,
    "author_email": "Adam Hill <adam@adamghill.com>",
    "download_url": "https://files.pythonhosted.org/packages/5b/a2/8b7455163735da416e384ab54ea79f6b4cc8a078b65b3715eb5476c4460d/coltrane-0.38.5.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://coltrane.readthedocs.io\"><h1 align=\"center\">coltrane</h1></a>\n</p>\n<p align=\"center\">A minimal app framework for content sites \ud83c\udfb5</p>\n\n![PyPI](https://img.shields.io/pypi/v/coltrane?color=blue&style=flat-square)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/coltrane?color=blue&style=flat-square)\n![GitHub Sponsors](https://img.shields.io/github/sponsors/adamghill?color=blue&style=flat-square)\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\n\ud83d\udcd6 Complete documentation at https://coltrane.readthedocs.io.\n\n\ud83d\udce6 Package located at https://pypi.org/project/coltrane/.\n\n## \u2b50 Features\n\n- Render `markdown` files as HTML with automatic URL routing based on the filesystem\n- Use JSON files as data sources in HTML templates or `markdown`\n- Automatic generation of `sitemap.xml` and `rss.xml` files\n- Can serve non-markdown files like `robots.txt`\n- Local development server which includes [live re-rendering of markdown and data](https://twitter.com/adamghill/status/1487522925393715205) via https://github.com/adamchainz/django-browser-reload\n- Site-wide redirects\n- Deployment best practices with `whitenoise` and `gunicorn` already configured\n- Leverage the power of built-in `Django` templates, template tags, and filters inside `markdown` files\n- Any custom template tags and filters are enabled automatically for use in `markdown` or HTML templates\n- Include any third-party [`Django` app](https://djangopackages.org) for additional functionality\n- Serve multiple domains with custom sites\n- Optional command to generate static HTML files\n- Can be integrated into a regular `Django` project as a standard third-party `Django` app to render markdown content\n\n## \u26a1 Quick start\n\n1. `mkdir new-site && cd new-site` to create a new folder\n1. `python3 -m venv .venv && source .venv/bin/activate && pip install coltrane` to install the `coltrane` package\n1. `coltrane create` to create the folder structure for a new site\n1. `coltrane play` to start local development server\n1. Go to http://localhost:8000 to see the original markdown rendered into HTML\n1. Update `content/index.md`\n1. Refresh http://localhost:8000 to see the updated markdown rendered into HTML\n1. Optional: run `coltrane record` to build static HTML files\n\n### Generated `coltrane` file structure\n\n```bash\n.\n\u251c\u2500\u2500 .gitignore\n\u251c\u2500\u2500 Dockerfile\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 pyproject.toml\n\u2514\u2500\u2500 site\n    \u251c\u2500\u2500 .env\n    \u251c\u2500\u2500 .watchmanconfig\n    \u251c\u2500\u2500 __init__.py\n    \u251c\u2500\u2500 app.py\n    \u251c\u2500\u2500 content\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 index.md\n    \u251c\u2500\u2500 data\n    \u251c\u2500\u2500 gunicorn.conf.py\n    \u251c\u2500\u2500 static\n    \u2514\u2500\u2500 templates\n```\n\n## \ud83d\udcdd Content\n\nAdd `markdown` files or sub-directories to the `content` directory and rendered HTML will be accessible via auto-generated routes.\n\n- `/` would render the `markdown` in `content/index.md`\n- `/about/` would render the `markdown` in `content/about.md`\n- `/articles/this-is-the-first-article/` would render the content from `/content/articles/this-is-the-first-article.md`\n- `/not-there/` will 404\n\nHTML will also be served automatically if a `markdown` file can not be found.\n\n- `/app/` would render the HTML from `/templates/app.html` or `/templates/app/index.html`\n- `/app/some-user` would render the HTML from `/templates/app/*.html`\n\n## Deployment\n\nExample `Dockerfile` and `gunicorn.conf.py` files are created when an app is created, and optional dependencies can be installed for efficient `static` serving with `whitenoise`.\n\n# \ud83d\udcd6 Documentation\n\nRead all of the documentation at https://coltrane.readthedocs.io.\n\n## Contributors \u2728\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\"><a href=\"https://github.com/Tobi-De\"><img src=\"https://avatars.githubusercontent.com/u/40334729?v=4?s=100\" width=\"100px;\" alt=\"Tobi DEGNON\"/><br /><sub><b>Tobi DEGNON</b></sub></a><br /><a href=\"https://github.com/adamghill/coltrane/commits?author=Tobi-De\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"https://github.com/adamghill/coltrane/commits?author=Tobi-De\" title=\"Code\">\ud83d\udcbb</a></td>\n    </tr>\n  </tbody>\n  <tfoot>\n    \n  </tfoot>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Adam Hill  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A minimal app framework for content sites \ud83c\udfb5",
    "version": "0.38.5",
    "project_urls": {
        "Changelog": "https://github.com/adamghill/coltrane/blob/master/CHANGELOG.md",
        "Documentation": "https://github.com/adamghill/coltrane",
        "Homepage": "https://github.com/adamghill/coltrane",
        "Issues": "https://github.com/adamghill/coltrane/discussions",
        "Repository": "https://github.com/adamghill/coltrane.git"
    },
    "split_keywords": [
        "django",
        " markdown",
        " python",
        " static"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fc420d6b8824371a5f8d21fe19809010acf04c77e0c0a62434d898b413a98fe",
                "md5": "61d127cbfbc06e9b7902e0919d481037",
                "sha256": "483fe4f050a51a5b5768965c41b47a0d156e24138fcd557eb8c88a8024ddb649"
            },
            "downloads": -1,
            "filename": "coltrane-0.38.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "61d127cbfbc06e9b7902e0919d481037",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 47762,
            "upload_time": "2025-01-19T03:44:24",
            "upload_time_iso_8601": "2025-01-19T03:44:24.325023Z",
            "url": "https://files.pythonhosted.org/packages/5f/c4/20d6b8824371a5f8d21fe19809010acf04c77e0c0a62434d898b413a98fe/coltrane-0.38.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ba28b7455163735da416e384ab54ea79f6b4cc8a078b65b3715eb5476c4460d",
                "md5": "63f3548b9ed4d249db0151cefebc069c",
                "sha256": "f6daa9d4d6ab5f87da3f5ac6aa7b46875cbc5f7f36a1a7a79723205d07763306"
            },
            "downloads": -1,
            "filename": "coltrane-0.38.5.tar.gz",
            "has_sig": false,
            "md5_digest": "63f3548b9ed4d249db0151cefebc069c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 512338,
            "upload_time": "2025-01-19T03:44:25",
            "upload_time_iso_8601": "2025-01-19T03:44:25.772975Z",
            "url": "https://files.pythonhosted.org/packages/5b/a2/8b7455163735da416e384ab54ea79f6b4cc8a078b65b3715eb5476c4460d/coltrane-0.38.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-19 03:44:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adamghill",
    "github_project": "coltrane",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "coltrane"
}
        
Elapsed time: 0.45804s