This project processes work hours data from HTML files and generates calendar files in ICS format. It supports multiple languages and allows customization of work hours and skipped days.
- Parses work hours from HTML reference tables.
- Validates work hours against a maximum allowed value.
- Generates ICS calendar files for different languages.
- Supports skipping weekends or custom days.
- Supports input HTML files with a specific structure
- Node.js installed on your system.
- Dependencies installed via
npm install.
- Clone the repository.
- Navigate to the project directory.
- Run
npm installto install dependencies.
Run the following command to parse work hours from HTML files in the input folder:
node parseWorkHours.js -inputFolder inputOptional arguments:
-maxWorkHours <number>: Set the maximum allowed work hours per day (default is 8).
After parsing, generate calendar files using:
node generateCalendars.js -inputFolder ./output/work_hours/Optional arguments:
-skipDays <days>: Comma-separated list of days to skip (e.g.,0,6for Sunday and Saturday).
To parse work hours and generate calendars in one step, use:
npm run build- Parsed work hours are saved as JSON files in the
output/work_hoursdirectory. - Generated ICS calendar files are saved in the
output/calendarsdirectory.
.
├── input/ # Input HTML files
├── output/
│ ├── work_hours/ # Parsed work hours JSON files
│ └── calendars/ # Generated ICS calendar files
├── parseWorkHours.js # Script to parse work hours
├── generateCalendars.js # Script to generate calendars
├── package.json # Project metadata and dependencies
└── readme.md # Project documentation
This project is licensed under the MIT License. See the package.json for details.
Michael Rosendahl
GitHub Profile