1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 12:42:41 +00:00

Compare commits

...

44 Commits

Author SHA1 Message Date
Bastian Venthur
60bd86ec22 finalized benchmark 2025-01-22 15:17:28 +01:00
Bastian Venthur
69b729a471 Merge branch 'performance' into rebuild_needed_only 2025-01-22 14:46:42 +01:00
Bastian Venthur
f09e841200 Merge branch 'master' into rebuild_needed_only 2025-01-22 14:46:29 +01:00
Bastian Venthur
c94f9793b0 improved performance test 2025-01-22 14:46:14 +01:00
Bastian Venthur
5cddb62603 Merge branch 'master' into performance 2025-01-22 14:14:46 +01:00
Bastian Venthur
85e57a7ef2 added py313 to github actions test suite 2025-01-03 10:46:22 +01:00
dependabot[bot]
ef18685cef Bump the all group across 1 directory with 10 updates
Bumps the all group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.39` | `9.5.49` |
| [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) | `0.26.1` | `0.27.0` |
| [twine](https://github.com/pypa/twine) | `5.1.1` | `6.0.1` |
| [wheel](https://github.com/pypa/wheel) | `0.44.0` | `0.45.1` |
| [pytest](https://github.com/pytest-dev/pytest) | `8.3.3` | `8.3.4` |
| [pytest-cov](https://github.com/pytest-dev/pytest-cov) | `5.0.0` | `6.0.0` |
| [ruff](https://github.com/astral-sh/ruff) | `0.6.9` | `0.8.4` |
| [mypy](https://github.com/python/mypy) | `1.11.2` | `1.14.0` |
| [types-markdown](https://github.com/python/typeshed) | `3.7.0.20240822` | `3.7.0.20241204` |
| [jinja2](https://github.com/pallets/jinja) | `3.1.4` | `3.1.5` |



Updates `mkdocs-material` from 9.5.39 to 9.5.49
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.39...9.5.49)

Updates `mkdocstrings[python]` from 0.26.1 to 0.27.0
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.26.1...0.27.0)

Updates `twine` from 5.1.1 to 6.0.1
- [Release notes](https://github.com/pypa/twine/releases)
- [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/twine/compare/v5.1.1...6.0.1)

Updates `wheel` from 0.44.0 to 0.45.1
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.44.0...0.45.1)

Updates `pytest` from 8.3.3 to 8.3.4
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...8.3.4)

Updates `pytest-cov` from 5.0.0 to 6.0.0
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v5.0.0...v6.0.0)

Updates `ruff` from 0.6.9 to 0.8.4
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.6.9...0.8.4)

Updates `mypy` from 1.11.2 to 1.14.0
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.14.0)

Updates `types-markdown` from 3.7.0.20240822 to 3.7.0.20241204
- [Commits](https://github.com/python/typeshed/commits)

Updates `jinja2` from 3.1.4 to 3.1.5
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: mkdocstrings[python]
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: twine
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: wheel
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: pytest-cov
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: types-markdown
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 14:19:20 +00:00
Bastian Venthur
6b699f58ad simplified color scheme selection 2024-11-18 09:22:21 +01:00
Bastian Venthur
a3da95ea19 added benchmark 2024-10-29 12:13:05 +01:00
Bastian Venthur
c4f3c09730 WIP 2024-10-29 10:16:48 +01:00
Bastian Venthur
5943dab690 wip 2024-10-29 10:16:48 +01:00
Bastian Venthur
e631b17fb1 bumped version prepared upload 2024-10-13 20:13:10 +02:00
Bastian Venthur
07be96aa7c bumped changelog 2024-10-13 20:11:58 +02:00
Bastian Venthur
0d03733b4f ignoe FileNotFound Error that sometimes happens when getting mtime of directories
Fixes: #231
2024-10-11 11:09:32 +02:00
Bastian Venthur
8fed4894ee Merge remote-tracking branch 'origin/dependabot/pip/all-571baf080f' 2024-10-10 16:20:18 +02:00
Bastian Venthur
12db99f20a remove ruff's target-version 2024-10-10 16:18:52 +02:00
dependabot[bot]
086832986b Bump the all group with 2 updates
Bumps the all group with 2 updates: [build](https://github.com/pypa/build) and [ruff](https://github.com/astral-sh/ruff).


Updates `build` from 1.2.2 to 1.2.2.post1
- [Release notes](https://github.com/pypa/build/releases)
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pypa/build/compare/1.2.2...1.2.2.post1)

Updates `ruff` from 0.6.8 to 0.6.9
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.6.8...0.6.9)

---
updated-dependencies:
- dependency-name: build
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 14:22:20 +00:00
Bastian Venthur
8112d9fb30 Merge pull request #253 from venthur/dependabot/pip/all-e1f04c1223
Bump the all group across 1 directory with 9 updates
2024-10-07 12:31:39 +02:00
dependabot[bot]
e977383ae0 Bump the all group across 1 directory with 9 updates
Bumps the all group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [build](https://github.com/pypa/build) | `1.2.1` | `1.2.2` |
| [mkdocs](https://github.com/mkdocs/mkdocs) | `1.6.0` | `1.6.1` |
| [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.31` | `9.5.39` |
| [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) | `0.25.2` | `0.26.1` |
| [pytest](https://github.com/pytest-dev/pytest) | `8.3.2` | `8.3.3` |
| [ruff](https://github.com/astral-sh/ruff) | `0.6.0` | `0.6.8` |
| [mypy](https://github.com/python/mypy) | `1.11.1` | `1.11.2` |
| [types-markdown](https://github.com/python/typeshed) | `3.6.0.20240316` | `3.7.0.20240822` |
| [markdown](https://github.com/Python-Markdown/markdown) | `3.6` | `3.7` |



Updates `build` from 1.2.1 to 1.2.2
- [Release notes](https://github.com/pypa/build/releases)
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pypa/build/compare/1.2.1...1.2.2)

Updates `mkdocs` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.6.0...1.6.1)

Updates `mkdocs-material` from 9.5.31 to 9.5.39
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.31...9.5.39)

Updates `mkdocstrings[python]` from 0.25.2 to 0.26.1
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.2...0.26.1)

Updates `pytest` from 8.3.2 to 8.3.3
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3)

Updates `ruff` from 0.6.0 to 0.6.8
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.6.0...0.6.8)

Updates `mypy` from 1.11.1 to 1.11.2
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.11.1...v1.11.2)

Updates `types-markdown` from 3.6.0.20240316 to 3.7.0.20240822
- [Commits](https://github.com/python/typeshed/commits)

Updates `markdown` from 3.6 to 3.7
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.6...3.7)

---
updated-dependencies:
- dependency-name: build
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: mkdocs
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: mkdocstrings[python]
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: types-markdown
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: markdown
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 14:43:59 +00:00
Bastian Venthur
0c606c7673 Added changelog to docs 2024-08-26 10:04:57 +02:00
Bastian Venthur
c8a0587d78 Merge pull request #245 from venthur/dependabot/pip/all-40c5988f12
Bump the all group with 6 updates
2024-08-16 09:58:38 +02:00
dependabot[bot]
be079e8699 Bump the all group with 6 updates
Bumps the all group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.28` | `9.5.31` |
| [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) | `0.25.1` | `0.25.2` |
| [wheel](https://github.com/pypa/wheel) | `0.43.0` | `0.44.0` |
| [pytest](https://github.com/pytest-dev/pytest) | `8.2.2` | `8.3.2` |
| [ruff](https://github.com/astral-sh/ruff) | `0.5.1` | `0.6.0` |
| [mypy](https://github.com/python/mypy) | `1.10.1` | `1.11.1` |


Updates `mkdocs-material` from 9.5.28 to 9.5.31
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.28...9.5.31)

Updates `mkdocstrings[python]` from 0.25.1 to 0.25.2
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.1...0.25.2)

Updates `wheel` from 0.43.0 to 0.44.0
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.43.0...0.44.0)

Updates `pytest` from 8.2.2 to 8.3.2
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.2)

Updates `ruff` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.5.1...0.6.0)

Updates `mypy` from 1.10.1 to 1.11.1
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.10.1...v1.11.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: mkdocstrings[python]
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: wheel
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 07:49:28 +00:00
Bastian Venthur
60b7679c14 group dependabot mrs 2024-08-16 09:47:33 +02:00
Bastian Venthur
5a68d15849 bumped version 2024-07-06 15:34:57 +02:00
Bastian Venthur
de8444cc5d sorted dependencies 2024-07-06 15:32:37 +02:00
Bastian Venthur
28b4f5fb4e changed debian section from python to web 2024-07-06 15:22:48 +02:00
Bastian Venthur
c8a26885e7 simplified html docs dir for blag-doc package (Debian) 2024-07-06 15:21:26 +02:00
Bastian Venthur
5922f70567 disable google fonts 2024-07-06 15:20:10 +02:00
Bastian Venthur
6dd1eee238 added serve-docs and manpage 2024-07-06 15:18:45 +02:00
Bastian Venthur
c3a189f88b updated requirements 2024-07-06 14:30:11 +02:00
Bastian Venthur
89f4ad0d2a Merge pull request #220 from venthur/dependabot/pip/wheel-0.43.0
Bump wheel from 0.42.0 to 0.43.0
2024-07-06 14:11:36 +02:00
Bastian Venthur
a083399d9c Merge pull request #221 from venthur/dependabot/pip/build-1.2.1
Bump build from 1.0.3 to 1.2.1
2024-07-06 14:11:16 +02:00
Bastian Venthur
ba306b7fd5 Merge pull request #219 from venthur/dependabot/pip/types-markdown-3.6.0.20240316
Bump types-markdown from 3.5.0.20240129 to 3.6.0.20240316
2024-07-06 14:10:49 +02:00
Bastian Venthur
bc1b2da020 Merge pull request #222 from venthur/dependabot/pip/markdown-3.6
Bump markdown from 3.5.2 to 3.6
2024-07-06 14:10:35 +02:00
dependabot[bot]
59ead49f2f Bump markdown from 3.5.2 to 3.6
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.5.2 to 3.6.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.5.2...3.6)

---
updated-dependencies:
- dependency-name: markdown
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 12:40:58 +00:00
Bastian Venthur
9ecb9da696 Merge pull request #224 from venthur/dependabot/pip/jinja2-3.1.4
Bump jinja2 from 3.1.3 to 3.1.4
2024-05-21 14:39:09 +02:00
dependabot[bot]
34cf2e5ebb Bump jinja2 from 3.1.3 to 3.1.4
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 21:00:48 +00:00
dependabot[bot]
89812ee97a Bump build from 1.0.3 to 1.2.1
Bumps [build](https://github.com/pypa/build) from 1.0.3 to 1.2.1.
- [Release notes](https://github.com/pypa/build/releases)
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pypa/build/compare/1.0.3...1.2.1)

---
updated-dependencies:
- dependency-name: build
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 14:13:37 +00:00
dependabot[bot]
e9eb0971cf Bump wheel from 0.42.0 to 0.43.0
Bumps [wheel](https://github.com/pypa/wheel) from 0.42.0 to 0.43.0.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.42.0...0.43.0)

---
updated-dependencies:
- dependency-name: wheel
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 14:13:34 +00:00
dependabot[bot]
77d193d45e Bump types-markdown from 3.5.0.20240129 to 3.6.0.20240316
Bumps [types-markdown](https://github.com/python/typeshed) from 3.5.0.20240129 to 3.6.0.20240316.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-markdown
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 14:13:31 +00:00
Bastian Venthur
fd23c1f5e6 fixed min python requirement in docs 2024-04-24 22:38:47 +02:00
Bastian Venthur
71c866c9b3 Merge branch 'master' into rebuild_needed_only 2023-11-12 17:16:46 +01:00
Bastian Venthur
c87a300c71 Merge branch 'master' into rebuild_needed_only 2022-08-07 21:50:15 +02:00
Bastian Venthur
a939e6503c rebuild only files that need re-building
we compare the mtimes of src and dst
2022-08-06 21:56:41 +02:00
20 changed files with 189 additions and 57 deletions

View File

@@ -4,6 +4,10 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
all:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"

View File

@@ -20,6 +20,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4

View File

@@ -1,5 +1,28 @@
# Changelog
## [unreleased]
* Added Python 3.13 to github actions
## [2.3.2] -- 2024-10-13
* Ignore FileNotFoundError when trying to get the last modified time of files
in directories. This happens for example with temporary emacs files.
* Added changelog to docs
* removed ruff's target-version from pyproject.toml, this value defaults to the
projects requires-python
## [2.3.1] -- 2024-07-06
* added manpage
* added makefile target for generating blog's manpage
* added makefile target for serving blags docs locally
* mkdocs: disabled loading of google fonts, using locally installed system
fonts instead
* Debian: simplified html docs directory for blag-doc package
* Debian: changed section from Python to Web
* updated dependencies
## [2.3.0] -- 2024-04-24
* fixed devsever so it does not crash anymore when the (re-)build fails

View File

@@ -57,6 +57,18 @@ update-pygmentize: $(VENV)
docs: $(VENV)
$(BIN)/mkdocs build
.PHONY: serve-docs
serve-docs: $(VENV)
$(BIN)/mkdocs serve
.PHONY: manpage
manpage: $(VENV)
help2man $(BIN)/blag --no-info -n "blog-aware, static site generator" -o debian/blag.1
.PHONY: benchmark
benchmark: $(VENV)
$(BIN)/pytest --no-cov -capture=no -rA tests/benchmark.py
.PHONY: clean
clean:
rm -rf build dist *.egg-info

View File

@@ -323,6 +323,18 @@ def process_markdown(
for src, dst in convertibles:
logger.debug(f"Processing {src}")
# see first if the dst actually needs re-building. for that we compare
# the mtimes and assume mtime_dst > mtime_src means that it needs not
# to be rebuilt
if os.path.exists(f"{output_dir}/{dst}"):
mtime_src = os.stat(f"{input_dir}/{src}").st_mtime
mtime_dst = os.stat(f"{output_dir}/{dst}").st_mtime
if mtime_dst >= mtime_src:
logger.debug(
"Skipping, as target exists and is newer than source."
)
continue
with open(f"{input_dir}/{src}") as fh:
body = fh.read()

View File

@@ -42,7 +42,12 @@ def get_last_modified(dirs: list[str]) -> float:
for dir in dirs:
for root, dirs, files in os.walk(dir):
for f in files:
mtime = os.stat(os.path.join(root, f)).st_mtime
try:
mtime = os.stat(os.path.join(root, f)).st_mtime
except FileNotFoundError:
# ignore files that have been deleted since the os.walk
# call (for example temporary emacs files)
continue
if mtime > last_mtime:
last_mtime = mtime

View File

@@ -1,33 +1,16 @@
@import "code-light.css" (prefers-color-scheme: light);
@import "code-dark.css" (prefers-color-scheme: dark);
@media (prefers-color-scheme: light) {
:root {
--background: #FFFFFF;
--background-dim: #f5f7f9;
--foreground: #2B303A;
--foreground-dim: #576379;
--foreground-heavy: #191C22;
--primary-color: #375287;
}
:root {
color-scheme: light dark;
--background: light-dark(#FFFFFF, #2B363B);
--background-dim: light-dark(#f5f7f9, #2F3C42);
--foreground: light-dark(#2B303A, #f0f2f3);
--foreground-dim: light-dark(#576379, #d5d5d5);
--foreground-heavy: light-dark(#191C22, #f2f4f5);
--primary-color: light-dark(#375287, #A1C5FF);
}
@media (prefers-color-scheme: dark) {
:root {
--background: #2B363B;
--background-dim: #2F3C42;
--foreground: #f0f2f3;
--foreground-dim: #d5d5d5;
--foreground-heavy: #f2f4f5;
--primary-color: #A1C5FF;
}
}
html {
font-size: 18px;
font-family: serif;

View File

@@ -1,3 +1,3 @@
"""Version information for the blag package."""
__VERSION__ = "2.3.0"
__VERSION__ = "2.3.2"

View File

@@ -1 +1 @@
site/
site/*

28
debian/blag.1 vendored Normal file
View File

@@ -0,0 +1,28 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BLAG "1" "July 2024" "blag 2.3.0" "User Commands"
.SH NAME
blag \- blog-aware, static site generator
.SH DESCRIPTION
usage: blag [\-h] [\-\-version] [\-v] {build,quickstart,serve} ...
.SS "positional arguments:"
.IP
{build,quickstart,serve}
.TP
build
Build website.
.TP
quickstart
Quickstart blag, creating necessary configuration.
.TP
serve
Start development server.
.SS "options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-\-version\fR
show program's version number and exit
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose output.

23
debian/changelog vendored
View File

@@ -1,3 +1,26 @@
blag (2.3.2) unstable; urgency=medium
* Ignore FileNotFoundError when trying to get the last modified time of
files in directories. This happens for example with temporary emacs files.
* Added changelog to docs
* removed ruff's target-version from pyproject.toml, this value defaults to
the projects requires-python
-- Bastian Venthur <venthur@debian.org> Sun, 13 Oct 2024 20:12:29 +0200
blag (2.3.1) unstable; urgency=medium
* added manpage
* added makefile target for generating blog's manpage
* added makefile target for serving blags docs locally
* mkdocs: disabled loading of google fonts, using locally installed system
fonts instead
* Debian: simplified html docs directory for blag-doc package
* Debian: changed section in debian/control from Python to Web
* updated dependencies
-- Bastian Venthur <venthur@debian.org> Sat, 06 Jul 2024 15:33:36 +0200
blag (2.3.0) unstable; urgency=medium
* fixed devsever so it does not crash anymore when the (re-)build fails

24
debian/control vendored
View File

@@ -1,24 +1,24 @@
Source: blag
Section: python
Section: web
Priority: optional
Maintainer: Bastian Venthur <venthur@debian.org>
Rules-Requires-Root: no
Build-Depends:
debhelper-compat (= 13),
dh-sequence-python3,
dh-python,
pybuild-plugin-pyproject,
python3-setuptools,
python3-all,
python3-markdown,
python3-feedgenerator,
python3-jinja2,
python3-pygments,
python3-pytest,
python3-pytest-cov,
dh-sequence-python3,
mkdocs,
mkdocs-material,
mkdocstrings-python-handlers,
pybuild-plugin-pyproject,
python3-all,
python3-feedgenerator,
python3-jinja2,
python3-markdown,
python3-pygments,
python3-pytest,
python3-pytest-cov,
python3-setuptools,
#Testsuite: autopkgtest-pkg-python
Standards-Version: 4.6.0.1
Homepage: https://github.com/venthur/blag
@@ -28,8 +28,8 @@ Vcs-Git: https://github.com/venthur/blag.git
Package: blag
Architecture: all
Depends:
${python3:Depends},
${misc:Depends},
${python3:Depends},
Suggests:
blag-doc,
Description: Blog-aware, static site generator

1
debian/manpages vendored Normal file
View File

@@ -0,0 +1 @@
debian/blag.1

1
docs/CHANGELOG.md Symbolic link
View File

@@ -0,0 +1 @@
../CHANGELOG.md

View File

@@ -16,7 +16,7 @@ blag is named after [the blag of the webcomic xkcd][blagxkcd].
## Features
* Write content in [Markdown][]
* Good looking default theme
* Good looking default theme:
![Blag Screenshot](blag.png)
* Theming support using [Jinja2][] templates
* Generation of Atom feeds for blog content
@@ -24,7 +24,7 @@ blag is named after [the blag of the webcomic xkcd][blagxkcd].
* Integrated devserver
* Available on [PyPI][]
blag runs on Linux, Mac and Windows and requires Python >= 3.8
blag runs on Linux, Mac and Windows and requires Python >= 3.10
[markdown]: https://daringfireball.net/projects/markdown/
[jinja2]: https://palletsprojects.com/p/jinja/

View File

@@ -13,10 +13,13 @@ nav:
- blag.markdown: markdown.md
- blag.devserver: devserver.md
- blag.quickstart: quickstart.md
- Changelog: CHANGELOG.md
theme:
name: material
highlightjs: true
# disable google fonts, use system fonts
font: false
markdown_extensions:
- pymdownx.superfences

View File

@@ -65,7 +65,6 @@ addopts = """
[tool.ruff]
line-length = 79
target-version = "py310"
[tool.ruff.lint]
select = [

View File

@@ -1,11 +1,11 @@
build==1.0.3
mkdocs==1.5.3
mkdocs-material==9.5.18
mkdocstrings[python]==0.24.3
twine==5.0.0
wheel==0.42.0
pytest==8.1.1
pytest-cov==4.1.0
ruff==0.4.1
mypy==1.8.0
types-markdown==3.5.0.20240129
build==1.2.2.post1
mkdocs==1.6.1
mkdocs-material==9.5.49
mkdocstrings[python]==0.27.0
twine==6.0.1
wheel==0.45.1
pytest==8.3.4
pytest-cov==6.0.0
ruff==0.8.4
mypy==1.14.0
types-markdown==3.7.0.20241204

View File

@@ -1,4 +1,4 @@
markdown==3.5.2
markdown==3.7
feedgenerator==2.1.0
jinja2==3.1.3
pygments==2.17.2
jinja2==3.1.5
pygments==2.18.0

37
tests/benchmark.py Normal file
View File

@@ -0,0 +1,37 @@
"""Benchmark the performance of the blag build command."""
import logging
import os
from argparse import Namespace
from pytest import LogCaptureFixture
import blag
from blag.blag import build
def test_performance(args: Namespace, caplog: LogCaptureFixture) -> None:
"""Test performance of the build command."""
caplog.set_level(logging.ERROR)
FILES = 10000
print(f"Generating {FILES} markdown files")
# create random markdown files in the content directory
with open(os.path.join(blag.__path__[0], "content", "testpage.md")) as fh:
markdown = fh.read()
for i in range(FILES):
with open(f"content/{i}.md", "w") as f:
f.write(markdown)
f.write(str(i))
from time import time
t = time()
build(args)
t_first = time() - t
t = time()
build(args)
t_second = time() - t
print(f"First run: {t_first:.2f}s, second run: {t_second:.2f}s")
print(f"Speedup: {t_first/t_second:.2f}")