27 Commits

Author SHA1 Message Date
e96ef0e44e Improve Dockerfile, compose configuration, Kindle script, and UI styles for better maintainability and functionality
This commit introduces several enhancements across multiple files to improve maintainability, functionality, and overall code quality. Key updates are as follows:
	1.	.gitignore
	•	Added exclusion for kindle/data/* to prevent Kindle-specific data from being tracked.
	2.	Dockerfile
	•	Added installation of OpenMoji font:
	•	Downloads and unzips OpenMoji font to /usr/share/fonts/openmoji.
	•	Updates font cache with fc-cache.
	•	Verifies installation with fc-list | grep "OpenMoji".
	•	Improves container setup for rendering Kindle dashboards with proper font support.
	3.	compose.yml
	•	Port mapping now uses an environment variable ${HOST_PORT} instead of hardcoding 56733:80.
	•	Enhances flexibility for port management.
	4.	kindle/ascwebdash.py
	•	Significant refactoring and cleanup:
	•	Removed unused signal handling and daemonization logic.
	•	Simplified logging configuration and added optional arguments using argparse for flexibility.
	•	Abstracted repetitive paths using constants for maintainability.
	•	Consolidated functionality for fetching images and refreshing the screen.
	•	Removed unused Wi-Fi and GUI toggling code.
	•	Focused the script’s functionality on image fetching and display for Kindle extensions.
	5.	CSS (style.css)
	•	Removed visual debugging borders (red, green, yellow).
	•	Improved layout styles:
	•	Set fixed widths for better rendering of event columns.
	•	Adjusted margins and paddings for cleaner alignment.
	•	Added a new .day .events class for consistent padding.
	6.	views.py
	•	Added error handling when fetching calendar data:
	•	Ensures the application doesn’t crash if calendar URLs are inaccessible.
	•	Logs errors to console for debugging.

Impact:
	•	Maintainability: Refactored scripts, improved code structure, and enhanced readability.
	•	Flexibility: Environment variable support for ports and dynamic script arguments.
	•	Functionality: Added OpenMoji font support in the Docker container.
	•	UI/UX: Cleaned up CSS for better layout and appearance.
	•	Resilience: Improved error handling in views.py to handle calendar fetch failures gracefully.

Files Modified:
	•	.gitignore
	•	Dockerfile
	•	compose.yml
	•	kindle/ascwebdash/bin/asc-webdash.py
	•	server/app/templates/style.css
	•	server/app/views.py

This ensures better extensibility and robustness across the codebase.
2024-12-17 06:59:54 -06:00
d8d9e3bbab 2024-12-16 2024-12-16 16:45:24 -06:00
82d0389db4 try fixing weather image 2024-12-16 13:43:38 -06:00
4e7fce8ba3 add kindle scripts 2024-12-16 12:34:16 -06:00
f65cf3c1ed 2024-12-16 2024-12-16 08:25:39 -06:00
35677f7e95 simplify css 2024-12-15 19:48:47 -06:00
351f73974f 2024-12-15 2024-12-15 08:44:42 -06:00
9a180f973b Here’s a detailed commit message based on the provided diff:
Commit Message:

feat: Implement web calendar application with Flask, Docker, and calendar integration

Description:
	1.	Server Refactor:
	•	Moved application logic from main.py to a structured directory server/app/.
	•	Added server/app/__init__.py for Flask app initialization.
	•	Introduced server/app/views.py to handle routes (dashboard and dashboard_image).
	•	Created server/app/models.py for event modeling, supporting CalDAV and iCalendar events.
	•	Added server/app/weather.py to fetch weather data using OpenWeatherMap API.
	2.	New Features:
	•	Added an image generation route (/image) to render calendar views as BMP images.
	•	Integrated OpenWeatherMap API for weather data on the dashboard.
	3.	Environment and Configurations:
	•	Added a Dockerfile to build and deploy the app using uwsgi-nginx-flask.
	•	Introduced compose.yml for running the app with Docker Compose.
	•	Moved uwsgi.ini configuration to server/uwsgi.ini for modular organization.
	4.	Dependencies:
	•	Updated requirements.txt to include new dependencies: imgkit, pillow, and Werkzeug==2.2.2.
	5.	Static Assets:
	•	Added placeholder images out.png and test.png.
	6.	Code Cleanup:
	•	Removed old files (main.py and root-level uwsgi.ini).
	•	Updated .gitignore to include .idea/ folder.

Additional Notes:
	•	Enhanced event parsing to handle all-day and time-specific events using server/app/models.py.
	•	Utilized Flask’s render_template for dynamic HTML rendering and imgkit for HTML-to-image conversion.
	•	Integrated multiple calendar sources (CalDAV and public iCal feeds).

Let me know if you need further adjustments!
2024-12-15 08:42:51 -06:00
dc90143c09 add weather 2022-05-26 14:45:16 -05:00
8569d17f23 add last updated 2022-05-26 14:42:30 -05:00
7caa6865b1 delete sun.gif 2022-05-25 17:02:33 -05:00
60cf02af50 comment debug line 2022-05-25 17:01:08 -05:00
6c5b5d54ae adjust all day events from ical 2022-05-25 16:59:29 -05:00
6c7605231d remove emoji 2022-05-25 16:59:29 -05:00
4f2f1a14f3 fonts 2022-05-25 16:59:29 -05:00
23426c4e81 change fonts 2022-05-25 14:35:48 -05:00
ffac94439f change fonts 2022-05-25 14:34:00 -05:00
b7c20bb20f change fonts 2022-05-25 14:32:52 -05:00
eec6b1a43f change fonts 2022-05-25 14:16:12 -05:00
c6730afd73 add gitignore 2022-05-25 13:45:12 -05:00
bcc5e04e5a create Event model 2022-05-25 13:42:43 -05:00
213bcf92d5 migrate style to css file 2022-05-25 13:42:36 -05:00
bf4aacc680 try port=81 2022-05-24 21:36:40 -05:00
961b0201b2 initial commit 2022-05-24 21:23:54 -05:00
c3e10b5d5b initial commit 2022-05-24 17:34:47 -05:00
dd31378448 initial commit 2022-05-24 17:04:30 -05:00
f0578f858b initial commit 2022-05-24 16:45:28 -05:00