GtkStryk Code
Status: Beta
Brought to you by:
albert_veli
GtkStryk - GTK+ STRYKTIPS GtkStryk is a GTK+ program that generates filtered rows for the swedish soccer pool betting systems STRYKTIPSET and EUROPATIPSET. The generated rows are saved in an ascii-format supported by the online submitting service at svenskaspel.se. You have to register for a "tipskort" betting card at svenskaspel.se or an affiliated bookie (like "Pressbyrån") to be able to use the online service. It is also possible to manually write generated rows to STRYK/EUROPATIPSET coupons, available at betting stores. Printing to coupons may be implemented on demand in the future. One coupon row contains 13 matches and you decide for each match, whether it will end in a (1) home win, (X) draw or (2) away win. USAGE ===== Start the program and select a game: Stryk, Europa or Brasilien. Click on the "Update coupon" button to download this weeks round from svenskaspel.se. * Select a system. Mathematical system can have any number of hedges but they can grow very big (big = expensive). UNA systems have a fixed number of hedges and they are "reduced systems". * Fill the system frame with 1, X and 2 until you are satisfied. If you are using an UNA system then you can right click on a hedge to select the preferred hedge (U-tips). The system will take the U-tips into account when generating the rows. If you don't select U-tips then 1 will be used. Unless it is an X2 hedge, then 2 will be used as U-tips. * Go to the filter tab and adjust the interval filter settings until you are satisfied. You can also add any number of expert rows if you want. Some expert usually give his/her row at svenskaspel.se then there is the "10 tidningars tips" which is a summary row of 10 swedish newspapers. * Choose File->Generate to generate rows. A dialog box will pop up showing some filter statistics. The number of rows that passed all filters are displayed at the bottom. If you are satisfied then save the rows. Otherwise choose cancel and adjust the frame and the filters and then try again. * If you click OK after generating rows you can save the rows as a file. This file can later be submitted to svenskaspel.se. Before submitting you must have a "tipskort". After obtaining a tipskort, start a webbrowser and go to www.svenskaspel.se, select your game and find the "egna rader" choice. Then upload the saved file and the rows will be submitted. When the matches are played you can look at your personal page at svenskaspel.se and follow how many correct rows you've got and if you are winning any prize money. INSTALLATION ============ GtkStryk uses the standard procedure for compilation and installation: $ ./configure $ make $ make install To install files in a non standard directory use the --prefix argument to configure. See configure --help for more options and the INSTALL file for even more options. DEBIAN ====== Debian packages can be created by standing in the root gtkstryk-x.y directory and issuing the command: $ dpkg-buildpackage -rfakeroot -us -uc Skip -us -uc if you are me ;-) Packages needed to compile can be obtained with the following command: $ apt-get install autotools-dev libgtk2.0-dev libssl-dev libglade2-dev libcurl-dev To build the man-page also install the docbook-to-man package. Windows ======= To build GtkStryk on Win32 use the GtkStryk win32 build environment. It is available for download from: https://sourceforge.net/projects/gtkstryk/ After the build environment has been installed and started, download the GtkStryk sources from the same site and build: $ tar zxvf gtkstryk-x.y.z.tar.gz $ cd gtkstryk/ $ ./configure $ make $ make install FreeBSD ======= After som bug hunting ./configure now works "out of the box". $ ./configure $ make $ make install But internationalization still don't work on FreeBSD. I have to read up on i18n in FreeBSD and try to fix it. LANGUAGE ======== STRYKTIPSET and EUROPATIPSET currently only works with the swedish "svenskaspel.se" games so most people using the program will probably speak swedish. The languages available at this point are swedish and english. GNU gettext is used by the program so translations to other languages can be made using a po-file editor like "gtranslator". A translation to a new language can be made by first copying an existing po-file to the new language locale name. Below is a list (not complete) of some of the languages spoken by people who might use GtkStryk and the corresponding variable names. po language LANG variable -- -------- ------------- bg (Bulgarian) bg_BG.UTF-8 cs (Czech) cs_CZ.UTF-8 da (Danish) da_DK.UTF-8 de (German) de_DE.UTF-8 el (Greek) el_GR.UTF-8 es (Spanish) es_ES.UTF-8 fi (Finnish) fi_FI.UTF-8 fr (French) fr_FR.UTF-8 hr (Croatian) hr_HR.UTF-8 hu (Hungarian) hu_HU.UTF-8 it (Italian) it_IT.UTF-8 nl (Dutch) nl_NL.UTF-8 no (Norwegian) no_NO.UTF-8 pl (Polish) pl_PL.UTF-8 pt (Portuguese) pt_PT.UTF-8 ro (Romanian) ro_RO.UTF-8 ru (Russian) ru_RU.UTF-8 sr (Serbian) sr_YU.UTF-8@cyrillic tr (Turkish) tr_TR.UTF-8 If you want to add a translation to, for instance, Finnish (fi). First copy the swedish po-file to the new locale name: $ cd po $ cp sv.po fi.po Then fire up gtranslator on the new file: $ gtranslator fi.po Translate all strings and save. Then add the new language to the ALL_LINGUAS variable in configure.ac: ALL_LINGUAS="fi sv" And at last add the language near the top of file src/language.c: static struct lang_t langs[] = { { "English", "C", "C" }, { "Svenska", "sv_SE.UTF-8", "sv" }, { "Suomi", "fi_FI.UTF-8", "fi" }, { NULL, NULL, NULL } }; The first argument on each language row is the language name. The last argument is the locale name (also used as $LANG variable on windows) and the middle argument is the string that is used as $LANG variable on Unix. After making changes to configure.ac you have to run a couple of commands to update the build files: $ aclocal $ autoheader $ touch stamp-h $ autoconf $ automake -a -c Or you can notify me (albert_veli@users.sourceforge.net) and I can add the translated po-file, update the build files and check the changes into CVS. Note: Serbian is special since they have two alphabets one cyrillic and one latin. I think for now the locale and variable for latin is: "sr@Latn" "sr_YU.UTF-8". And cyrillic is: "sr" "sr_YU.UTF-8@cyrillic". But sr_YU is slowly changing to sr_CS (new libc versions use sr_CS). CVS === The latest sources can always be obtained via cvs. After a cvs checkout some files that needs to be written might be read-only. Give these commands to make them read-write: $ chmod 644 aclocal.m4 $ find . -name Makefile.in -exec chmod 644 {} \; Note to developers: Makefile.in files don't need to be checked in unless Makefile.am in the same directory has changed. Do a 'cvs diff Makefile.in'. If only the '# $Header: /cvsroot/...' line has changed, then Makefile.in don't need a check in. LICENSE ======= Copyright (C) 2005 Albert Veli GtkStryk is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Comments are welcome. - Albert Veli <albert_veli@users.sourceforge.net>