NATION

PASSWORD

nstg-web (web app to auto-TG nations)

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

nstg-web (web app to auto-TG nations)

Postby Auralia » Sat Dec 23, 2017 9:07 am

nstg-web

nstg-web is a free and open source web application that allows you to easily send telegrams to a list of NationStates nations defined using a powerful query language called Telegram Recipient Language.

nstg-web features the following:
  • ability to send telegrams to complex sets of nations defined using TRL
  • a continuous mode that periodically updates the recipients list with new nations that match the provided TRL string, which is useful for recruitment purposes
  • a dry-run mode that allows you to test TRL strings
  • progress reporting
  • rate-limiting
  • ability to save configuration
  • ability to automatically save past recipients to avoid sending a nation the same telegram twice

Usage

The latest version of nstg-web can be accessed here. Usage should be fairly self-explanatory; however, if you have any questions, you can ask them here and I'll answer them as soon as I can.

You can also view the source code on GitHub.

License

nstg-web is licensed under the Apache License 2.0.
Last edited by [violet] on Mon Jan 01, 2018 3:41 pm, edited 2 times in total.
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
United Massachusetts
Minister
 
Posts: 2555
Founded: Jan 17, 2016
Liberal Democratic Socialists

Postby United Massachusetts » Sat Dec 23, 2017 9:11 am

YAY!

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Sat Dec 23, 2017 9:15 am

Keep in mind that this is alpha-quality software and hasn't been fully tested.

It would be a very good idea to initially use the "dry run" feature to verify that you'll be sending telegrams to the correct nations.
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Frisbeeteria
Senior Game Moderator
 
Posts: 24637
Founded: Dec 16, 2003
Anarchy

Postby Frisbeeteria » Sat Dec 23, 2017 9:25 am

Regarding recruitment:
Recruitment telegram (One telegram every 180 seconds)
Non-recruitment telegram (One telegram every 30 seconds)

Does selecting the appropriate checkbox on your app also check the checkbox on the telegram? Please make it do so if it's not set up that way.

Also bear in mind that recruitment is for "a region or organization". It should be clear in your app that organizations need to use the Recruitment checkbox. And did you intentionally leave off Campaigns?

Edit: I see that this uses the Telegram ID field to set up the telegram. Shouldn't the rate limit automatically set itself based on the TG settings? If people try to send recruitment messages via the non-recruitment setting, it seems to me you'd be sending a lot of superfluous calls to the API.
Last edited by Frisbeeteria on Sat Dec 23, 2017 9:31 am, edited 1 time in total.

User avatar
United Massachusetts
Minister
 
Posts: 2555
Founded: Jan 17, 2016
Liberal Democratic Socialists

Postby United Massachusetts » Sat Dec 23, 2017 9:27 am

Frisbeeteria wrote:Regarding recruitment:
Recruitment telegram (One telegram every 180 seconds)
Non-recruitment telegram (One telegram every 30 seconds)

Does selecting the appropriate checkbox on your app also check the checkbox on the telegram? Please make it do so if it's not set up that way.

Also bear in mind that recruitment is for "a region or organization". It should be clear in your app that organizations need to use the Recruitment checkbox.

And did you intentionally leave off Campaigns?

Campaigns are non-recruitment in NSAutoTelegram.

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Sat Dec 23, 2017 9:49 am

Frisbeeteria wrote:Regarding recruitment:
Recruitment telegram (One telegram every 180 seconds)
Non-recruitment telegram (One telegram every 30 seconds)

Does selecting the appropriate checkbox on your app also check the checkbox on the telegram? Please make it do so if it's not set up that way.

[...]

Edit: I see that this uses the Telegram ID field to set up the telegram. Shouldn't the rate limit automatically set itself based on the TG settings? If people try to send recruitment messages via the non-recruitment setting, it seems to me you'd be sending a lot of superfluous calls to the API.

As far as I know, there's no way to determine whether a telegram is recruitment/campaign/none of the above using the API.

Frisbeeteria wrote:Also bear in mind that recruitment is for "a region or organization". It should be clear in your app that organizations need to use the Recruitment checkbox.

This should probably be added to the telegram API rules, which right now simply distinguish between "Recruitment TGs" and "Non-recruitment TGs" without defining the term.

Frisbeeteria wrote:And did you intentionally leave off Campaigns?

Campaigns don't have a special rate limit.
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Vulturret
Diplomat
 
Posts: 625
Founded: Aug 23, 2017
Ex-Nation

Postby Vulturret » Sat Dec 23, 2017 7:59 pm

For the record, a line near the bottom of the original post says "nsth-web," as opposed to "nstg-web." But hey, that's an innocent mistake. I like the functionality and easy usage of the tool, in my opinion it's a lot better than other telegramming programs I've looked at. Overall, you did an excellent job on the app, and I absolutely adore the fact that it runs on a web browser as opposed to requiring a separate program to be used, which is immensely useful for numerous indivials in so many different situations. I applaud your work on the program! :clap: Happy holidays!
Emperor of the Ragerian Imperium
Statsminister of Balder

Patriarch of House Griffin, High King of Domlar, King of Arin, King of Haggir, King of Don, King of Fola, Grand Duke of Jorn, High Patrician of Kola, Chieftain of the Amir, Warmaster of Alaan, Baselius of Tol, Samrat of Ayn, and Grand High Magistrate of Korrer
Member of the Storting of Balder
Styled Knight of Thor in Balder
Member of the Citizens' Assembly Advisory Board of Europeia
Minister of Culture of Europeia
Minister of Communications of Balder
Citizens' Assembly Chair of Europeia
Speaker of the Rejected Realms
Imperator of the Dark Vanquishers
Caliph of the Arabian Empire

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Sat Dec 23, 2017 8:28 pm

Vulturret wrote:For the record, a line near the bottom of the original post says "nsth-web," as opposed to "nstg-web."

Thanks for catching that!
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Caelorum Founder
Political Columnist
 
Posts: 3
Founded: Dec 22, 2017
Ex-Nation

Postby Caelorum Founder » Sat Dec 23, 2017 8:51 pm

It appears not to want to comply with the rate limit. I have it recruiting, but it is telegrammint quicker than it is supposed to, then saying that it failed to send to someone.

Edit: After turning on verbose mode, that appears to be what is happening. Is it supposed to do that, or is it supposed to wait every 3 minutes?

Edit2: I don’t know what happened, I had the right box checked. Working now, but you might want to examine the code.

Edit3: Failing again.
Last edited by Caelorum Founder on Sat Dec 23, 2017 9:28 pm, edited 3 times in total.

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Sat Dec 23, 2017 9:33 pm

Caelorum Founder wrote:It appears not to want to comply with the rate limit. I have it recruiting, but it is telegrammint quicker than it is supposed to, then saying that it failed to send to someone.

Edit: After turning on verbose mode, that appears to be what is happening. Is it supposed to do that, or is it supposed to wait every 3 minutes?

Edit2: I don’t know what happened, I had the right box checked. Working now, but you might want to examine the code.

Edit3: Failing again.

Did you select the "recruitment" rate limit?

Can you provide any specific log messages?
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Anarhic Empire of Byzantine
Lobbyist
 
Posts: 19
Founded: Jul 02, 2016
Ex-Nation

Postby Anarhic Empire of Byzantine » Sun Dec 24, 2017 2:19 am

When I set API rate limit to recruitment telegram, igot HTTP Error code 429...

I use
new[25];

Image

User avatar
Caelorum Founder
Political Columnist
 
Posts: 3
Founded: Dec 22, 2017
Ex-Nation

Postby Caelorum Founder » Sun Dec 24, 2017 6:25 am

Auralia wrote:
Caelorum Founder wrote:It appears not to want to comply with the rate limit. I have it recruiting, but it is telegrammint quicker than it is supposed to, then saying that it failed to send to someone.

Edit: After turning on verbose mode, that appears to be what is happening. Is it supposed to do that, or is it supposed to wait every 3 minutes?

Edit2: I don’t know what happened, I had the right box checked. Working now, but you might want to examine the code.

Edit3: Failing again.

Did you select the "recruitment" rate limit?

Can you provide any specific log messages?
Yes, I did set the recruitment rate, and I got the same thing as Byzantine

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Sun Dec 24, 2017 7:53 am

I think this bug should now be fixed.
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Caelorum Founder
Political Columnist
 
Posts: 3
Founded: Dec 22, 2017
Ex-Nation

Postby Caelorum Founder » Sun Dec 24, 2017 10:07 am

Auralia wrote:I think this bug should now be fixed.
It works, at least right now. Thanks so much!

User avatar
Imperium Anglorum
Powerbroker
 
Posts: 9504
Founded: Aug 26, 2013
Left-Leaning College State

Postby Imperium Anglorum » Mon Dec 25, 2017 7:37 am

Auralia wrote:As far as I know, there's no way to determine whether a telegram is recruitment/campaign/none of the above using the API.

I proposed a shard to do this in the main API thread. I don't think it was ever acted upon. (Instead of sendTG, I wanted something like a TGinfo shard or something like that.)



Also, why did you design your telegrams language not to use the standard telegrams recipient format?
Last edited by Imperium Anglorum on Mon Dec 25, 2017 7:39 am, edited 1 time in total.

Author: 1 SC and 33 GA resolutions
Maintainer: GA Passed Resolutions
Developer: Communiqué and InfoEurope
Toxic villainous globalist kittehs
Delegate for Europe
Elsie Mortimer Wellesley (EMW); OOC unless otherwise indicated
Ideological Bulwark 285, WALL delegate
Dastardly villain providing free services to the community sans remuneration

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Mon Dec 25, 2017 8:34 am

Imperium Anglorum wrote:
Auralia wrote:As far as I know, there's no way to determine whether a telegram is recruitment/campaign/none of the above using the API.

I proposed a shard to do this in the main API thread. I don't think it was ever acted upon. (Instead of sendTG, I wanted something like a TGinfo shard or something like that.)

Yes, I'd definitely use that if it existed.

Imperium Anglorum wrote:Also, why did you design your telegrams language not to use the standard telegrams recipient format?

The standard format -- which I believe was originally derived from the format I used for NationStates AutoTelegram -- doesn't allow you to specify multiple arguments for a single category type, nor does it allow you to create your own groups. I decided to use an alternate syntax to support these features.

The standard format also made some confusing decisions -- "+" does not conventionally mean "filter by inclusion", it means "add".
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Little St Nick
Bureaucrat
 
Posts: 47
Founded: Jul 25, 2017
Scandinavian Liberal Paradise

Postby Little St Nick » Mon Dec 25, 2017 6:22 pm

Nice Christmas gift. Thank you for sharing. I hope Santa was good to you!

User avatar
Vuori Kunin-Grrs
Envoy
 
Posts: 212
Founded: Jan 06, 2016
Ex-Nation

Postby Vuori Kunin-Grrs » Thu Dec 28, 2017 7:43 pm

This is an amazing development of your previous NationStates Autotelegrammer - a Christmas gift for us NS recruiters. Thank you.

In using your recruiter, I've gotten the following, where afterwards, the program simply stops. What is the problem?
error: Failed to send telegram to romeera.
error: [Error: XHR error]

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Mon Jan 01, 2018 9:22 am

Vuori Kunin-Grrs wrote:This is an amazing development of your previous NationStates Autotelegrammer - a Christmas gift for us NS recruiters. Thank you.

In using your recruiter, I've gotten the following, where afterwards, the program simply stops. What is the problem?
error: Failed to send telegram to romeera.
error: [Error: XHR error]

What browser are you using? Do you have verbose logging enabled? Can you give me any other information?
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Vuori Kunin-Grrs
Envoy
 
Posts: 212
Founded: Jan 06, 2016
Ex-Nation

Postby Vuori Kunin-Grrs » Mon Apr 16, 2018 4:04 pm

Auralia wrote:
Vuori Kunin-Grrs wrote:This is an amazing development of your previous NationStates Autotelegrammer - a Christmas gift for us NS recruiters. Thank you.

In using your recruiter, I've gotten the following, where afterwards, the program simply stops. What is the problem?
error: Failed to send telegram to romeera.
error: [Error: XHR error]

What browser are you using? Do you have verbose logging enabled? Can you give me any other information?
Apologizes for the long delayed reply, but it appears to only appear when my Wifi cuts off, often for no more than 5 minutes.

Could you add some sort of feature that gives permission for the API client to continually retry sending if Wifi temporarily cuts off for a custom amount of time?

User avatar
Teloanaple
Political Columnist
 
Posts: 2
Founded: Apr 13, 2018
Ex-Nation

Postby Teloanaple » Wed Apr 18, 2018 12:35 pm

Auralia i am getting the error saying I am exceeding my rate limit. Similar to the problem a bit up the page but this time it still continues. Also I wanted to send 25 telegrams but end up only sending one or a error.
Last edited by Teloanaple on Wed Apr 18, 2018 12:38 pm, edited 1 time in total.

User avatar
Auralia
Senator
 
Posts: 4971
Founded: Dec 15, 2011
New York Times Democracy

Postby Auralia » Fri Apr 20, 2018 1:18 pm

Vuori Kunin-Grrs wrote:Could you add some sort of feature that gives permission for the API client to continually retry sending if Wifi temporarily cuts off for a custom amount of time?

I'll look into the possibility of implementing retry support.

Teloanaple wrote:Auralia i am getting the error saying I am exceeding my rate limit. Similar to the problem a bit up the page but this time it still continues. Also I wanted to send 25 telegrams but end up only sending one or a error.

Are you doing something else with the API at the same time?
Catholic Commonwealth of Auralia
Also known as Railana

"Amor sequitur cognitionem."

User avatar
Angevin Founder
Civil Servant
 
Posts: 7
Founded: Jun 06, 2018
Ex-Nation

Postby Angevin Founder » Tue Sep 18, 2018 11:46 pm

I wasn't sure if this was the correct place to put this.

After following the steps for this client it keeps saying that the telegrams are failing to send. It will bring up a list of nations that its going to TG and then slowly fails them one by one. Help?
Last edited by Angevin Founder on Tue Sep 18, 2018 11:47 pm, edited 1 time in total.

User avatar
Kaystein
Diplomat
 
Posts: 654
Founded: Jan 12, 2019
Left-Leaning College State

Postby Kaystein » Mon Sep 23, 2019 2:46 pm

I just got a surprising telegram sent to my inbox: https://pasteboard.co/IyNlPvp.png

Apparently, it's from somebody replying to the automated API recruitment telegrams I'm sending out using this client.

Just for reference, this is my current configuration (minus my secret key, tgid, client key): https://pasteboard.co/IyNnbW9.png

Now, I assumed that since "recruitment telegram" is toggled, that would mean that the API system would send telegrams marked as "recruitment" so it gets filtered correctly.

So help me out here; if somebody that blocked recruitment telegrams is getting one of the automated API telegrams being sent through using nstg-web, what's the glitch? Is it something on my end or is it something wrong with the client, or something wrong with NationStates API?

User avatar
Marxist Germany
Ambassador
 
Posts: 1943
Founded: Jun 07, 2018
Corporate Bordello

Postby Marxist Germany » Mon Sep 23, 2019 2:58 pm

No, your template must be marked as Recruitment before you click send to tag:API, you mustve forgotten that step.
Country represents RL views mostly. Not Marxist anymore.
Author of GA#461, GA#470, GA#477, GA#481, GA#486 (co-author), and SC#295

Ex-delegate of The United Federations; citizen of 10000 Islands | Gaming User#0721(Discord)
RP name: Germany
The National Factbook (WIP)
Ambassador Klaus Schmidt
Political Compass
PolitiStates Result
Pro:Laissez-faire, Cultural Nationalism, Guns, Free speech, Christianity, United Ireland.
Anti:"Progressivism", Abortion, Transgenderism, Socialism, Interventionism, Mass-migration.

Next

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: All Wild Things, Ballotonia, Dwarf Land4, HowFastCanIKillEveryone, Kenmoria, Skundi, The Imperial Reach, Tolopel, Wansul

Advertisement

Remove ads