How mptwaktusolat/waktusolat-fetcher works
Main Entry Point & CLI Layer
• Component: main.py
• Purpose: Acts as the CLI interface that parses command-line arguments and dispatches commands. It essentially determines whether to “fetch”, “process”, or “push” data based on user input.
• Representation: Use a rectangle labeled “CLI/Entry (main.py)” which is the starting point of the system.
Functional Modules (Sub-components)
• Module 1: Fetcher (scripts/fetcher.py)
• Role: Responsible for scraping prayer time data from JAKIM’s website (external data source).
• Module 2: Processor (scripts/process_db.py)
• Role: Reads the fetched JSON data, parses and processes the date time fields (e.g., converts them into UNIX timestamps).
• Module 3: Pusher (scripts/push_db.py)
• Role: Pushes the processed data to Firebase Firestore (remote external service). This step is optional – it can be skipped by passing a command-line argument.
Data Flow & File Output
• The system produces output files (e.g., month-year.json and month-year.processed.json) stored in the output directory (even though this directory isn’t explicitly shown in the file tree, it’s mentioned in the README).
External Dependencies & Services
• External Service: Firebase Firestore, which is used by the Pusher module.