animetosho / Nyuu

Flexible usenet binary posting tool
221 stars 32 forks source link

"Newsgroups" in config.js correct syntax #92

Closed df-a closed 2 years ago

df-a commented 2 years ago

I am trying to post the a full post in several groups in one shot.

file config.js Newsgroups: 'alt.binaries.foo', 'alt.binaries.bar', 'alt.binaries.baz', 'alt.binaries.qux', // comma seperated list

This fails in the following way:

Newsgroups: 'alt.binaries.foo', 'alt.binaries.bar, 'alt.binaries.baz', 'alt.binaries.qux', // comma seperated list
                                                     ^

SyntaxError: Unexpected token ','

I tried this in config.json as well "groups": "alt.binaries.foo, alt.binaries.bar, alt.binaries.baz, alt.binaries.qux",

This one failed as:

[INFO] Reading file a3dbda194c850d48c55af9557d26cd25b.rar...
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article iJIScN7SSCxT31ZWQmXaH369-1635974524954@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article 6W6oDrun9BI25gu2SucU1HAl-1635974524950@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article PDXsMtFMfQNBG9MWyW8k4iNJ-1635974524953@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article rEnmgM7aLSDiejS9IP1JURxd-1635974524962@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article sS3is1SDGiDLhUCw9X0L9H96-1635974524963@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article segYJXihKVJNVWIktrXeHobo-1635974525818@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article 77NHUq7CIYdkA0glxIIzcTyG-1635974524956@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article mnc9o7xgD3l0DyEwdatMvMFx-1635974525819@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article 0SsgpJmPbj4Vo7sHidcZ7atU-1635974524955@nyuu; will retry (attempt 1/1)
[WARN] Got "441 Invalid newsgroup(s) line" response when posting article B7ZR83gSqDONwXWijTTBiBvP-1635974524957@nyuu; will retry (attempt 1/1)
[ERR ] NNTPError: Server could not accept post YIfeQQwHwu2tLIFdsKDSl3zM-1635974524950@nyuu, returned: 441 Invalid newsgroup(s) line (use `skip-errors` to ignore)

What is the correct syntax to specify multiple Newsgroups in the file config.js?

animetosho commented 2 years ago

config.js must adhere to valid Javascript. JSON is also acceptable, and well defined.
The Newsgroups header syntax is defined in RFC850 / RFC5536.

For your example, the correct syntax should be:

"groups": "alt.binaries.foo,alt.binaries.bar,alt.binaries.baz,alt.binaries.qux",

(i.e. no spaces between commas)

Note that whilst it's defined in the NNTP standard, it's possible that servers don't support posting to multiple groups.

df-a commented 2 years ago

Thank you very much, I must reopen my JS books.

Works perfectly now.