mirror of
https://github.com/iptv-org/epg
synced 2026-09-11 06:16:50 -04:00
Update grab.ts
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import { loadJs, parseProxy, parseNumber, parseList } from '../../core'
|
|
||||||
import { Logger, Timer, Collection, Template } from '@freearhey/core'
|
import { Logger, Timer, Collection, Template } from '@freearhey/core'
|
||||||
import epgGrabber, { EPGGrabber, EPGGrabberMock } from 'epg-grabber'
|
import epgGrabber, { EPGGrabber, EPGGrabberMock } from 'epg-grabber'
|
||||||
import { CurlBody } from 'curl-generator/dist/bodies/body'
|
import { CurlBody } from 'curl-generator/dist/bodies/body'
|
||||||
@@ -15,6 +14,14 @@ import { data, loadData } from '../../api'
|
|||||||
import dayjs, { Dayjs } from 'dayjs'
|
import dayjs, { Dayjs } from 'dayjs'
|
||||||
import merge from 'lodash.merge'
|
import merge from 'lodash.merge'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
import {
|
||||||
|
parseBooleanOrString,
|
||||||
|
parseBoolean,
|
||||||
|
parseNumber,
|
||||||
|
parseProxy,
|
||||||
|
parseList,
|
||||||
|
loadJs
|
||||||
|
} from '../../core'
|
||||||
|
|
||||||
program
|
program
|
||||||
.addOption(
|
.addOption(
|
||||||
@@ -55,11 +62,19 @@ program
|
|||||||
.env('MAX_CONNECTIONS')
|
.env('MAX_CONNECTIONS')
|
||||||
)
|
)
|
||||||
.addOption(
|
.addOption(
|
||||||
new Option('--gzip [path]', 'Create a compressed version of the guide as well').env('GZIP')
|
new Option('--gzip [path]', 'Create a compressed version of the guide as well')
|
||||||
|
.argParser(parseBooleanOrString)
|
||||||
|
.env('GZIP')
|
||||||
)
|
)
|
||||||
.addOption(new Option('--json [path]', 'Create a JSON version of the guide as well').env('JSON'))
|
.addOption(
|
||||||
.addOption(new Option('--curl', 'Display each request as CURL').env('CURL'))
|
new Option('--json [path]', 'Create a JSON version of the guide as well')
|
||||||
.addOption(new Option('--debug', 'Enable debug mode').env('DEBUG'))
|
.argParser(parseBooleanOrString)
|
||||||
|
.env('JSON')
|
||||||
|
)
|
||||||
|
.addOption(
|
||||||
|
new Option('--curl', 'Display each request as CURL').argParser(parseBoolean).env('CURL')
|
||||||
|
)
|
||||||
|
.addOption(new Option('--debug', 'Enable debug mode').argParser(parseBoolean).env('DEBUG'))
|
||||||
.parse()
|
.parse()
|
||||||
|
|
||||||
interface GrabOptions {
|
interface GrabOptions {
|
||||||
|
|||||||
Reference in New Issue
Block a user