The purpose of this system is to track all games subscribed to judges used to play Diplomacy by email.
The address observer@floc.net should be automatically signed on every time a game start is announced through the BNC mailing list.
The map of a game is redrawn when results are received.
You can access the page for a game from this form
If a game is not registered, you can sign on the observer with the Register button.
You can bookmark the page of a game with this url : http:/observer.py?page=game&game=...&judge=...
In case the observer missed a message from the judge, you can click the 'Reload' button and it will request the full history from the judge
The form is here : http:/observer.py?page=search_form
The search can also be accessed from the customized page and use its settings to display the results
If you need help on this form, see the JDPR database help which uses the same mechanism
You can create a login and have the status of the games you want summarized on a single page.
To register a new login and access your customized page, use this link,or jump directly to this bookmark with the right values : http:/observer.py/observer/py?page=login&login=...&password=...
On the login screen, enter the name of another login if you want to see the list of its games with your settings, the other login must be set as public by its owner. Public logins are intended to contain the list of games in a tournament for example.
In the settings you can enter your timezone, which is used to convert the deadline to display the deadline in your timezone.
If the checkbox 'Login visible as read-only by anyone', other players will be able to:
You can put an header in html format which will be appended at the top of your page.
Type a new login and/or a new password to change these values.
Click on the "Columns" button in your customized page to modify the list of the displayed columns.
| Judge | |
| Game | |
| Variant | The variant is the map used for the game |
| Variant option | Set if the game has a special variant option like Wings, Blind, Payola, ... |
| Press | The press settings as a code on 4 characters |
| Deadline | You can either display the deadline in the judge timezone, or in your timezone which you can change in the settings page. |
| Map | This will display a link to the game map. |
| Comment | One of the comments you can enter for each game in your customized page. |
| Time to deadline | This is the length of the period till the next deadline. |
| Phase | The long format is for example 'Movements for Spring of 1901' and the short format 'S1901M' |
| Flag | This is the value of the flag, it will be displayed as a button, with the text 'yes' or 'no', and clicking the button will change its value. |
| List | This is the listing of the game returned by the judge, replaced by the summary when the game is over. |
| History | A part of the history of the game. |
| Free text | Any text you want. |
| NMR | If the game is set to NMR (process the turn even if all players haven't send their moves) |
| Proxy | If the game uses proxies (put some units under control of another player) |
| NoList | If the game is nolist, you can't see it unless you know its name |
| DIAS | If the game is set to DIAS (draw include all survivors) |
| Index | The index as defined on judges, which is the sum of the squares of supply centers divided by the number of powers, some people think it's an indicator of the progression of the game (low: opening, high: endgame). It's 0 before the first adjustement phase. |
| SC Count | The current number of centers for a power, give its initial. It can't generate columns from the powers found in variants in the list, so if you want 7 columns for standard powers you have to add them one by one. |
If you aren't happy with the header of the column displayed in the table, enter a text in the text zone 'Custom header'.
Custom formatYou can enter a format string for the column in the text zone 'Custom format', it's relevant for some columns only and the syntax depends upon the column type:
| Deadline | This page of the python manual describes the syntax of the format string. The default format is '%a %b %d %H:%M', which gives a text like 'Sun Jul 15 23:30' |
| Map | The displayed text will be the strings, with '%b' replaced by the size of the file in bytes, and '%k' the size in kilobytes |
| Comment | |
| Time to deadline |
The default format is '[%4w week%S ][%5d day%S ][%20h hour%S ][%m minute%S]', here are some explanations: |
| Flag | The default format is 'yes;no', replace 'yes' and 'no' with other words if you don't like them. You can use "link:yes;no" to have an hyperlink instead of a button, it's a bit smaller. |
| List | The format string will be displayed in the table |
| History | The format string will be displayed in the table |
| Free text | The format string will be displayed with some special keywords replaced :
|
|
Gunboat NMR Proxy NoList DIAS |
The default format is 'Gunboat;Not gunboat' and so on The first (second) value is used if the option gunboat/NMR/Proxy/NoList/DIAS is (not) set |
If you enter an hyperlink and the text in the column is not already automatically hyperlinked, it will create it. An hyperlink can contains keywords which will be replaced by the right value for each game like for the format of the "Free text" columns.
For example, if you want to open a mail window when you click on the judge, if you're using the comment 1 to store the power, the hyperlink could be "mailto:%j?subject=signon for %g on %J&body=signon %f1%g"
For standard and custom hyperlinks, if you check the box "Open in another window", clicking on the link will open another window
You can change the layout of the page with style sheets items, globally to change the background color or the font of the buttons, or conditionally for each game.
If the style applies to the whole row in the table or a specific column, it can be triggered by a condition.
A condition can be based on the deadline (passed or not) or the value of a column, and the value of the flag for the game.
A good and simple tutorial about the syntax of style sheets is here
The big reference document is here.
Here are a couple of examples:
body: background:#00ff00; color:#ffffff
body: background-image: url("http://somewhere.com/image.gif")
body: background-attachment: fixed
body: background-repeat: repeat
font-family: Verdana, Arial, 'Times New Roman', serif
font-weight: bold
font-stretch: narrower
font-size: smaller
font-style:italic
text-align:center
The button "Search games" in the customized page opens the query form, the results are displayed using your customized options (except for the columns which are not relevant if games aren't in your private list like the comments or the flag)
You can look at some sample queries, or display a form based on:
Combine games and players (pick players first)
Combine games and players (all players)
In the form, eventually use filters and choose formatting options, and then use either the section "Look for matches" or "Statistics"You can make multiple selection in the list boxes (don't select "Any" then)
The text for the game can be matched using regular expressions, the syntax is here.
If you check "Display filters before results", the filters will be recalled at the top of the page before the results (useful if you come to the page with a bookmark)
You can get the data in HTML tables, or in CSV (a text file with datas separated by semicolons which you can open with MS Excel)
Just check the columns you can to display in the table
Choose how many values will be displayed on each page, there are links in the results page to navigate through the pages
Select how to sort the data, check the box "Descending" to reverse the order, and "Group values" to create group breaks
To get aggregate computed data instead of detailed results
You can select no key, a key for the lines or for the lines and the columns, for example:
Check "Totals" if you want to display an additional line or column with subtotals
Choose the number or the percent of matches, or an operator. If the operator is about a specific value, choose it in the second list
Just say how to sort the lines and the columns, it's either "Labels" to use the key values, "Number of matches", or one of the computed data
To get several independent tables according to a characteristic
This is the last line of the center ownership in the summary (this section is missing in a lot of old summaries), for example "RRRRGGGGGGGGGGGGGGGGGRRRRRRRRRRRRR"
It looks like when a draw occurs, the last line is the ownership at the end of the previous year, there are some 2 way draws with more than 2 powers on this line. Sorry, can't do better from the data available.
This is a pattern built from the previous string, where the initials of the powers are replaced by "A","B","C",... A is the power having most centers, if there is the tie the first power to appear in the list gets the first character. The pattern for the previous example would be "AAAABBBBBBBBBBBBBBBBBAAAAAAAAAAAAA"
The maps are drawn by mapit which produces postscript files, then ghostscript is used to convert the ps files to pdf and gif.
Here is the list of the installed variants.
Some variants are simply links to other variants, variants with colored units are in bold (this doesn't necessarily imply that the supply centers will be colored too)
1600_25You can download a tarball of the version of mapit currently running on this server, it's rebuild daily. I'm using only the version written in python for all variants except Machiavelli games.
The C variant used for Machiavelli games and subvariants is maintained by the people at MachFix@yahoogroups.com, it may still work for other variants which don't use the newest judge features
To use the python version, install the latest python interpreter, then you can produce a postscript file with such a command, if the history you got from the judge is in the file ~/history and the variant Youngstown:
python dpmap.py < ~/history ~/mapit/maps/Youngstown > history.ps
For the C version, compile it on unix systems with:
./configure && make
On windows, see the win32 directory in the tarball for instructions to recompile it, the mapit.exe file there may be a bit old, and to use it you must define two environment variables having the path to the mapit files (this is the Unix syntax, on Windows use the command "set"):
export MAPINFO=~/mapit/maps/Youngstown.info export MAPPS=~/mapit/maps/Youngstown.cmap.ps ./mapit < ~/history > history.ps
To view a postscript file, use the Ghostscript utilities
You can browse the cvs repository to see the changes
To modify the output for a supported variant, you can modify the mapit files, try them on some histories you get from the judge and send me the new files.
For a new variant, David Norman usually provides automatically generated maps for new variants played on USTR, see some help pages on his site
Chris Jones wrote a nice guide about making maps for new variants or enhancing existing maps.
Here is another guide by Juho Snellman with more information about how to use a PS viewer to define the coordinates and a vector drawing program.
If you have a bitmap for your variant, you may want to convert it to postscript with a program like autotrace instead of starting from nothing. Try different option to adjust the rendered details.
Mapit was developped by George Boyce in 1992, and a lot of people contributed to its developpement. The most significant improvement is the colorized units and center by Manus Hand.
Most maps are provided by David Norman when a new variant is tested on USTR.
I'm using a modified version of Manus' script dpmap.py written in python.
You can download the sources of the file here, the tarballs are rebuild daily.
You can view the CVS repository here
My scripts are released under the GNU General Public License, I don't know about mapit
If you think that a map is not uptodate, check that you don't have an old version sitting in the cache of your browser. You should always set the cache settings to "Check every time". This doesn't mean that your browser will reload a file systematically, but it will check if it has been updated since the last time it retrieved it.
Maps aren't availableCheck that the variant is supported by mapit in this list. If the variant is in the list but the maps aren't available, it probably means that mapit failed to generate the map, I'm automatically informed something went wrong. If it's not in the list but you know where to find the mapit files for this variant, tell me and I'll install it.
Gif images are upside down, or the readable gifs are too big/not big enoughI'm setting the rotation and resize data per variant, so when a variant has never been tested these parameters need to be adjusted, let me know if there is a problem.
| Mon, 13 Aug 2001 06:17 | Change log in the help files, unread entries displayed in the customized page. |
| Mon, 13 Aug 2001 06:18 | Machiavelli variant supported ! Thanks to the guys in MachFix@yahoogroups.com |
| Mon, 13 Aug 2001 06:20 | You can use a text instead of a button in the flag column with the format "link:yes;no" (it's smaller) |
| Mon, 13 Aug 2001 06:21 | When you attempt to add an unregistered game in the customized page, you can register and add it at the same time |
| Mon, 13 Aug 2001 23:57 | You can use '%V' in an hyperlink, it's replace by the variant |
| Fri, 24 Aug 2001 18:29 | Bug fix for Machiavelli games, they should be fine now |
| Fri, 24 Aug 2001 18:30 | New option for each column to open an hyperlink in another window |
| Fri, 24 Aug 2001 18:31 | To hide the password you're typing in the login screen, use this url : http://www.floc.net/observer.py?page=login_screen&password=hidden |
| Mon, 01 Oct 2001 14:54 | New variants installed : Caucasia1, Duo, Sfrj32, War_In_North_America_5, Federation3, Crusades_1200_12c, 1600_25, 1600_26, 1600_27, 1600_28 |
| Thu, 18 Oct 2001 16:10 | You can search list games from the customized page, or from this url : http://www.floc.net/observer.py?page=search_form, and the columns used to make the filter are available as columns in the customized settings (essentially boolean options like gunboat, nmr, ...) |
| Mon, 03 Dec 2001 00:41 | postscript fix by Joel Reicher, fixes truncated text for : Standard Pure Oracle Milan Loeb9 Layered Crowded Chaos Britain Asia |
| Wed, 19 Dec 2001 19:41 | Fixed a bug in postscript files when importing into Adobe Distiller |
| Sun, 30 Dec 2001 17:03 | Added %p and %P in hyperlink formats to display the phase in mailto links (by request) |
| Thu, 18 Apr 2002 21:56 | JDPR queries can now use stored list of players, details here |
| Mon, 22 Apr 2002 17:47 | A lot of variants now have colorized map, thanks to David Norman, tell me if there is something to adjust like the colors |
| Wed, 25 Sep 2002 17:00 | Paranoid people can use encrypted connection: just replace http by https in your bookmarks. Ignore the certificate warning (I made my own and didn't pay for one) |
| Sun, 19 Jan 2003 22:20 | New option to have the judges you used at the top of the list used to add new games in the customized page, click on "Settings" to change it |
| Tue, 22 Apr 2003 16:31 | Added a JDPR link on the game page to look for ratings (non gunboat games only) |
| Sun, 07 Nov 2004 21:41 | I installed a issue tracker, please submit bugs or feature requests here:
http://www.floc.net/issues/ If you ever sent me a suggestion and I say something like I'll do it later and forgot, please add it because my organization skills need help. |
Debian GNU/Linux is the operating system of the server.
Apache is the web server.
Python is the language used by all scripts, either the pages served by apache and the offline scripts used to parse mails received by the observer. It's the first time I'm really happy with a language I'm using.
modpython is a module for apache to speed up the execution of python scripts, so the interpreter isn't loaded for each hit and imported modules are kept in memory.
MySQL is the database server used to store the status of all games, the histories, the information about the logins, ...
I'm Alain Tésio, you can reach me with this email : alain@onesite.org. Please let me know if there is any problem.