use command arg instead of env vars
This commit is contained in:
parent
a582cf4d6d
commit
dd13d1157a
2 changed files with 8 additions and 7 deletions
|
@ -4,7 +4,8 @@ It downloads clyps!
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- Set `CLYP_TOKEN` to your Clyp `Authorization: Bearer` session token.
|
- Retrieve your Clyp access token from your browser. This should be under
|
||||||
- `node clyp-downloader.cjs`
|
Developer Tools > Storage > Local Storage > `accessToken`.
|
||||||
|
- `node clyp-downloader.cjs <accessToken>`
|
||||||
- ???
|
- ???
|
||||||
- Profit
|
- Profit
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
const process = require("process");
|
const process = require("process");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
const TOKEN = process.env["CLYP_TOKEN"];
|
if (process.argv.length != 3) {
|
||||||
|
console.log("Usage: node clyp-downloader.cjs <CLYP_TOKEN>");
|
||||||
if (!TOKEN) {
|
process.exit(0);
|
||||||
console.error("No CLYP_TOKEN provided!");
|
|
||||||
process.exit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TOKEN = process.argv[2];
|
||||||
|
|
||||||
class ClypUpload {
|
class ClypUpload {
|
||||||
/**
|
/**
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue