Commit graph

23 commits

Author SHA1 Message Date
Kumi 4a6c825394
refactor: streamline kalente module structure
All checks were successful
Python Package CI/CD / Publish to PyPI (push) Successful in 40s
Introduced a `Calendar` class to encapsulate calendar-related functionalities, removing redundant code and improving module organization. This refactor simplifies `` by delegating calendar operations to the `Calendar` class, enhancing readability and maintainability. Adjusted import statements in `` to reflect these changes, ensuring the module's public API remains clear and intuitive. The refactor also includes minor optimizations, such as consolidating validation logic and updating default image data, contributing to a leaner codebase.

This change aims to make future extensions and maintenance of the `kalente` module more manageable, paving the way for further enhancements and features.
2024-05-28 12:49:59 +02:00
Kumi a8d1a8b4c3
feat(ci/cd): Transition CI/CD to Forgejo for PyPI publishing
Migrated the CI/CD pipeline for PyPI package publishing from GitLab CI to Forgejo workflows. This change introduces a new `release.yml` workflow in the `.forgejo/workflows` directory, designed to trigger on tagged commits with a version identifier. The new workflow uses a Node.js container to manage the Python environment setup and package publication. By switching to Forgejo, we aim to consolidate CI/CD processes and improve integration within our development workflow.

This migration removes the previous `.gitlab-ci.yml` file, reflecting a shift away from GitLab CI in our project infrastructure.
2024-05-28 12:25:22 +02:00
Kumi 269e155f53
feat: bump version to 0.1.4 and set default logo SVG
Upgraded the project version to 0.1.4 in preparation for a new release. Additionally, introduced a default SVG data URL for the NO_LOGO constant in, replacing the previously empty string. This change ensures a more meaningful default state for the logo, enhancing UI consistency and avoiding potential errors or unexpected behaviors in scenarios where a logo is required but not specified.
2024-05-28 12:23:03 +02:00
Kumi b2cb02c77f
Linting. 2024-02-14 21:01:20 +01:00
Kumi df3d17ba58
Remove logo data from templates, add logo args
Removed the hard-coded data: URIs from the template files. Implemented a
--logo argument to provide a logo file, and a --no-logo argument to
prevent the default logo from being displayed. Data URIs are now created
on demand and passed as context to the templates.

Bumped version to 0.1.3
2024-02-14 20:57:17 +01:00
Kumi 4b523aa979
Added a yearly version calendar (two-page template) 2024-02-11 20:51:38 +01:00
Kumi 8c2c5bb212
Update kalente to version 0.1.2
Increment project version in preparation for new release, including minor bug fixes and performance enhancements.
2023-12-26 22:07:41 +01:00
Kumi 15c4ea5565
Add duck logo to daily template 2023-12-26 22:06:32 +01:00
Kumi e9cc432e29
Refactor HTML generation and add template argument
Centralized HTML content generation logic into a single function `generate_html`, replacing `generate_monthly_html`, `generate_weekly_html`, and `generate_daily_html`. This simplifies the handling of different content types and allows for dynamic template path specification via command-line arguments, enhancing flexibility. The refactoring also includes argument validation for the calendar type, ensuring that unsupported types are not processed.
2023-12-26 22:06:18 +01:00
Kumi c08de0fd30
Added logo in top-right corner for monthly and weekly calendars 2023-12-26 16:06:30 +01:00
Kumi d40a290c6f
Rudimentary implementation of day planner 2023-11-27 08:39:21 +01:00
Kumi aee43175eb
Add --type shortcut help messages for generating monthly and weekly calendars.
- Add --type monthly shortcut help message
- Add --type weekly shortcut help message
2023-10-02 09:32:06 +02:00
Kumi 541d69ef5d
Refactor command line argument parsing and handling for generating calendars
- Added a mutually exclusive group for the `--type` flag to specify the type of calendar to generate: weekly or monthly
- Added two new arguments `--weekly` and `--monthly` to specify the type of calendar directly
- Updated the default value for `--type` to be "weekly"
2023-09-30 19:03:55 +02:00
Kumi 92cdf67db7
Styling updates for monthly and weekly templates.
- Add page break before all h2 elements except the first one.
2023-09-30 18:49:41 +02:00
Kumi 05842e102a
Update version in pyproject.toml, fix count assignment in main()
- Update version in pyproject.toml to 0.1.1
- Fix count assignment in main() to use ternary operator instead of if-else statement
2023-09-03 08:27:07 +02:00
Kumi b786097a47
Add setlocale to set English locale to en_US.UTF-8 2023-09-01 20:19:35 +02:00
Kumi 499faf1dbb
Improve logo location to 2023-09-01 19:51:16 +02:00
Kumi 11a88b848d
Update .gitignore and add .gitlab-ci.yml 2023-09-01 19:00:47 +02:00
Kumi f2c67360c7
Add Kalente logo and update README with more details on usage and requirements
- Add Kalente logo
- Update README with more details on usage and requirements
- Include instructions on installation and usage
- Mention future updates for language and format support
- Provide examples of command line usage for generating weekly and monthly calendars
- Inform about available options using `--help`
- Mention the MIT license and refer to the LICENSE file for more information
2023-09-01 19:00:00 +02:00
Kumi 5291618518
Change holiday, saturday, and sunday colors in monthly.html
The commit changes the background colors for holidays, Saturdays, and Sundays in the monthly.html template file.
2023-09-01 18:43:37 +02:00
Kumi af10cd37b3
feat: Add functionality to generate monthly calendars
This commit adds functions to generate monthly calendars in addition to the existing functionality of generating weekly calendars. The "get_month" function retrieves a list of weeks within a given month, and the "generate_monthly_html" function generates the HTML content for a monthly calendar using a Jinja2 template. The new template file "templates/monthly.html" is also included in this commit.
2023-09-01 10:47:14 +02:00
Kumi 9d89adf158
Refactor README for Kalente
- Refactor the file for clarity and formatting.
- Change some sentences to improve readability.
- Add a link to the LICENSE file for more information.
2023-08-31 21:49:52 +02:00
Kumi 60cfcc70dd
feat: Add .gitignore, LICENSE, README, pyproject.toml, and kalente source files
- Added .gitignore file to specify files and directories to ignore in version control.
- Added LICENSE file with MIT license.
- Added file with project information and license details.
- Added pyproject.toml file with project metadata and dependencies.
- Added kalente source files for generating PDF calendars.
- Implemented functions for generating weekly calendars, converting HTML to PDF, and CLI parsing.
- Created a template for rendering weekly calendars in HTML format.
2023-08-31 21:43:48 +02:00