User talk:Slashme/parliament.py/Archive

Current status

 * Down with a 500 error. —Preceding unsigned comment added by 68.39.174.238 (talk) 21:30, 15 February 2008 (UTC)


 * I guess I'll have to upgrade my freeshell membership!! --Slashme (talk) 05:22, 20 February 2008 (UTC)
 * Done! The script works again. --Slashme (talk) 20:15, 9 May 2008 (UTC)

Introduction
This is the code of a script I am developing in response to a discussion on Graphic_Lab/Research_and_Development on standards to show party representation in legislatures. Please put bug reports here, and feel free to edit this page.

The script is hosted on freeshell.org. Please try it out.

Instructions

 * Enter the name and iteration of the legislature in "Title"
 * Enter the parties, their member #s and colors in #xxxxxx type (Last one optional) in "List". EG. "Annoying partizans, 39, #123456; Frauds, 12, #abcdef; Non Newtonian fluids, 3, [...]". The system will automatically discover the correct size and shape of the legislature.
 * Copy the text in green into a file and save it as "[...].svg" and open it in Firefox and see that it renders correctly.

Bugs
* Erroneous parsing or instruction: Entering, per example "Republicans, 49; Democrats, 51" (EG. The current United States Senate) throws the "too few members" error. (Not to mention that running the example give (Party A, 33; Party B, 22, #99FF99) threw this. 68.39.174.238 (talk) 15:48, 20 January 2008 (UTC)
 * Strange SVG bug: When the svg is opened by inkscape, all is well, but if it is saved by inkscape, all the colours change to black (specifically, the "fill" becomes undefined in the stroke/fill dialog, but the colours are untouched in the file itself!) This happens on Linux and Windows. Solved: Use "style=fill:#xxxxxx" instead of "fill=#xxxxxx" --Slashme (talk) 07:58, 19 January 2008 (UTC)
 * Blocs should go side-to-side instead of up-and down Fixed --Slashme (talk) 06:30, 19 January 2008 (UTC)
 * Crap, I thought I'd fixed that, and I seem to have made the page completely unusable. And now I'm at work, so I can only fix it when I get home. --Slashme (talk) 05:46, 21 January 2008 (UTC) Solved the problem using MIDP-ssh on my phone!! --Slashme (talk) 06:06, 21 January 2008 (UTC)
 * Does the fact that it now fails to return anything count, or is that because of the "bug fixing in progress" ? 68.39.174.238 (talk) 18:11, 21 January 2008 (UTC)
 * Works for me. --Slashme (talk) 05:12, 22 January 2008 (UTC)
 * I see the problem, listed below: 68.39.174.238 (talk) 21:26, 22 January 2008 (UTC)


 * Key should specify sans font or title should not specify font. --Slashme (talk) 06:21, 21 January 2008 (UTC)
 * "Title" and "List" are excessively nonintuitive words without better explanation. 68.39.174.238 (talk) 21:26, 22 January 2008 (UTC)
 * I sadly agree o_____O"  —Preceding unsigned comment added by 140.122.97.171 (talk) 11:47, 24 January 2008 (UTC)
 * OK, I'll have to make the instructions a bit clearer, sorry! --Slashme (talk) 08:29, 23 January 2008 (UTC)
 * Appears to be solved; just when I wrote up my discovery above... 68.39.174.238 (talk) 04:14, 27 January 2008 (UTC)

To do

 * Key should give total seats. --Slashme (talk) 06:21, 21 January 2008 (UTC)
 * Implement as CGI script Done, see . --Slashme (talk) 13:44, 20 January 2008 (UTC)
 * Give circles as option to confirm style decision
 * Implement majority lines (e.g. a line at 50% and one at 66%)
 * Implement standard colours or user colour selection done --Slashme (talk) 13:44, 20 January 2008 (UTC)
 * Confirm that legend is generated for parties without seats (i.e. 0 representatives). Done --Slashme (talk) 06:33, 19 January 2008 (UTC)
 * Use list instead of dictionary for list of parties: this way the order of parties given by the user will be preserved. Done --Slashme (talk) 06:33, 19 January 2008 (UTC)
 * Implement date in title --Slashme (talk) 13:54, 20 January 2008 (UTC)
 * Improve instructions and error message readability --Slashme (talk) 14:36, 20 January 2008 (UTC)
 * Implement reserved seats (e.g. for women or ethnic groups) --Slashme (talk) 07:24, 11 February 2008 (UTC)

Wishlist

 * Use borders of blocks to indicate coalitions (68.39.174.238 (talk) 16:53, 18 January 2008 (UTC))
 * Render key in two columns --Slashme (talk) 14:09, 20 January 2008 (UTC)
 * Write your interface in basic(easely understandable)-english : I tryed your freeshell.org script, but I was unable to understand what he need. I know my english is a "pigeon english"(ref : Exploding Boy), but foreigners with my level in English should not have any difficulties to understand want the script want. Conclusion : some improvement are doable in language-accessibility.
 * This appears to be solv'd. 68.39.174.238 (talk) 19:20, 28 January 2008 (UTC)


 * Take a look on the section below.

Yug's suggestion(s) and notices
Note: I still haven't read this. I'll go over it as soon as I get a chance, and then I'll ask (hopefully sensible) questions. --Slashme (talk) 06:24, 21 January 2008 (UTC)

NB: the wikipedian who request a pie chart should input the following data in empty fields/boxies, like the Search box on the left. The script then outputing the SVG to uplaod on commons, and the associated legend (using {legen|#color|Party (X seats ; x%)} to copy in the commons' upload field.

From my current recommendation on /Research and development (which is now full of out-topic talks), I made this summary table :

If possible... we also may need :
 * lines for important % : color #00000 (black), opacity : 50% ; should be give by the requester (ex: 50% ; 66% ).
 * exact day when the data was pick up such as "YYYY/MM/DD" (where to put this ?).
 * http:// of the source ? (where to put this ?)
 * Both of the above could go in metadata; if we do a good enough job of this we could annoying the developers to have it displayed the way EXIF data is now with photographs. 68.39.174.238 (talk) 03:34, 20 January 2008 (UTC)