NATION

PASSWORD

[APP] NationStates AutoTelegram

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

[APP] NationStates AutoTelegram

Postby Auralia » Mon Jun 04, 2012 4:59 pm

NationStates AutoTelegram has been replaced by nstg-web and is no longer maintained.

NationStates AutoTelegram

Summary
NationStates AutoTelegram is a free and open source client for the NationStates Telegrams API.

Documentation

System Requirements

Tutorial
  1. Obtain an API client key, and type it into the API client key textbox on the Telegram tab page.
    • You can request an API client key from the NationStates moderators by submitting a Getting Help Request from the nation requesting the key.
      • You must provide a your region's name (preferably in "quotes", no initials) and your nation name.
      • You must also provide a short description (e.g. "For <regional> recruitment of both new and existing nations.").
      • The moderators don't want or need a copy of your proposed telegram, just a one-line description.
      • If your request is approved, you will receive a client key by telegram.
      • A client name will be provided, usually "@<region_name>@<nation_name>".
      • Only one API key can be issued per region. If someone already has your regions, you will have to work it out with the key owner. If they've died off, the mods will delete the old key and issue a new one.
      • The same key can be used for both recruitment and campaigning. Don't ask for a second key.
    • Do not share your client key with anyone.
    • If you obtain a new telegram ID and secret key (see below), you do not need to request a new client key.
  2. Obtain a telegram ID and secret key, and type them into the Telegram ID and Secret key textboxes respectively on the Telegram tab page.
    • You can obtain a telegram ID and secret key by sending your telegram on NationStates to "tag:api". Make sure that you mark the telegram as a recruitment or WA campaign telegram if appropriate. After sending the telegram, you will receive a telegram ID and secret key.
    • Do not share your secret key with anyone.
    • If you wish to change the text of your telegram, you must obtain a new telegram ID and secret key.
  3. Indicate whether the telegram associated with your telegram ID is a recruitment or non-recruitment telegram by clicking the appropriate radio button, so that the appropriate rate limit can be selected.
    • The rate limit for recruitment telegrams is currently 1 telegram every 180 seconds, while the limit for non-recruitment telegrams is 1 telegram every 30 seconds.
  4. Enter the recipients of your telegram into the Recipients textbox.
    • Recipients must be entered using the following format:
      • nation:<nation> : sends telegram to specified nation
      • region:<region> : sends telegram to all nations in specified region
      • tag:<tag> : sends telegrams to all nations in regions with the specified tag
      • special:(all, members, delegates, new) : sends telegrams to (all nations, all World Assembly members, all World Assembly delegates, 50 new nations)
      • recruitment:new : enables recruitment mode for new nations, which sends telegrams to new nations as they are created until the program is manually stopped; in the future this mode may support refounded nations through recruitment:refounded
    • Multiple recipients can be specified, separated by commas (e.g. nation:Auralia, nation:Christian Democrats sends telegrams to Auralia and Christian Democrats)
    • Appending a negative sign to any recipient specifically excludes that recipient, even if explicitly included elsewhere (e.g. region:Catholic, -nation:Auralia will send telegrams to all nations in Catholic except Auralia).
    • The following are common usage cases:
      • Mailing list: nation:<nation 1>, nation:<nation 2>, ... nation:<nation n>
      • GA campaign: special:delegates, -tag:No GA Campaigning (note that the No GA Campaigning tag may be removed some time in the future due to the new telegram system's spam controls)
      • SC campaign: special:delegates, -tag:No SC Campaigning (note that the No SC Campaigning tag may be removed some time in the future due to the new telegram system's spam controls)
      • General recruitment of new nations: recruitment:new
  5. Send your telegrams by clicking the Start button on the Status tab page.
    • You can cancel the telegramming process at any time by pressing Cancel. There may be a delay before the process is cancelled since it is running on a separate thread.
    • You can pause the telegramming process by clicking Pause. Click Resume to resume the process. Again, there may be a delay before the process is paused or resumed.
    • You should probably save a copy of the log after the process completes.

Technical Information
This program reports its UserAgent to the NationStates API as follows:
Code: Select all
NationStates AutoTelegram <version> (maintained by Auralia, currently used by client key <client key>)


Downloads
The latest version (0.4.0) can be downloaded from here. The source code is available on GitHub.

Changelog
  • Version 0.4.0:
    • Support for telegrams API
    • Added recruitment mode
    • Recipient input changes
    • UI changes
  • Version 0.3.0:
    • UI redesign
    • Bug fixes
    • Performance improvements
    • Simplification and reformatting of code base
    • Updates to readme and license
    • Certain features removed
  • Version 0.2.2:
    • Bug fixes
  • Version 0.2.1:
    • Bug fixes
  • Version 0.2:
    • %NATION% menu option
    • %REGION% feature and menu option
    • WA nations option on recipient dialog
    • Pause button
    • Cosmetic changes
    • Bug fixes
  • Version 0.1:
    • Initial public release

Copyright and License
Copyright (C) Auralia.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You must read and understand the NationStates mass telegramming and scripting rules before using the Software. You agree that the author of the Software is not responsible for any breaches of NationStates rules resulting from your use of the Software.

This program uses icons from the Silk Icon Set and the Tango Desktop Project.
Last edited by Auralia on Sat Dec 23, 2017 9:18 am, edited 41 times in total.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Mon Jun 04, 2012 4:59 pm

--- RESERVED ---
Last edited by Auralia on Mon Jun 04, 2012 5:01 pm, edited 1 time in total.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Mon Jun 04, 2012 5:01 pm

--- RESERVED ---
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Fischistan
Ambassador
 
Posts: 1384
Founded: Oct 16, 2011
Ex-Nation

Postby Fischistan » Mon Jun 04, 2012 5:42 pm

Interesting.
Does it check for failed security checks/spam timeouts and reattempt failed telegrams?
Also, can I ask how you managed to decompress .gz files using the .NET library?
Xavier D'Montagne
Fischistani Ambassador to the WA
Unibot II wrote:It's Carta. He CANNOT Fail. Only successes in reverse.
The Matthew Islands wrote:Knowledge is knowing the Tomato is a fruit. Wisdom is knowing not to put it in a fruit salad.
Anthony Delasanta wrote:its was not genocide it was ethnic cleansing...
Socorra wrote:A religion-free abortion thread is like a meat-free hamburger.
Help is on its Way: UDL
Never forget 11 September.
Never look off the edge of cliff on a segway.

11 September 1973, of course.

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Mon Jun 04, 2012 6:18 pm

Fischistan wrote:Does it check for failed security checks/spam timeouts and reattempt failed telegrams?


If a telegram fails - for whatever reason, including non-existent nations, security checks, etc. - it logs the error and moves on. Spam timeouts aren't a problem, since the program must wait 20 seconds between each telegram.

Fischistan wrote:Also, can I ask how you managed to decompress .gz files using the .NET library?


System.IO.Compression. Here's a brief snippet from the program:

Code: Select all
                FileStream open = new FileStream(pathInfo.FullName + "regions.xml.gz", FileMode.Open);
                GZipStream gzip = new GZipStream(open, CompressionMode.Decompress);

                File.Delete(pathInfo.FullName + "regions.xml");
                FileStream save = new FileStream(pathInfo.FullName + "regions.xml", FileMode.CreateNew);
                gzip.CopyTo(save);
Last edited by Auralia on Mon Jun 04, 2012 6:25 pm, edited 1 time in total.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Fischistan
Ambassador
 
Posts: 1384
Founded: Oct 16, 2011
Ex-Nation

Postby Fischistan » Mon Jun 04, 2012 6:32 pm

Auralia wrote:System.IO.Compression. Here's a brief snippet from the program:

Code: Select all
                FileStream open = new FileStream(pathInfo.FullName + "regions.xml.gz", FileMode.Open);
                GZipStream gzip = new GZipStream(open, CompressionMode.Decompress);

                File.Delete(pathInfo.FullName + "regions.xml");
                FileStream save = new FileStream(pathInfo.FullName + "regions.xml", FileMode.CreateNew);
                gzip.CopyTo(save);

Ah, thank you sooooooo much. I was using another method that involved a byte array buffer and it was just terribly complicated. Hopefully I can get this to work the same way in VB.
Xavier D'Montagne
Fischistani Ambassador to the WA
Unibot II wrote:It's Carta. He CANNOT Fail. Only successes in reverse.
The Matthew Islands wrote:Knowledge is knowing the Tomato is a fruit. Wisdom is knowing not to put it in a fruit salad.
Anthony Delasanta wrote:its was not genocide it was ethnic cleansing...
Socorra wrote:A religion-free abortion thread is like a meat-free hamburger.
Help is on its Way: UDL
Never forget 11 September.
Never look off the edge of cliff on a segway.

11 September 1973, of course.

User avatar
Diol
Ambassador
 
Posts: 1540
Founded: Aug 09, 2009
Ex-Nation

Postby Diol » Tue Jun 05, 2012 6:55 am

Could this send telegrams to all nations in your dossier?
the silver isles
An up and comming rp region with an active community!
I rp as the united vakali empire in all techs
Proud slaver state. All arguments accepted and answered.
Note: I am blind. Expect terrible grammar, as it is hard to skim posts with screen reader.

User avatar
Andacantra
Diplomat
 
Posts: 570
Founded: Jul 01, 2010
Ex-Nation

Postby Andacantra » Tue Jun 05, 2012 7:45 am

Diol wrote:Could this send telegrams to all nations in your dossier?

Presumably, if it lets you enter a list of nations - you could just get the list using the advanced dossier.

I'm not going to think about the implications for now, but this certainly seems like a nifty tool.
Abbey
Chief Kitty of the Cat Burglars
Bi-gameplayers: Raiding and defending because both are fun and ok
Nationstates Issues **SPOILER ALERT**

User avatar
Not a pipe
Diplomat
 
Posts: 750
Founded: Apr 18, 2012
Ex-Nation

Postby Not a pipe » Tue Jun 05, 2012 12:05 pm

Does it work on Mono?
View signature:
Viva la rivoluzione contro I moderatori fascisti!

I agree to put all of my messages here public domain please use them as public domain no copyright.

Patents should be abolished. Copyrights should be reduced.

The human population is already being too much! Let's make them get reduced over time instead.
D&D:
Name: Iuckqlwviv Kjugobe
Race: Illithid
Class: Wizard/Cerebremancer/Illithid Savant
Align: NG
Skills: scribe, sailor, search, languages, spot, listen, concentration, disable device, forgery, hide, healing, spellcraft, decipher script, ...
Spells: amanuensis, time hop, grease, force screen, modify memory, trace teleport, major creation, true seeing, extend tentacles, locate object, dimension door, object mirroring, prestidigitation, touch of health, ...

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Tue Jun 05, 2012 12:40 pm

Not a pipe wrote:Does it work on Mono?


Maybe. I haven't tested it.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Tue Jun 05, 2012 7:26 pm

Version 0.1 has been released. There shouldn't be any show-stopping bugs, but if you find any, please tell me immediately and I'll fix them ASAP.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Moronist Decisions
Minister
 
Posts: 2131
Founded: Jul 05, 2008
Authoritarian Democracy

Postby Moronist Decisions » Tue Jun 05, 2012 7:30 pm

Incidentally, would this take account of registered school classes who can't be TGed? (with the "class" tag)?
Note: Unless specifically specified, my comments shall be taken as those purely of Moronist Decisions and do not represent the views of the Republic/Region of Europeia.

Member of Europeia
Ideological Bulwark #255
IntSane: International Sanity for All

Author of GAR#194, GAR#198 and GAR#203.

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Tue Jun 05, 2012 7:33 pm

Moronist Decisions wrote:Incidentally, would this take account of registered school classes who can't be TGed? (with the "class" tag)?


It would try to TG them, fail, log the error and move on. This solution takes much less time, for both me to implement and the end-user to, well, use, than checking every nation to see if they're in a school region.
Last edited by Auralia on Tue Jun 05, 2012 7:34 pm, edited 1 time in total.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Wed Jun 06, 2012 4:59 pm

Am I to understand that nobody is interested in this, given that it's only received two downloads?

Ah, well, I still plan on using it.
Last edited by Auralia on Wed Jun 06, 2012 4:59 pm, edited 1 time in total.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Crushing Our Enemies
Ambassador
 
Posts: 1413
Founded: Nov 16, 2004
Corporate Police State

Postby Crushing Our Enemies » Wed Jun 06, 2012 6:50 pm

I like it! I must have been one of the two.
[violet] wrote:You are definitely not genial.
[violet] wrote:Congratulations to Crushing Our Enemies for making the first ever purchase. :)

User avatar
Nullarni
Ambassador
 
Posts: 1348
Founded: Sep 26, 2006
Ex-Nation

Postby Nullarni » Wed Jun 06, 2012 11:34 pm

I am interested as well. I just haven't had time to download it, (I am posting this from my phone, in case you were wondering why I don't just do it now.) ...And I was going to give it a couple days for any bugs to be worked out.
Proud founder of the NEW WARSAW PACT. Visitors welcome.

User avatar
Glen-Rhodes
Powerbroker
 
Posts: 9027
Founded: Jun 25, 2008
Ex-Nation

Postby Glen-Rhodes » Thu Jun 07, 2012 9:31 am

Very nice! You should add macros as a menu item, though. Also, the program consistently hangs on my PC when loading the font screen. I suspect this is because I have a large number of fonts, and the program loads the actual font faces, rather than just a simple list of them.

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Thu Jun 07, 2012 1:40 pm

Glen-Rhodes wrote:You should add macros as a menu item, though.


Could you give more detail as to what you mean? A macro to automate the entire process, or just to set the recipient information?

Glen-Rhodes wrote:Also, the program consistently hangs on my PC when loading the font screen. I suspect this is because I have a large number of fonts, and the program loads the actual font faces, rather than just a simple list of them.


Yes, the dialog does load the actual font faces, but I don't think I can change that. The FontDialog control doesn't seem to have an option to do that.
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Thu Jun 07, 2012 1:42 pm

Nullarni wrote:I am interested as well. I just haven't had time to download it, (I am posting this from my phone, in case you were wondering why I don't just do it now.) ...And I was going to give it a couple days for any bugs to be worked out.


Well, I don't think there are any bugs, given my testing, but I won't know for certain until a decent number of end-users test it out as well. That would include you... :p
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Glen-Rhodes
Powerbroker
 
Posts: 9027
Founded: Jun 25, 2008
Ex-Nation

Postby Glen-Rhodes » Thu Jun 07, 2012 3:19 pm

Auralia wrote:Could you give more detail as to what you mean? A macro to automate the entire process, or just to set the recipient information?

I don't know why I called it a macro. I meant to say variable. The %NATION% variable, for example.

Auralia wrote:Yes, the dialog does load the actual font faces, but I don't think I can change that. The FontDialog control doesn't seem to have an option to do that.

Pity. I don't need to change the font anyways. It's an isolated problem. I literally have over 1,000 fonts.

User avatar
Auralia
Senator
 
Posts: 4982
Founded: Dec 15, 2011
Ex-Nation

Postby Auralia » Thu Jun 07, 2012 3:44 pm

Glen-Rhodes wrote:I don't know why I called it a macro. I meant to say variable. The %NATION% variable, for example.


Oh... yeah, that'd be easy. I'll add that to the next release.

Glen-Rhodes wrote:I literally have over 1,000 fonts.


:eyebrow:
Catholic Commonwealth of Auralia
"Amor sequitur cognitionem."

User avatar
Lemonacia
Envoy
 
Posts: 217
Founded: Mar 11, 2012
Ex-Nation

Postby Lemonacia » Fri Jun 08, 2012 5:34 am

Cheers, this'll save me a bunch of time.
:bow: All hail the code wizard!
Ambassador Graham Wakefield.
Representitive of the peaceful republic of Lemonacia.

User avatar
Fotar
Spokesperson
 
Posts: 151
Founded: Sep 13, 2007
Authoritarian Democracy

Postby Fotar » Fri Jun 08, 2012 6:36 am

Just gave it a try....very nice and easy to use! This could be a huge help for me. Thanks! :clap:
Founder and Lord Regent of the second Council of Narnia
One-time Delegate of Balder
Progress through Respect. Power through Honor.

User avatar
Syrakhstan
Envoy
 
Posts: 288
Founded: Apr 14, 2012
Ex-Nation

Postby Syrakhstan » Fri Jun 08, 2012 6:54 am

I'm currently on my phone, ill be downloading and editing my post once I'm home.
DEFCON: [2]
Tech Level Varies: (Technology ranging from 1191-2012)
[When I do past tech, I tend to toss in a just a bit of Fantasy.]
Current Roleplays: None.
If you have to ask, you'll never know. If you know, you need only ask.

User avatar
Tim-Opolis
Negotiator
 
Posts: 6197
Founded: Feb 17, 2010
Iron Fist Consumerists

Postby Tim-Opolis » Sun Jun 10, 2012 2:22 pm

I'll be downloading this in a bit.

Looks good :)
Want to be a hero? Join The Grey Wardens - Help Us Save Nationstates
( ͡° ͜ʖ ͡°) Commended by Security Council Resolution #420 ( ͡° ͜ʖ ͡°)

Author of SC#74, SC #203, SC #222, and SC #238 | Co-Author of SC#191
Founder of Spiritus | Three-Time Delegate of Osiris | Pharaoh of the Islamic Republics of Iran | Hero of Greece
<Koth - 06/30/2020> I mean as far as GPers go, Tim is one of the most iconic

Next

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Askobar, Dakota, Gig em Aggies, Hiptoban, Isla Pluma, Omnicontrol, PopeXII, Teffland, Telnuhq, Yektov, Yerrisey

Advertisement

Remove ads