chore: update README CLI usage without old dependency

pull/356/head
Romain 5 months ago
parent c8d7cf2798
commit aa6c9a906f

@ -73,10 +73,9 @@ docker run -v `pwd`:/work thumbsupgallery/thumbsup [...]
This reflects the CLI for the latest code on `master`.
For the latest published version please refer to the [docs on the website](https://thumbsup.github.io).
<!-- START cli -->
<!--STARTCLI-->
```
Usages:
thumbsup [required] [options]
thumbsup --config config.json
@ -161,7 +160,7 @@ Deprecated:
--download-photos Target of the photo download links [choices: "large", "copy", "symlink", "link"]
--download-videos Target of the video download links [choices: "large", "copy", "symlink", "link"]
--download-link-prefix Path or URL prefix for linked downloads [string]
--usage-stats Enable anonymous usage statistics [boolean] [default: false]
--usage-stats Enable anonymous usage statistics [boolean]
Options:
--version Show version number [boolean]
@ -172,8 +171,7 @@ Options:
per argument, not including the leading "--". For example:
{ "sort-albums-by": "start-date" }
```
<!-- END cli -->
<!--ENDCLI-->
## Contributing

126
package-lock.json generated

@ -46,7 +46,6 @@
"c8": "^8.0.1",
"glob": "^10.3.10",
"gm": "^1.25.0",
"injectmd": "^1.0.0",
"markdown-toc": "^1.2.0",
"mocha": "^10.2.0",
"mock-fs": "^5.2.0",
@ -1225,12 +1224,6 @@
"node": ">=0.10.0"
}
},
"node_modules/cliclopts": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cliclopts/-/cliclopts-1.1.1.tgz",
"integrity": "sha1-aUMcfLWvcjd0sNORG0w3USQxkQ8=",
"dev": true
},
"node_modules/cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
@ -3120,43 +3113,6 @@
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/injectmd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/injectmd/-/injectmd-1.0.0.tgz",
"integrity": "sha1-22AYCqVgLYA/mv7BozBSKD52iy8=",
"dev": true,
"dependencies": {
"bl": "^1.1.2",
"cliclopts": "^1.1.1",
"minimist": "^1.2.0",
"pump": "^1.0.1",
"readable-stream": "^2.0.5",
"split2": "^2.0.1"
},
"bin": {
"node-injectmd": "bin/cli.js"
}
},
"node_modules/injectmd/node_modules/bl": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz",
"integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==",
"dev": true,
"dependencies": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
}
},
"node_modules/injectmd/node_modules/pump": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
"integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
"dev": true,
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"node_modules/internal-slot": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",
@ -5988,25 +5944,6 @@
"node": "*"
}
},
"node_modules/split2": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
"integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
"dev": true,
"dependencies": {
"through2": "^2.0.2"
}
},
"node_modules/split2/node_modules/through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"dev": true,
"dependencies": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
}
},
"node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
@ -7978,12 +7915,6 @@
"string-width": "^1.0.1"
}
},
"cliclopts": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cliclopts/-/cliclopts-1.1.1.tgz",
"integrity": "sha1-aUMcfLWvcjd0sNORG0w3USQxkQ8=",
"dev": true
},
"cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
@ -9380,42 +9311,6 @@
"resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz",
"integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g=="
},
"injectmd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/injectmd/-/injectmd-1.0.0.tgz",
"integrity": "sha1-22AYCqVgLYA/mv7BozBSKD52iy8=",
"dev": true,
"requires": {
"bl": "^1.1.2",
"cliclopts": "^1.1.1",
"minimist": "^1.2.0",
"pump": "^1.0.1",
"readable-stream": "^2.0.5",
"split2": "^2.0.1"
},
"dependencies": {
"bl": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz",
"integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==",
"dev": true,
"requires": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
}
},
"pump": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
"integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
}
}
},
"internal-slot": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",
@ -11549,27 +11444,6 @@
"through": "2"
}
},
"split2": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
"integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
"dev": true,
"requires": {
"through2": "^2.0.2"
},
"dependencies": {
"through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"dev": true,
"requires": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
}
}
}
},
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",

@ -66,7 +66,6 @@
"c8": "^8.0.1",
"glob": "^10.3.10",
"gm": "^1.25.0",
"injectmd": "^1.0.0",
"markdown-toc": "^1.2.0",
"mocha": "^10.2.0",
"mock-fs": "^5.2.0",

@ -1,11 +0,0 @@
#!/bin/bash -e
PATH=$PATH:./node_modules/.bin
function cli {
echo "\`\`\`"
node bin/thumbsup.js --help
echo "\`\`\`"
}
echo "$(cli)" | node-injectmd -t cli -i README.md

@ -0,0 +1,11 @@
const fs = require('node:fs')
const child = require('node:child_process')
// get latest CLI help text
const output = child.execSync('node bin/thumbsup.js --help')
const codeblock = '```' + output + '```'
// update README file
const readme = fs.readFileSync('README.md', 'utf-8')
const updated = readme.replace(/<!--STARTCLI-->[\s\S]*?<!--ENDCLI-->/, `<!--STARTCLI-->\n${codeblock}\n<!--ENDCLI-->`)
fs.writeFileSync('README.md', updated)
Loading…
Cancel
Save