Commit graph

303 commits

Author SHA1 Message Date
Yax
433d3b4a2a Remove unused ngix configuration 2026-01-10 16:43:51 +01:00
Yax
f9fb7552bb Update monitor.py to use .env instead of params.json
Complete the migration started in 42c89dc by updating the monitoring
script to load configuration from .env files using python-dotenv.
2026-01-10 16:36:44 +01:00
Yax
3b7484fbe6 Replace JSON config with .env files
- Add python-dotenv dependency for environment variable loading
- Replace params.json and params-local.json with .env files
- Add --local and --local-stacosys flags to makesite.py
- Update Makefile to auto-detect stacosys availability
- Document configuration and usage in README.md
2026-01-10 16:03:53 +01:00
Yax
199911aaae Rename image folders from numbered (00x-07x) to year-based naming
Reorganized image folder structure for consistency:
- 00x -> 2009
- 01x, 02x, 03x, 04x -> 2010
- 05x -> 2011
- 06x, 07x -> 2012

Updated all image references in 21 blog posts accordingly.
2026-01-09 20:40:11 +01:00
Yax
7b1264d12c Add comprehensive unit tests for core functions
Added 62 unit tests (441 lines) covering high-priority functions:
- test_parse_headers.py: 9 tests for header parsing logic
- test_render.py: 15 tests for template engine
- test_strip_html_tags.py: 18 tests for HTML tag removal
- test_strip_tags_and_truncate.py: 19 tests for summary generation

All tests pass and cover edge cases, error conditions, and real-world scenarios.
2026-01-07 14:49:27 +01:00
Yax
3297ce5e67 Improve slugify function, add tests, and enhance Makefile
Applied improvements from feature-code-quality branch:
- Refactored slugify() for better readability with inline comments
- Renamed log() parameter *args to *log_args (avoid shadowing built-in)
- Added comprehensive unit tests for slugify function
- Enhanced Makefile with typecheck and test targets
- Updated build target to run type checks and tests before Docker build

All tests pass and type checking succeeds.
2026-01-07 14:12:12 +01:00
Yax
13d3d653de Make internal helper functions private
Added underscore prefix to functions used only internally:
- _strip_tags_and_truncate (used only in parse_post_file)
- _parse_headers (used only in parse_post_file)
- _rfc_2822_format (used only in parse_post_file)
- _make_links_absolute (used only in parse_post_file)
- _strip_html_tags (used only in parse_post_file)
- _get_friendly_date (used only in _setup_page_params)
- _exit_program (used only in monitor.py main loop)

This improves encapsulation by clearly marking implementation details.
2026-01-07 13:42:43 +01:00
Yax
424ea20bcf Refactor function names for clarity and accuracy
Renamed functions to better reflect their actual behavior:
- truncate → strip_tags_and_truncate (does both operations)
- fix_relative_links → make_links_absolute (converts, not fixes)
- clean_html_tag → strip_html_tags (more explicit)
- clean_site → rebuild_site_directory (removes and recreates)
- read_headers → parse_headers (parses, not just reads)
- read_content → parse_post_file (full processing pipeline)
- get_nb_of_comments → get_comment_count (removes French abbreviation)
2026-01-07 13:42:43 +01:00
Yax
f5df515d2b Add comprehensive docstrings to all functions
Added Google-style docstrings to all functions and classes in makesite.py and monitor.py with descriptions, argument types, and return values.
2026-01-07 13:42:43 +01:00
Yax
584904bbf9 Add type checking support with mypy
Added mypy and type stubs for external dependencies (requests, Pygments) to dev dependencies. Type checking now passes cleanly for makesite.py and monitor.py.
2026-01-07 13:42:43 +01:00
Yax
9853ed4327 Refactor make_posts() 2026-01-06 21:06:47 +01:00
Yax
939a8708be New post 2026-01-02 19:41:45 +01:00
Yax
8a944a66dc Add Fedora BTRFS chroot 2025-12-15 18:57:08 +01:00
Yax
49332d53ae Update note 2025-10-21 18:54:31 +02:00
Yax
7650a7b8f5 Article 'Immich et les tags' 2025-10-12 12:16:36 +02:00
Yax
f2e88a317b Fix links 2025-10-08 18:42:15 +02:00
Yax
afff273c61 Disable comments when build is done locally 2025-09-28 11:53:53 +02:00
Yax
5993ec498c Add TODO to externalize config some day... 2025-09-28 11:47:18 +02:00
Yax
12e6465264 Remove deprecated site_remote target 2025-09-28 11:40:03 +02:00
Yax
78ef5cef23 Update README 2025-09-28 11:39:54 +02:00
Yax
8be31fda12 Fix deprecated ENV command 2025-09-27 16:12:45 +02:00
Yax
65bf5524a2 Refactoring: split big main function 2025-09-27 16:05:25 +02:00
Yax
9a7312c585 CQ 2025-09-24 18:51:49 +02:00
Yax
e961eeb5eb Fix regexp. use raw-strings 2025-09-24 18:35:47 +02:00
Yax
3ddaee4820 Remove unexpected <p> tag in RSS description 2025-09-24 18:30:50 +02:00
Yax
89176d7eab Fix relative URL in HREF 2025-09-24 13:11:29 +02:00
Yax
3911e59d93 Fix RSS format 2025-09-24 13:05:03 +02:00
Yax
21b6e3e0f1 New post 'GrapheneOS' 2025-08-16 12:43:11 +02:00
Yax
1580c7c1af Don't see unsupported locales in docker image 2025-06-21 17:07:23 +02:00
Yax
a6136abba7 Format french dates without OS locales 2025-06-21 17:05:01 +02:00
Yax
fccf551e60 Force french locale to render dates 2025-06-21 16:39:29 +02:00
Yax
134838484a New post 2025-06-21 16:09:04 +02:00
Yax
517d313741 New post: 'Zoraxy' 2025-05-11 13:05:45 +02:00
Yax
75fe4049a9 fix check_git 2025-04-17 19:00:40 +02:00
Yax
9d2d099ab7 New Post 2025-04-02 20:38:29 +02:00
Yax
af6fa158fc Ignore uv.lock 2025-04-02 18:50:31 +02:00
Yax
0762185a61 Remove uv.lock 2025-04-02 18:49:20 +02:00
Yax
3957cb8738 Reduce docker image 2025-04-02 18:40:49 +02:00
Yax
22a8fd6ba8 Remove unit tests 2025-04-02 13:36:39 +02:00
Yax
7a41f3cecf Clean-up Makefile 2025-04-02 13:36:16 +02:00
Yax
145d45efeb Use slim nginx docker image and remove github actions 2025-04-01 19:21:41 +02:00
Yax
b279dd1d3a Typo
Some checks failed
docker / build (push) Has been cancelled
2025-03-30 13:27:08 +02:00
Yax
6f92874a43 New post
Some checks are pending
docker / build (push) Waiting to run
2025-03-30 13:21:46 +02:00
Yax
791f803123 Git clone from zaclys
Some checks are pending
docker / build (push) Waiting to run
2025-03-30 12:08:54 +02:00
Yax
5f86a11e88 Zaclys migration
Some checks are pending
docker / build (push) Waiting to run
2025-03-29 19:46:46 +01:00
Yax
ab2b93ce82 Docker build 2025-03-28 20:38:59 +01:00
Yax
548c495c27 Git pull from Codeberg 2025-03-23 18:08:02 +01:00
Yax
e0dcda1c47 pacman cache 2025-03-09 12:00:15 +01:00
Yax
4ab90b0993 Add redirections 2025-01-20 19:17:35 +01:00
Yax
dbb700f349 new post: analyse de logs 2025-01-11 19:36:21 +01:00