mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 10:56:57 -05:00
Update CONTRIBUTING.md
This commit is contained in:
@@ -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)
|
- `channel`: The object describing the current channel (xmltv_id, site_id, name, lang)
|
||||||
- `date`: The 'dayjs' instance with the requested date
|
- `date`: The 'dayjs' instance with the requested date
|
||||||
@@ -427,7 +434,7 @@ To run scripts use the `npm run <script-name>` command.
|
|||||||
- `api:generate`: generates a JSON file with all channels for the [iptv-org/api](https://github.com/iptv-org/api) repository.
|
- `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:lint`: сhecks the channel lists for syntax errors.
|
||||||
- `channels:parse`: generates a list of channels based on the site configuration.
|
- `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:edit`: utility for quick channels mapping.
|
||||||
- `channels:validate`: checks the description of channels for errors.
|
- `channels:validate`: checks the description of channels for errors.
|
||||||
- `sites:init`: creates a new site config from the template.
|
- `sites:init`: creates a new site config from the template.
|
||||||
|
|||||||
Reference in New Issue
Block a user