animetosho / Nyuu

Flexible usenet binary posting tool
215 stars 30 forks source link

Give subfolder(s) path into config overrides subject name #83

Open scriptzteam opened 3 years ago

scriptzteam commented 3 years ago

Hi, it is possible to have in config subfolder(s) path? I overwrite it into nzb subject name after upload but need give subject names back subfolders path

overrides: {
                // here you can override values for NZB <file> entries.....

thx!

animetosho commented 3 years ago

What do you mean by "subfolder(s) path" - the full path of the file as specified in the command line? If so, --filename "{filename}" can be used to preserve the full filename, as specified.

In functions, you can manipulate the filename as you like, via require('path').basename( ... ) and similar.

scriptzteam commented 3 years ago

i mean when i upload sampledir:

sampledir: file_1.txt /subdir/file2.txt /subdir1/file3.txt

All those getting removed subdir names in subject name so became for example file3.txt, i want that file3_.txt after download ends in /sub_dir1/

animetosho commented 3 years ago

If I understand you correctly, --filename "{filename}" is what you want.
Otherwise, I'm confused as to what you're exactly after.

nonspin commented 3 years ago

I don't think nyuu touches the FS - or the structure for that matter. RAR&ZIP are capable of flattening a directory - pulling all files from a sub_dir to the work_dir.

Not sure if ParPar (or any other Par2) has such feature and 'restore(s)' the files to root flattened..

Since i'm somewhat confused what you mean ... here's a wild one: You aren't trying to submit "/" in --subject ? I think it'll break 'zeh serf'