commit 63479d066b7c264e574a755a17ae991e2fd94169
parent 0f7614e0709f740803d3657d3a8793bdd8e593aa
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sun, 11 Oct 2015 01:40:25 +0200
doc
Diffstat:
COPYING | | | 19 | +++++++++++++++++++ |
README | | | 37 | +++++++++++++++++++++++++++++++++++++ |
2 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/COPYING b/COPYING
@@ -0,0 +1,19 @@
+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.
+
diff --git a/README b/README
@@ -0,0 +1,37 @@
+Helper scripts for www.republique-numerique.fr
+Antoine Amarilli, 2015
+License: see COPYING (MIT license)
+
+Requires Debian packages python3-requests, python3-bs4, python3-lxml
+
+- get_propositions.py USER
+ returns the list of identifiers of all opinions and modifications of USER
+ of the form "/opinions/N" and "/opinions/N/versions/V"
+
+- get_votes.py USER
+ returns the votes of USER
+ of the form "/opinions/N X" or "/opinions/N/versions/V X"
+ where X is -1, 0, or 1
+
+- vote.py LOGIN PASSWORD
+ connects to www.republique-numerique.fr local account LOGIN PASSWORD
+ and performs votes given on standard input in the form of get_votes.py
+
+Examples:
+
+- to perform the same votes as USER
+
+ get_votes.py USER | vote.py YOURLOGIN YOURPASS
+
+- to vote for all propositions and opinions of USER
+
+ get_propositions.py USER | sed 's/$/ 1/' | vote.py YOURLOGIN YOURPASS
+
+ (Note that users are *not* counted as having voted for their own propositions
+ and opinions.)
+
+WARNING: These scripts are provided to simplify your life only. Please use them
+responsibly. The author does not encourage any form of ballot stuffing or other
+abusive behavior.
+
+