Metadata-Version: 2.1
Name: gitblog2
Version: 0.2.2
Summary: Git + Markdown = blog
License: MIT
Author: Henri Hannetel
Author-email: henri.hannetel@pm.me
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: Jinja2 (>=3.1.2,<4.0.0)
Requires-Dist: Markdown (>=3.4.1,<4.0.0)
Requires-Dist: pygit2 (>=1.11.1,<2.0.0)
Requires-Dist: typer (>=0.7.0,<0.8.0)
Description-Content-Type: text/markdown

# ![Gitblog2 Logo](gitblog2/media/favicon.svg "title") Gitblog2

Git + Markdown = Blog

## TODO

High priority:

* if nb_commits > 1: last_commit else "Updated on last_commit < info_tooltip hover='published on first_commit'>"
* Add bio and picture from github
* Look at cool HTML elements: <https://tapajyoti-bose.medium.com/7-cool-html-elements-nobody-uses-436598d85668>
* Draft support (set publish_date to first `mv`)
* E2E tests

Low priority:

* Unit tests
* Fix root index.html not served by redbean
* Make it work on non-unix systems (mainly dealing with windows file system separator)

## Installation

```bash
pip install gitblog2
```

## Usage

As a command line:

```bash
gitblog https://codeberg.org/HenriTEL/git-blog.git --repo-subdir=example
```

As a library:

```python
from gitblog2 import GitBlog

source_repo = "https://codeberg.org/HenriTEL/git-blog.git"
output_dir = "./www"
with GitBlog(source_repo, repo_subdir="example") as gb:
    gb.write_articles(output_dir)
    gb.write_indexes(output_dir)
    gb.copy_static_assets(output_dir)
```

## Internals

Stylesheet is based on water.css

