Added npm script for running application.
This commit is contained in:
parent
7fd77d5232
commit
6131d0a76c
|
@ -33,7 +33,7 @@ reddit-post-dump requires a arbitrarily recent version of Node.js. Before use, d
|
|||
`npm install`
|
||||
|
||||
## Usage
|
||||
`node app.js (--user <username> | --post <post-id>)`
|
||||
`npm start -- (--user <username> | --post <post-id>)`
|
||||
|
||||
### Optional arguments
|
||||
* `--users <username> [<username>...]`: You may fetch posts from multiple users by supplying a space-separated list of usernames to `--users`.
|
||||
|
@ -43,8 +43,9 @@ reddit-post-dump requires a arbitrarily recent version of Node.js. Before use, d
|
|||
* `--ignore <prop> [<prop>...]`: Ignore posts with any of the following properties: `pinned`, `stickied`, `hidden`, `over_18`, `spoiler`.
|
||||
|
||||
### Examples
|
||||
* `node app.js --user=ThePendulum`
|
||||
* `node app.js --user=ThePendulum --limit=10 --sort=top`
|
||||
* `npm start -- --user AWildSketchAppeared`
|
||||
* `npm start -- --users ShittyWatercolour AwildSketchAppeared --limit 10 --sort top`
|
||||
* `npm start -- --user GallowBoob --limit 50 --ignore pinned stickied`
|
||||
|
||||
#### Reddit videos
|
||||
The audio stream for videos with sound uploaded to reddit directly (v.redd.it) is hosted separately, and will be saved as such alongside the video (typically {filename}-0 and {filename}-1). For them to be muxed into a single file automatically, **ffmpeg must be available on the system**, and the separate source files will be deleted when muxing has succeeded. If ffmpeg is not available, the separate files will remain as is.
|
||||
|
|
|
@ -4,7 +4,12 @@
|
|||
"description": "Reddit user post dump tool with versatile saving patterns and fallback searches for deleted users.",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"start": "node src/app.js"
|
||||
},
|
||||
"pkg": {
|
||||
"scripts": "src/app.js",
|
||||
"out-path": "dist/",
|
||||
"assets": "config/*"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const config = require('config');
|
||||
const yargs = require('yargs');
|
||||
|
||||
module.exports = yargs.option('users', {
|
||||
module.exports = yargs.command('npm start -- --user <username>').option('users', {
|
||||
alias: 'user',
|
||||
describe: 'Reddit usernames to fetch posts from',
|
||||
type: 'array'
|
||||
|
|
Loading…
Reference in New Issue