Added an example in README for generating a weekly calendar
programmatically using Kalente. This assists developers by
demonstrating how to integrate Kalente into their projects.
fix: default options parameter in convert_html_to_pdf
Updated the `options` parameter in `convert_html_to_pdf` to
default to an empty dictionary. This prevents potential NoneType
errors and ensures consistent behavior.
chore: bump version to 0.2.1
Updated version in pyproject.toml to reflect the new features
and bug fixes.
Introduced a `Calendar` class to encapsulate calendar-related functionalities, removing redundant code and improving module organization. This refactor simplifies `__main__.py` by delegating calendar operations to the `Calendar` class, enhancing readability and maintainability. Adjusted import statements in `__init__.py` 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.
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.
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 __main__.py, 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.
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
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.
- 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"
- 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
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.
- Refactor the README.md file for clarity and formatting.
- Change some sentences to improve readability.
- Add a link to the LICENSE file for more information.
- Added .gitignore file to specify files and directories to ignore in version control.
- Added LICENSE file with MIT license.
- Added README.md 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.