{"id":25382572,"url":"https://github.com/blazzed21/umte-calendar","last_synced_at":"2026-02-16T19:01:57.446Z","repository":{"id":277551555,"uuid":"928346404","full_name":"BLazzeD21/UMTE-Calendar","owner":"BLazzeD21","description":"Transferring the UTME schedule to an ics calendar","archived":false,"fork":false,"pushed_at":"2025-03-19T08:58:16.000Z","size":243,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T13:17:47.458Z","etag":null,"topics":["ics","node","parser","playwright","ts","umeos","umte"],"latest_commit_sha":null,"homepage":"https://umeos.ru/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BLazzeD21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-06T13:40:57.000Z","updated_at":"2025-03-19T08:53:48.000Z","dependencies_parsed_at":"2025-03-19T09:37:17.882Z","dependency_job_id":null,"html_url":"https://github.com/BLazzeD21/UMTE-Calendar","commit_stats":null,"previous_names":["blazzed21/umte-calendar"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BLazzeD21%2FUMTE-Calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BLazzeD21%2FUMTE-Calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BLazzeD21%2FUMTE-Calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BLazzeD21%2FUMTE-Calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BLazzeD21","download_url":"https://codeload.github.com/BLazzeD21/UMTE-Calendar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045270,"owners_count":21038557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ics","node","parser","playwright","ts","umeos","umte"],"created_at":"2025-02-15T07:28:44.504Z","updated_at":"2026-02-16T19:01:57.441Z","avatar_url":"https://github.com/BLazzeD21.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white) ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white) ![Playwright](https://img.shields.io/badge/-playwright-%232EAD33?style=for-the-badge\u0026logo=playwright\u0026logoColor=white) ![Nginx](https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge\u0026logo=nginx\u0026logoColor=white) ![PM2](https://img.shields.io/badge/PM2-24036f?style=for-the-badge\u0026logo=pm2) ![NPM](https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge\u0026logo=npm\u0026logoColor=white)\n\n# 💻 Transferring the UMTE schedule to an `ics` calendar\n\n## Script installation instructions\n\n### 1. Cloning a repository\n\nThe script will require a VPS or VDS server with a minimum version of **Ubuntu 20.04.6 LTS** for stable operation of the program.\nAfter authorization on the server, clone the repository to the `/home` directory.\n\nInstall git:\n\n```bash\nsudo apt update \u0026\u0026 sudo apt upgrade\nsudo apt install -y git\n```\n\nYou can confirm that you have installed Git correctly by running the following command and checking that you receive relevant output.\n\n```bash\ngit --version\n```\n\nGo to your home directory and clone the repository:\n\n```bash\ncd /home\ngit clone https://github.com/BLazzeD21/UMTE-Calendar.git\n```\n\n### 2. Installing dependencies\n\nCheck the version of _node.js_ installed on the server:\n\n```bash\nnode -v\n```\n\nIf the version below _v18.20.6_ or _node.js_ is not installed, then you need to install:\n\n```bash\nsudo apt install -y curl\ncurl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -\nsudo apt install -y nodejs\n```\n\nInstalling project dependencies and playwright:\n\n```bash\ncd UMTE-Calendar/\nnpm i \u0026\u0026 npx playwright install \u0026\u0026 npx playwright install-deps\n```\n\nIn the **UMTE-Calendar** directory you need to create a `.env` file containing the credentials for umeos.ru\n\n```bash\nUMTE_USERNAME=username\nUMTE_PASSWORD=password\n```\n\n### 2. Start an app\n\nUsing pm2 to run the script. PM2 is a daemon process manager that will help you manage and keep your application online.\n\nThe latest PM2 version is installable with NPM:\n\n```bash\nnpm install pm2@latest -g\n```\n\n#### Starting and Managing Processes\n\n| **Action**         | **Description**                                                                                                                                                        | **Command**                                                                             |\n| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |\n| **Start Process**  | Run the application named `UTME-schedule` using the desired number of CPU cores specifying them after `-i`, if you want to use all cores use `max` instead of a number | `npm run start`                                                                         |\n|                    | Script in `package.json`:                                                                                                                                              | `\"start\": \"npm run build \u0026\u0026 pm2 start build/index.js --name UMTE-schedule --time -i 1\"` |\n| **Stop Process**   | Stop the running process                                                                                                                                               | `npm run stop`                                                                          |\n|                    | Script in `package.json`:                                                                                                                                              | `\"stop\": \"pm2 stop UMTE-schedule\"`                                                      |\n| **Reload Process** | Reload the process without downtime                                                                                                                                    | `npm run reload`                                                                        |\n|                    | Script in `package.json`:                                                                                                                                              | `\"reload\": \"pm2 reload UMTE-schedule\"`                                                  |\n| **Delete Process** | Remove the process from PM2                                                                                                                                            | `npm run delete`                                                                        |\n|                    | Script in `package.json`:                                                                                                                                              | `\"delete\": \"pm2 delete UMTE-schedule\"`                                                  |\n\n#### Monitoring Processes\n\n| **Action**               | **Description**                                     | **Command**                  |\n| ------------------------ | --------------------------------------------------- | ---------------------------- |\n| **List Processes**       | Display all running processes                       | `pm2 list`                   |\n| **Detailed Information** | Show detailed information about the process         | `pm2 describe UMTE-schedule` |\n| **Real-Time Monitoring** | Monitor system resources and processes in real-time | `pm2 monit`                  |\n\n#### Viewing Logs\n\n| **Action**            | **Description**                  | **Command**              |\n| --------------------- | -------------------------------- | ------------------------ |\n| **View All Logs**     | Show all logs                    | `pm2 logs`               |\n| **View Process Logs** | View logs for a specific process | `pm2 logs UMTE-schedule` |\n| **View Errors**       | Show only error logs             | `pm2 logs --err`         |\n| **Clear Logs**        | Clear all logs                   | `pm2 flush`              |\n\n#### Auto Start on Server Reboot\n\n| **Action**            | **Description**                                  | **Command**   |\n| --------------------- | ------------------------------------------------ | ------------- |\n| **Enable Auto Start** | Set up auto start for processes on server reboot | `pm2 startup` |\n| **Save Process List** | Save the current process list for auto start     | `pm2 save`    |\n\n#### Updating Processes After Code Changes\n\n| **Action**                | **Description**                       | **Command**                |\n| ------------------------- | ------------------------------------- | -------------------------- |\n| **Reload Single Process** | Reload the process after code changes | `pm2 reload UMTE-schedule` |\n| **Reload All Processes**  | Reload all running processes          | `pm2 reload all`           |\n\nNow let's run the script:\n\n```bash\nnpm run start\n```\n\nAfter running the script, a `calendar.ics` file will appear in the `/UMTE-Calendar/calendar` directory, which will contain a calendar that can be used for various purposes.\n\n### 3. Configuring `nginx`\n\nFirst, install nginx:\n\n```bash\nsudo apt install -y nginx\n```\n\nCreate a symbolic link to the `calendar.ics` file in a directory accessible to nginx. Run the following command:\n\n```bash\nsudo ln -s /home/UMTE-Calendar/calendar/calendar.ics /var/www/html/calendar.ics\n```\n\nOpen the nginx configuration file for editing:\n\n`sudo nano /etc/nginx/sites-available/default`\n\nTo serve then `calendar.ics` file, you need to modify the configuration:\n\n```bash\nserver {\n    listen 80;\n    server_name yourdomain.com;  # Replace with your domain or IP address\n\n    location /calendar.ics {\n        root /var/www/html;\n        autoindex on;\n    }\n}\n```\n\nExplanation of the configuration:\n\n- `listen 80;`: Tells nginx to listen on port 80 (HTTP).\n- `server_name yourdomain.com;`: Replace _yourdomain.com_ with your actual domain or IP address.\n- `location /calendar.ics { ... }`: This block tells nginx how to handle requests for the file `calendar.ics`.\n- `root /var/www/html;`: This specifies the root directory where nginx will look for files. Since we created a symbolic link earlier, nginx will find the file `calendar.ics` here.\n- `autoindex on;`: Enables directory listing, allowing you to see files in the directory if needed.\n\nAfter making the changes, you need to save the file and exit nano:\n\n- Press `Ctrl + O` to save the file.\n- Press `Enter` to confirm the file name.\n- Press `Ctrl + X` to exit the editor.\n\nAfter modifying the configuration file, you must restart nginx to apply the changes:\n\n```bash\nsudo systemctl restart nginx\n```\n\n### 4. Check File Serving with curl\n\nTo check if nginx is serving the `calendar.ics` file, use the curl command. Replace `yourdomain.com` with your domain or IP address:\n\n```bash\ncurl -o - -I http://yourdomain.com/calendar.ics\n```\n\nIf the file is being served correctly, you will see this response. If the file isn't accessible, double-check that nginx is running, the configuration is correct, and that the file exists at `/var/www/html/calendar.ics`.\n\n```bash\nHTTP/1.1 200 OK\nServer: nginx/1.18.0 (Ubuntu)\n```\n\nNow, the file `calendar.ics` should be available at `http://yourdomain.com/calendar.ics`.\n\n### 5. Ensure secure connection via **https**\n\nIf you want to secure Nginx with Let's Encrypt, follow these [instructions](/Let's-Encrypt.md).\n\n### 5. Schedule change notifications via Telegram bot\n\nThe Telegram bot is disabled by default. To enable notifications, create a bot using [@BotFather](https://telegram.me/BotFather). You will receive a token to access the HTTP Telegram API. You will also need the **CHAT_ID** where the bot's messages will be sent, or the **CHAT_ID** and **TOPIC_ID** if you have topics enabled in the group.\n\nConfiguration data you must add to `.env`.\n\n```bash\nTELEGRAM_BOT_TOKEN=Token from BotFather\nCHAT_ID=Telegram chat ID\nTOPIC_ID=Telegram chat topic ID\n```\n\nIf you don't have any topics in your chat, don't add **TOPIC_ID**.\n\n\u003e [!IMPORTANT]\n\u003e In order for the bot to be able to send messages to the specified chat ID, it must be added to this chat.\n\nAfter filling in `.env` and adding the **bot** to the chat, the bot will work correctly and send messages _every time the schedule changes_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblazzed21%2Fumte-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblazzed21%2Fumte-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblazzed21%2Fumte-calendar/lists"}