This project provides a Calendar Builder API.
git clone https://github.com/bjoern-hempel/php-calendar-builder.git && cd php-calendar-builderdocker compose exec php composer installbin/console calendar:new→ Directory "data/calendar/2c93279fb467" was successfully created.
→ Got to this directory.
→ Add your own images.
→ Edit the "data/calendar/2c93279fb467/config.yml" config file to your needs.
→ Build your calendar with: bin/console calendar:build "data/calendar/2c93279fb467/config.yml"
→ The 13 calendar pages are then located here by default: "data/calendar/2c93279fb467/ready/*"
→ Enjoy
bin/console calendar:new [-f <quote|simple>]There are already 13 sample images in the folder. Replace these with your own. Allowed are png and jpg images.
Things that can be changed
- Design and design configurations
- Birthdays
- Holidays
- Title and subtitle of the main page
- Title of the monthly pages
- Positions/coordinates of the images
- Source and destination of the images
- Year and month of the monthly pages
- Output quality
- etc.
bin/console calendar:build "data/calendar/2c93279fb467/config.yml"or if want to execute the command within the running docker container:
docker compose exec -u www-data php bin/console calendar:build data/calendar/2c93279fb467/config.ymlls data/calendar/2c93279fb467/ready2024-00.jpg 2024-01.jpg 2024-02.jpg 2024-03.jpg
2024-04.jpg 2024-05.jpg 2024-06.jpg 2024-07.jpg
2024-08.jpg 2024-09.jpg 2024-10.jpg 2024-11.jpg
2024-12.jpgExample images can be found here: Example Images
You can use a calendar UI to display the built calendars or have access to the api.
docker compose up -ddocker compose exec php composer installOpen the project in your browser:
- https://localhost:5443 (List available calendars)
- https://localhost:5443/api/v1 (Swagger UI)
- https://localhost:5443/api/v1/version.json (Show version of this app)
Hint: If you want to use real urls instead of using port numbers, try to use https://github.com/bjoern-hempel/local-traefik-proxy
- PHPCS - PHP Coding Standards Fixer
- PHPMND - PHP Magic Number Detector
- PHPStan - PHP Static Analysis Tool
- PHPUnit - The PHP Testing Framework
- Rector - Instant Upgrades and Automated Refactoring
Execute them all:
composer test:hardcore