Skip to main content

Coeur - static site management

Project description

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:

pip install --user blog-coeur

The command to be used is blog-coeur and get help to start to use:

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.

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

blog_coeur-0.0.16.tar.gz (120.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blog_coeur-0.0.16-py3-none-any.whl (124.7 kB view details)

Uploaded Python 3

File details

Details for the file blog_coeur-0.0.16.tar.gz.

File metadata

  • Download URL: blog_coeur-0.0.16.tar.gz
  • Upload date:
  • Size: 120.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for blog_coeur-0.0.16.tar.gz
Algorithm Hash digest
SHA256 d5fe9dacd51ffe8afde3e82b9e572a1673f763c9206f6f1c5c48e39cdac2c9a7
MD5 ed1b111e39b9ea319b9230767ac19689
BLAKE2b-256 bea614e4a379e08020df26bf9de5f9e9cdb02507ed0a2629e49d88386c90aff8

See more details on using hashes here.

File details

Details for the file blog_coeur-0.0.16-py3-none-any.whl.

File metadata

  • Download URL: blog_coeur-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 124.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for blog_coeur-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 f0bf0d8d39d53f28d668f97f0c270897e3084d7b1be3f7391470d69d4b7dcb23
MD5 afd0021b70e3f4527f653a465f78aef7
BLAKE2b-256 8c5863968bd5824fa1bc98ed44d54e5046921757df212d5f1f59fa2f682be2a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page