Trying to import a whole YT channel via CLI
-
Two ways I am trying to do this. The cloudron documentation way gives me this error in the CLI:
bash: q2: Read-only file system
The way as outlined by PeerTube documentation:
$ node {dist/server/tools/peertube-import-videos.js \ -u 'PEERTUBE_URL' \ -U 'PEERTUBE_USER' \ --password 'PEERTUBE_PASSWORD' \ --target-url 'TARGET_URL'
where TARGET_URL is the video, channel, playlist or users.
The error I receive in Cloudron peertube CLI:
internal/modules/cjs/loader.js:983 throw err; ^ Error: Cannot find module '/app/code/server/tools/peertube-import-videos.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15) at Function.Module._load (internal/modules/cjs/loader.js:862:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) at internal/main/run_main_module.js:18:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } I am assuming /app/code/server/ is the Cloudron equivalent to dist/server/ ... Any ideas?
-
@jordanurbs where does the internal/ dir live?
try to run the command from it's parent dir.
-
@robi I'm afraid I don't understand. The cloudron app CLI puts me into /app/code/server by default so I am assuming that is where the app lives.
-
Solved it, this is where the js file lives
node dist/scripts/create-import-video-file-job.js
It doesn't seem to use "-u" though so there may be updated documentation I have not stumbled upon yet
-
@jordanurbs is this new in the latest release vs the older release?
-
@robi I am using the latest release however this is functionality that has been around since at least the previous version..
-
@jordanurbs odd that there are two different scripts for it.
-
@jordanurbs Ah thanks, I will fix the docs accordingly.
-
@girish thanks.. is the 'peertube' cli command only for the cloudron CLI or is that what I would also use in the app's own terminal on the cloudron interface? Aside from the missing script file, I should be able to run commands in the app terminal using the same commands as the peertube documentation, right?
-
@jordanurbs Cloudron CLI terminal (via exec) and app's terminal on the web ui are one and the same. You should be able to run commands as per the peertube docs.