animetosho / Nyuu

Flexible usenet binary posting tool
215 stars 30 forks source link

Using Math random in placeholder is not calculated #119

Closed Sonic3R closed 10 months ago

Sonic3R commented 10 months ago

Hi,

I want to randomize for each post a name, I bash/shell (myfile.sh) file I have:

nyuu -h $HOST1 -u $USER1 -p $PASS1 -P 119 -n10 --from '{rand(Math.floor(Math.random()*(11-1)+1))}@{rand(Math.floor(Math.random()*(3-1)+1))}.{rand(Math.floor(Math.random()*(2-1)+1))}' -s '{rand(Math.floor(Math.random()*(15-5)+5))}' --nzb-subject '{filename} yEnc ({part}/{parts})' -o $pathToNzb $tmpFolder

and after posting, the poster name looks like: {rand(Math.floor(Math.random()*(11-1)+1))}@{rand(Math.floor(Math.random()*(3-1)+1))}.{rand(Math.floor(Math.random()*(2-1)+1))} meant that is not "parsed" or translated

same thing happens to -s, but for --nzb-subject works fine means the string results correct format.

Do I do something wrong ?