forked from blarz/matomat
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
737 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CHANGELOG | ||
--------- | ||
|
||
F = Feature | ||
C = Change | ||
B = Bugfix | ||
|
||
--------------------------------- | ||
matomat version 0.2.0 (25-04-2012) | ||
|
||
* C: Sqlite database instead of this flat file stuff | ||
* C: Using a global config file (matomat.cfg) | ||
* F: Adding/Editing/Deleting drink from the loscher menue. | ||
* F: Disable drinks to be not shown in the menue or in stats | ||
|
||
|
||
--------------------------------- | ||
matomat version 0.1.2 (21-04-2012) | ||
|
||
* F: Realtime rate of the price for drinks | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,63 @@ | ||
matomat.pl ist ein (unter erhoehtem Einfluss von Hopfen und Malz erstelltes) | ||
Script, welches in der K4 Computergruppe (http://www.k4cg.org/) fuer die | ||
Getraenkeabrechnung verwendet wird. | ||
DESCRIPTION: | ||
============ | ||
|
||
The matomat is a mostly drunken coded perl script to manage the beverate billing | ||
at the K4CG (http://www.k4cg.org/). | ||
|
||
|
||
|
||
REQUIREMENTS: | ||
============= | ||
|
||
- Perl | ||
- SQLite | ||
- festival (for the t2s feature) | ||
|
||
Perl modules: | ||
- DBI | ||
- Config::Simple | ||
- Text::FIGlet | ||
- Digest::SHA | ||
- IO::Prompter (Version: 0.002000) | ||
- Term::ReadKey | ||
|
||
Install missing modules doing the following | ||
|
||
# sudo perl -MCPAN -e "install <MODULE_NAME>" | ||
|
||
|
||
|
||
INSTALL: | ||
======== | ||
|
||
Create the matomat.db in /var/matomat/ | ||
|
||
Default user is admin with password matomat. | ||
|
||
# sqlite3 /var/matomat/matomat.db "CREATE TABLE user (userid INTEGER PRIMARY KEY, username TEXT UNIQUE, pw_hash TEXT, privs INT, credits INT);" | ||
# sqlite3 /var/matomat/matomat.db "INSERT INTO user (username, pw_hash, privs, credits) VALUES ('admin','r3TXgPlPRhedOewwnL/AWI3g79hG7ME6B6g05Hl3+DddJs82bhonu6xscTXeJoPRnR2HlJVsZcoNx86sX4kalw',1,1000);" | ||
# sqlite3 /var/matomat/matomat.db "CREATE TABLE drinks (drinkid INTEGER PRIMARY KEY, name TEXT UNIQUE, price INT, active INT,fixed INT,t2s TEXT);" | ||
|
||
Login with the admin user, change the password, add some drink and users. | ||
|
||
|
||
AUTHORS: | ||
======== | ||
|
||
Nikolas Sotiriu (lofi) | ||
lofi@sotiriu.de | ||
http://sotiriu.de | ||
|
||
Simon (blarz) | ||
simon@blarzwurst.de | ||
|
||
|
||
LICENSE: | ||
======== | ||
|
||
"THE BEER-WARE LICENSE" (Revision 42): | ||
lofi and blarz wrote this code. As long as you retain this notice you | ||
can do whatever you want with this stuff. If we meet some day, and you think | ||
this stuff is worth it, you can buy us a beer in return. | ||
|
||
|
||
Es funktioniert eigentlich recht gut, wenn man davon absieht, dass die | ||
"Datenbankzugriffe" nicht gerade dem ACID-Prinzip entsprechen... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* fixing the www graphs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
|
||
#################################################### | ||
# | ||
# Install Script for matomat Version 0.2.0 | ||
# | ||
#################################################### | ||
|
||
CFG_DIR=/etc/ | ||
DATA_DIR=/var/ | ||
BIN_DIR=/usr/local/bin/ | ||
|
||
if [ "$(id -u)" != "0" ]; then | ||
echo "This script must be run as root" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -f "$CFG_DIR/matomat.cfg" ] | ||
then echo "[-] Matomat Config already exists." | ||
else | ||
cp matomat.cfg $CFG_DIR/matomat.cfg | ||
echo "[+] Config file created." | ||
fi | ||
|
||
if [ -d "$DATA_DIR/matomat" ] | ||
then echo "[-] Matomat Data Directory already exists." | ||
else | ||
mkdir $DATA_DIR/matomat/ | ||
cp CHANGELOG.md $DATA_DIR/matomat/CHANGELOG.md | ||
cp README.md $DATA_DIR/matomat/README.md | ||
cp standard.flf $DATA_DIR/matomat/standard.flf | ||
echo "[+] Data Directory created." | ||
|
||
sqlite3 $DATA_DIR/matomat/matomat.db "CREATE TABLE user (userid INTEGER PRIMARY KEY, username TEXT UNIQUE, pw_hash TEXT, privs INT, credits INT);" | ||
sqlite3 $DATA_DIR/matomat/matomat.db "INSERT INTO user (username, pw_hash, privs, credits) VALUES ('admin','r3TXgPlPRhedOewwnL/AWI3g79hG7ME6B6g05Hl3+DddJs82bhonu6xscTXeJoPRnR2HlJVsZcoNx86sX4kalw',1,1000);" | ||
sqlite3 $DATA_DIR/matomat/matomat.db "CREATE TABLE drinks (drinkid INTEGER PRIMARY KEY, name TEXT UNIQUE, price INT, active INT,fixed INT,t2s TEXT);" | ||
chmod 666 $DATA_DIR/matomat/matomat.db | ||
chmod 777 $DATA_DIR/matomat/ | ||
echo "[+] Matomat.db created." | ||
fi | ||
|
||
if [ -f "$BIN_DIR/matomat.pl" ] | ||
then echo "[-] Matomat binary already exists." | ||
else | ||
cp matomat.pl $BIN_DIR/matomat.pl | ||
echo "[+] Matomat binary created." | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[global] | ||
echo="/bin/echo" | ||
festival="/usr/bin/festival" | ||
clear="/usr/bin/clear" | ||
database="/var/matomat/matomat.db" | ||
font=/var/matomat/standard.flf | ||
timeout="20" | ||
realtime="1" | ||
|
||
[t2s] | ||
badlogin="i am sorry dave. i am afraid i cant do that" | ||
pay_minus5="you better pay soon" | ||
pay_minus10="time to pay bitch" | ||
pay_minus15="i warned you! hi everybody i look at gay porrnno! hi everybody i look at gay porrnno! hi everybody i look at gay porrnno!" | ||
quit="so long sucker", "so long and. thanks for all the fisch", "good bye" | ||
stats="stats stats stats", "nothing to see here", "what do you want google analytics" | ||
credits="shake it baby", "good boy", "thank you", "you are now broke", "give me more" |
Oops, something went wrong.