# Coeur - static site management
Coeur is just another Python tool to generate static sites with thousands of pages, with a bit of extra power.
## Name explanation
"cœur" is a French word for "core" or "heart".
This tool is called Coeur for two personal reasons: 1. it will be the core of my blog-farm; 2. one of my favorite places is the Sacre ***Cœur*** in Paris.
## How to install
Coeur is a common python package, you can install from pypi:
```sh
pip install --user blog-coeur
```
The command to be used is `blog-coeur` and get `help` to start to use:
```sh
blog-coeur --help
```
## Module SSG - Static Site Generator
The `ssg` module in **Coeur** allows you to create a static website from a `sqlite` database and import content from markdown files.
### How to Use
#### Create Your Coeur App
To start a new project, run the `create` command:
```
blog-coeur ssg create my-blog
```
#### Development Server
Run a simple local server to build your blog:
```
blog-coeur ssg server --max-posts=1000 --port=8081
```
#### Admin Web Panel
Manage your blog’s posts through a simple web interface:
```
blog-coeur ssg admin
```
Go to: `http://localhost:8000/admin`
#### Build Static Site
Build your blog with the `build` command:
```
blog-coeur ssg build
```
The blog will be generated in the `public` folder.
#### Markdown Import
To import your markdown files from Zola Framework to Coeur:
```
blog-coeur ssg markdown-to-db "./content"
```
### SSG Features
- Import markdown files from Zola Framework
- Basic blog template based on Zolarwind
- HTML Minification
- Sitemap generation with pagination
- Hot reload
- Post management via SQLAlchemyAdmin dashboard (partial)
### TODO List
- [ ] Custom templates (themes)
- [ ] Documentation about templates
- [ ] Support to use post Tags
- [ ] Hot reload v2 - add websocket to auto-refresh the html in the browser
- [ ] Manage posts - fixes for multiple databases
## Module CMP - Content Machine Processor
The CMP module was designed to simplify content creation powered by the OpenAI API.
### How to Use
The content will be created as posts inside the blog's SQLite database, which is generated by the ssg module. It's important to start your project using the ssg command.
Assuming you already have the blog created with Coeur, you need to set up your OpenAI key in the `.env` file and then you can use the cmp module as follows:
```
blog-coeur cmp title-to-post "Aguas de Lindóia" --custom-prompt="Create a full article about the city, need to be funny and talking in a positive way about the place"
```
The first parameter is required and will be the title of the post.
It is highly recommended to use a custom-prompt to enhance your experience and get better results. This prompt can be in any language.
You can also set the `img-url` parameter to include an image in the post. This needs to be a valid image URL, such as one hosted on S3.
## Module PDS – Post Distribution Service
This module will help us to automatically publish the blog posts on social media.
```
blog-coeur pds publish [OPTIONS] CHANNELS:{instagram}...
```
# Do you want to help?
This is an open-source project, and I need help to make it better.
If you are a developer, feel free to contact me to work on items from my personal roadmap, or you can suggest something new. Be free, let's do it together.
If you are a company, contact me to support the growth of my project. I'm open to improve it for specifics new use-cases.
Raw data
{
"_id": null,
"home_page": "https://github.com/sr2ds/coeur",
"name": "blog-coeur",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "David Silva",
"author_email": "srdavidsilva@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b3/cf/600f31c4ce19ed456dc41e15b276e920c84afe1de1f20037ce2863484dd7/blog_coeur-0.0.18.tar.gz",
"platform": null,
"description": "# Coeur - static site management\n\nCoeur is just another Python tool to generate static sites with thousands of pages, with a bit of extra power.\n\n## Name explanation\n\n\"c\u0153ur\" is a French word for \"core\" or \"heart\".\n\nThis tool is called Coeur for two personal reasons: 1. it will be the core of my blog-farm; 2. one of my favorite places is the Sacre ***C\u0153ur*** in Paris.\n\n## How to install\n\nCoeur is a common python package, you can install from pypi:\n\n```sh\npip install --user blog-coeur\n```\n\nThe command to be used is `blog-coeur` and get `help` to start to use:\n\n```sh\nblog-coeur --help\n```\n\n## Module SSG - Static Site Generator\n\nThe `ssg` module in **Coeur** allows you to create a static website from a `sqlite` database and import content from markdown files.\n\n### How to Use\n\n#### Create Your Coeur App\n\nTo start a new project, run the `create` command:\n\n```\nblog-coeur ssg create my-blog\n```\n\n#### Development Server\n\nRun a simple local server to build your blog:\n\n```\nblog-coeur ssg server --max-posts=1000 --port=8081\n```\n\n#### Admin Web Panel\n\nManage your blog\u2019s posts through a simple web interface:\n\n```\nblog-coeur ssg admin\n```\n\nGo to: `http://localhost:8000/admin`\n\n#### Build Static Site\n\nBuild your blog with the `build` command:\n\n```\nblog-coeur ssg build\n```\n\nThe blog will be generated in the `public` folder.\n\n#### Markdown Import\n\nTo import your markdown files from Zola Framework to Coeur:\n\n```\nblog-coeur ssg markdown-to-db \"./content\"\n```\n\n### SSG Features\n\n- Import markdown files from Zola Framework\n- Basic blog template based on Zolarwind\n- HTML Minification\n- Sitemap generation with pagination\n- Hot reload\n- Post management via SQLAlchemyAdmin dashboard (partial)\n\n ### TODO List\n\n- [ ] Custom templates (themes)\n - [ ] Documentation about templates\n- [ ] Support to use post Tags\n- [ ] Hot reload v2 - add websocket to auto-refresh the html in the browser\n- [ ] Manage posts - fixes for multiple databases\n\n\n## Module CMP - Content Machine Processor\n\nThe CMP module was designed to simplify content creation powered by the OpenAI API.\n\n### How to Use\n\nThe content will be created as posts inside the blog's SQLite database, which is generated by the ssg module. It's important to start your project using the ssg command.\n\nAssuming you already have the blog created with Coeur, you need to set up your OpenAI key in the `.env` file and then you can use the cmp module as follows:\n\n```\nblog-coeur cmp title-to-post \"Aguas de Lind\u00f3ia\" --custom-prompt=\"Create a full article about the city, need to be funny and talking in a positive way about the place\"\n```\n\nThe first parameter is required and will be the title of the post.\n\nIt is highly recommended to use a custom-prompt to enhance your experience and get better results. This prompt can be in any language.\n\nYou can also set the `img-url` parameter to include an image in the post. This needs to be a valid image URL, such as one hosted on S3.\n\n\n## Module PDS \u2013 Post Distribution Service\n\nThis module will help us to automatically publish the blog posts on social media.\n\n```\nblog-coeur pds publish [OPTIONS] CHANNELS:{instagram}...\n```\n\n# Do you want to help?\n\nThis is an open-source project, and I need help to make it better.\n\nIf you are a developer, feel free to contact me to work on items from my personal roadmap, or you can suggest something new. Be free, let's do it together.\n\nIf you are a company, contact me to support the growth of my project. I'm open to improve it for specifics new use-cases.",
"bugtrack_url": null,
"license": null,
"summary": "Coeur - static site management",
"version": "0.0.18",
"project_urls": {
"Homepage": "https://github.com/sr2ds/coeur",
"Repository": "https://github.com/sr2ds/coeur"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e124cfef73bd25b890ecc61b57228c49d1fba3871859f7e55eb754bf93fb62ef",
"md5": "cf0717d1a47403e4eb05d0f22cfaca85",
"sha256": "90a5000cd55d30307353981943a13f788e453073eb11386a118ef8740f91146b"
},
"downloads": -1,
"filename": "blog_coeur-0.0.18-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cf0717d1a47403e4eb05d0f22cfaca85",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.10",
"size": 124813,
"upload_time": "2025-01-09T21:35:18",
"upload_time_iso_8601": "2025-01-09T21:35:18.443271Z",
"url": "https://files.pythonhosted.org/packages/e1/24/cfef73bd25b890ecc61b57228c49d1fba3871859f7e55eb754bf93fb62ef/blog_coeur-0.0.18-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b3cf600f31c4ce19ed456dc41e15b276e920c84afe1de1f20037ce2863484dd7",
"md5": "bcaf11253b13de403818f0d153ab8397",
"sha256": "3ccb1fa1fd1fe9e81b037b19449ed9e32b3b6ab9c5843158d588e127f08de940"
},
"downloads": -1,
"filename": "blog_coeur-0.0.18.tar.gz",
"has_sig": false,
"md5_digest": "bcaf11253b13de403818f0d153ab8397",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.10",
"size": 120752,
"upload_time": "2025-01-09T21:35:19",
"upload_time_iso_8601": "2025-01-09T21:35:19.580855Z",
"url": "https://files.pythonhosted.org/packages/b3/cf/600f31c4ce19ed456dc41e15b276e920c84afe1de1f20037ce2863484dd7/blog_coeur-0.0.18.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-09 21:35:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sr2ds",
"github_project": "coeur",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "blog-coeur"
}