From 8a7b682205c243a77388db0c1a65a06c6af683bd Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Wed, 29 Oct 2025 07:59:17 +0300 Subject: [PATCH] Update CONTRIBUTING.md --- CONTRIBUTING.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5e9586b..e7089e05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,9 +66,16 @@ module.exports = { } ``` -### Context Object +### Request Context Object -From each function in `config.js` you can access a `context` object containing the following data: +Inside `url()`, `logo()`, `request.data()`, `request.headers()` functions in `*.config.js` you can access a `context` object containing the following data: + +- `channel`: The object describing the current channel (xmltv_id, site_id, name, lang) +- `date`: The 'dayjs' instance with the requested date + +## Parser Context Object + +Inside `parser()` function in `*.config.js` you can access a `context` object containing the following data: - `channel`: The object describing the current channel (xmltv_id, site_id, name, lang) - `date`: The 'dayjs' instance with the requested date @@ -427,7 +434,7 @@ To run scripts use the `npm run ` command. - `api:generate`: generates a JSON file with all channels for the [iptv-org/api](https://github.com/iptv-org/api) repository. - `channels:lint`: сhecks the channel lists for syntax errors. - `channels:parse`: generates a list of channels based on the site configuration. -- `channels:parse`: formats `*.channels.xml` files. The process involves removing invalid `xmltv_id`, adding missing Feed ID, and sorting the list. +- `channels:format`: formats `*.channels.xml` files. The process involves removing invalid `xmltv_id`, adding missing Feed ID, and sorting the list. - `channels:edit`: utility for quick channels mapping. - `channels:validate`: checks the description of channels for errors. - `sites:init`: creates a new site config from the template.