NATION

PASSWORD

Delegate endorsement checking script

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Merni
Ambassador
 
Posts: 1800
Founded: May 03, 2016
Democratic Socialists

Delegate endorsement checking script

Postby Merni » Fri May 01, 2020 2:18 am

Now on Github: here. Check the documentation there.
This is just a simple Python script to check who isn't endorsing a delegate. It supports command-line arguments, so can be automated. It uses just 4 API queries, regardless of the size of the region. Made this because there wasn't another tool that I could find here.

Source: download "endo.py" from Github.

Syntax for CL arguments:
usage: endo.py [-h] [-r REGION] [-u USERAGENT]

optional arguments:
-h, --help show this help message and exit
-r REGION, --region REGION
Region name
-u USERAGENT, --useragent USERAGENT
User agent

Note that if your region name or useragent has a space, you will have to "enclose it in double quotes" (on Windows at least)

If no CL arguments are given, the user is prompted to enter these details.

Sample output:
C:\Users\Admin>py .\Appdata\Local\Programs\Python\Python36\endo.py -r "The Labyrinth" -u "Merni endo check"
Querying nations in region...
Querying WA members...
Finding intersection...
Querying delegate...
Querying delegate endorsements...
Finding difference...




===============WA Delegate endorsement report===============
Generated (begin) on: 2020-05-01 at 09:15:32 UTC
Region: The Labyrinth
WA Delegate: greater_victora
Nations: 239
WA nations: 67
WA Delegate endorsements: 38
WA nations not endorsing: 28
% of WA nations endorsing: 56.71641791044776
% of WA nations not endorsing: 41.7910447761194
Note: WA delegate not included in calculations
============================List============================
1 the_boris_isles
2 the_aro_homeland
3 darcov
4 doctriniumn
5 marj_al-hamam
6 drewask
7 wadiya_aladeen_the_third
8 con_ins_lallakerscak
9 shane_dawson_and_the_theorist_community
10 crusaders789
11 le_epico
12 veen_republic
13 antonieo
14 the_europea_commonwealth
15 borlotins
16 swizzleland
17 mekonn
18 fritzlands
19 nihil-land
20 neo-gallia
21 kiratic_sireion
22 1kish4jk
23 wulfingland
24 montelana
25 wheres_my_uncle
26 manchoo
27 limingia
28 anglands
Press Enter to close...

C:\Users\Admin>

Without CL arguments:
C:\Users\Admin>py .\Appdata\Local\Programs\Python\Python36\endo.py
Your useragent should have your email/NS name, as well as the purpose of this program (endo check). The mods need this info.
Enter your useragent : Merni : endo check
Enter your region name : The Labyrinth
then same as above
Last edited by Merni on Mon Sep 14, 2020 10:34 am, edited 5 times in total.
2024: the year of democracy. Vote!
The Labyrinth | Donate your free time, help make free ebooks | Admins: Please let us block WACC TGs!
RIP Residency 3.5.16-18.11.21, killed by simplistic calculation
Political Compass: Economic -9.5 (Left) / Social -3.85 (Liberal)
Wrote issue 1523, GA resolutions 532 and 659
meth
When the people are being beaten with a stick, they are not much happier if it is called 'the People’s Stick.' — Mikhail Bakunin (to Karl Marx)
You're supposed to be employing the arts of diplomacy, not the ruddy great thumping sledgehammers of diplomacy. — Ardchoille
The West won the world not by the superiority of its ideas or values or religion [...] but rather by its superiority in applying organised violence. — Samuel P. Huntington (even he said that!)

User avatar
Aurum Raider
Envoy
 
Posts: 239
Founded: Sep 18, 2014
Iron Fist Consumerists

Postby Aurum Raider » Fri May 01, 2020 6:02 am

This is a very well written and concise script, nice :clap:
Vleerian Vytherov-Denral
Cognitohazard

The North Polish Union wrote:Additionally, virtually all founderless regions are viewed as falling under the defenders' allegedly protective purview. This is a form of colonialism that the great imperialist regions of NS history could only dream of.

User avatar
Merni
Ambassador
 
Posts: 1800
Founded: May 03, 2016
Democratic Socialists

Postby Merni » Thu Sep 17, 2020 5:48 am

This script is now available on the web.
Last edited by Merni on Thu Sep 17, 2020 9:02 am, edited 1 time in total.
2024: the year of democracy. Vote!
The Labyrinth | Donate your free time, help make free ebooks | Admins: Please let us block WACC TGs!
RIP Residency 3.5.16-18.11.21, killed by simplistic calculation
Political Compass: Economic -9.5 (Left) / Social -3.85 (Liberal)
Wrote issue 1523, GA resolutions 532 and 659
meth
When the people are being beaten with a stick, they are not much happier if it is called 'the People’s Stick.' — Mikhail Bakunin (to Karl Marx)
You're supposed to be employing the arts of diplomacy, not the ruddy great thumping sledgehammers of diplomacy. — Ardchoille
The West won the world not by the superiority of its ideas or values or religion [...] but rather by its superiority in applying organised violence. — Samuel P. Huntington (even he said that!)


Return to Technical

Who is online

Users browsing this forum: Almost Ireland, Amazing randomly generated names, Anjan Kloss, Barbartopia, Cybus1, Giovanniland, Lushiania, Mackintosh, Micro Gettysburg, Podlachian State, Riemstagrad, Shirahime, Sorocamirim, Thorn1000, United Taco Nation, Waffles, Winx club

Advertisement

Remove ads