Skip to content

Commit

Permalink
Strip whitespaces
Browse files Browse the repository at this point in the history
Very important commit O:-)
  • Loading branch information
sedrubal committed Jun 15, 2016
1 parent 4672a16 commit ef4112f
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 40 deletions.
2 changes: 1 addition & 1 deletion FabLabKasse/UI/ClientDialogCode.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SelectClientDialog(QtGui.QDialog, Ui_SelectClientDialog):

def __init__(self, parent, shopping_backend):
""" constructor for the ClientDialog
:param parent: parent GUI dialog
:type parent: QtGui.QDialog
:param shopping_backend: current instance of ShoppingBackend
Expand Down
2 changes: 1 addition & 1 deletion FabLabKasse/UI/Kassenterminal.ui
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ QPushButton{
padding:5px;
margin:0px;
font-size:14pt;
/* blue color:
/* blue color:
background-color: rgb(44, 114, 199);
color: white; */
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_get_possible_payout(self, coins, requested_fraction, coin_limit_fractio
self.assertGreaterEqual(payout_infinite_coin_number, 0)
self.assertLessEqual(payout_limited_coin_number, payout_infinite_coin_number)
self.assertLessEqual(payout_infinite_coin_number, total)

# pick request, simulate payout
requested = round(requested_fraction * total)
paid_out = simulate_payout(coins, requested)
Expand Down
2 changes: 1 addition & 1 deletion FabLabKasse/libs/pxss/pxss.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def get_info(p_display=None, default_root_window=None, p_info=None):
_p_display = libXss.XOpenDisplay('')
try:
display = _p_display.contents

# Get DefaultRootWindow(display), which is a macro
# Xlib.h
# define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
Expand Down
6 changes: 3 additions & 3 deletions FabLabKasse/libs/random_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
def random_integer_list(random_generator, integer_range, number_of_elements):
""" return a list of length number_of_elements
with elements in the range integer_range[0] <= element <= integer_range[1]
:param random.Random random_generator: RNG instance
:param (int, int) integer_range: range (min, max) -- ends are included
:param int number_of_elements: length of resulting list"""
Expand All @@ -35,8 +35,8 @@ def random_integer_list(random_generator, integer_range, number_of_elements):
def random_choice_list(random_generator, possible_elements, number_of_elements):
"""return a random list with len(list)==number_of_elements,
list[i] in possible_elements (duplicates are possible)
:param random.Random random_generator: RNG instance
:param random.Random random_generator: RNG instance
:param list possible_elements: list elements to choose from
:param int number_of_elements: length of resulting list"""
ret = []
Expand Down
6 changes: 3 additions & 3 deletions FabLabKasse/scripts/databaseSnapshotAndSummary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#
# FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops.
# Copyright (C) 2015 Maximilian Gaukler <max@fablab.fau.de>
#
#
# This program 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 3 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,
# see <http://www.gnu.org/licenses/>.

Expand Down
6 changes: 3 additions & 3 deletions FabLabKasse/scripts/xsession.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#
# FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops.
# Copyright (C) 2015 Maximilian Gaukler <max@fablab.fau.de>
#
#
# This program 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 3 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,
# see <http://www.gnu.org/licenses/>.

Expand Down
1 change: 0 additions & 1 deletion FabLabKasse/tools/dummy-printserver
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ while True:
sys.stdout.write(char)
else:
sys.stdout.write(u"�")

6 changes: 3 additions & 3 deletions INSTALLING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ Modem-Manager interferes with the serial port. It is highly recommended to remov
- Qt: http://qt-project.org/downloads
- SIP: http://www.riverbankcomputing.com/software/sip/download (entpacken, `configure`, `make`, `make install`)
- PyQt4: http://www.riverbankcomputing.com/software/pyqt/download (entpacken, `configure`, `make`, `make install`)
- lxml:
- lxml:

cd /tmp
wget http://lxml.de/files/lxml-2.2.2.tgz
tar -xzvf lxml-2.2.2.tgz
tar -xzvf lxml-2.2.2.tgz
cd lxml-2.2.2
python setup.py build --static-deps --libxml2-version=2.7.3 --libxslt-version=1.1.24
python setup.py build --static-deps --libxml2-version=2.7.3 --libxslt-version=1.1.24
sudo python setup.py install


Expand Down
8 changes: 4 additions & 4 deletions README_cashPayment.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ auf Deutsch, weil auch die ganze GUI auf Deutsch ist

- Ausleeren -> Nein, Nachfüllen -> Nein, Absperren -> Ja

- Jetzt kann der Automat nicht mehr benutzt werden, bis man wieder durch ./enableServiceMode.sh und OK klicken entsperrt.
- Jetzt kann der Automat nicht mehr benutzt werden, bis man wieder durch ./enableServiceMode.sh und OK klicken entsperrt.

### 1. Abgleich interner Stand mit Kassenbuch:

Expand All @@ -52,7 +52,7 @@ auf Deutsch, weil auch die ganze GUI auf Deutsch ist

- Ausleeren Ja -> der (nicht zugängliche) Speicher des Scheinwechslers wird in die Cashbox umgefüllt.

- Cashbox des Scheinwechslers entnehmen und zählen
- Cashbox des Scheinwechslers entnehmen und zählen
- Aktuellen Stand abfragen per: `./cash show`
- oder auch vergleichen mit gezähltem Stand -> z.B. 3x50€, 1x20€

Expand Down Expand Up @@ -119,7 +119,7 @@ Dies damit `./cash move muenz.manual muenz.tubeN /123x50c/` zurückgefüllt

./cash show

Configuration
Configuration
-------------

see config.ini.example
Expand Down Expand Up @@ -152,7 +152,7 @@ If you want to launch a driver without the GUI, look for a line in gui.log like

starting cashPayment server: PYTHONPATH=.. /usr/bin/env python2.7 -m FabLabKasse.cashPayment.server.mdbCoinChanger KGRwMApWbmFtZQpwMQpWbXVlbnoKcDIKc1Zwb3J0CnAzClZod2dyZXA6Ly9VU0JcdTAwNWMgVklEXHUwMDVjOlBJRFx1MDA1Yz0wNDAzXHUwMDVjOjYwMDFcdTAwNWMgU05SXHUwMDVjPUExMDBRT0YyCnA0CnMu

and run (in FabLabKasse/) the specified command starting with PYTHONPATH=../
and run (in FabLabKasse/) the specified command starting with PYTHONPATH=../
The argument is a base64 encoded pickled dictionary of the per-deivce options specified in config.ini
You can then communicate with this via stdin/stdout and use commands like POLL, ACCEPT 1234, STOP, DISPENSE 234, STOP according to cashPayment/protocol.txt

Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ edit config.ini:
- Bargeldzahlung (manuell)

- dabei jeweils die Fälle:
- zuwenig eingezahlt
- zuwenig eingezahlt
- Spende (Überzahlung)
- zuwenig Wechselgeld
- abgebrochene Zahlung
Expand Down
10 changes: 5 additions & 5 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.

# Sicherheit / Kapselung
# TODO insecure private key

# Achtung, per default kann die VM auf den kompletten Einstellungsordner inkl. vagrantfile zugreifen, bietet also keine Kapselung!
config.vm.synced_folder ".", "/vagrant", disabled: false


# config.vm.synced_folder "./share", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
Expand All @@ -66,7 +66,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# View the documentation for the provider you're using for more
# information on available options.


config.vm.provision "shell" do |foobar|
foobar.path = "./install_debian.sh"
end
Expand Down
2 changes: 1 addition & 1 deletion doc/FabLabKasse.cashPayment.client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subpackages

.. toctree::



Submodules
----------
Expand Down
2 changes: 1 addition & 1 deletion doc/FabLabKasse.cashPayment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This module also has a command-line interface that can be accessed as ``./cash``
:undoc-members:
:show-inheritance:


FabLabKasse.cashPayment.listSerialPorts module
----------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions doc/FabLabKasse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Files that are here for legacy reasons
---------------------------------------

Some parts of :class:`FabLabKasse.shopping.backend.legacy_offline_kassenbuch` are in this folder for historical reasons

Kassenbuch
^^^^^^^^^^^^^^^^^^^^^
this file is here for legacy reasons
Expand All @@ -56,7 +56,7 @@ this file is here for legacy reasons
:undoc-members:
:show-inheritance:


produkt
^^^^^^^^^^

Expand Down
4 changes: 2 additions & 2 deletions doc/FabLabKasse.shopping.cart_from_app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can use the HTML-based simulator as a replacement for FabLabKasse and also a

Workflow
--------

- Fetch a random number from the appserver (e.g. 12345)

``HTTP GET server/checkout/createCode``
Expand All @@ -19,7 +19,7 @@ Workflow
(this is to guard against DOS or collisions with other people also sending a cart at the same time)

- User has his cart in the app, and pushes "send to cashdesk", scans code

- app sends cart to server, authenticating with the random number

- cashdesk polls for a cart:
Expand Down
12 changes: 6 additions & 6 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Contents:
buildyourown/index
FabLabKasse


Code structure overview
=======================

Expand All @@ -25,11 +25,11 @@ Code structure overview
- cashPayment: automated cash payment - coin and banknote acceptors. see README_cashPayment.md

- client: interface towards the GUI that connects with the device drivers

- PaymentDevicesManager: manages all (multiple) payment devices, used by the GUI (as self.cashPayment)
- PaymentDeviceClient: one device used by PaymentDevicesManager, launches a 'server' process and communicates with it via the protocol specified in cashPayment/protocol.txt
- server: device drivers. they run as a standalone process

- cashServer: abstract base class
- exampleServer: simulated hardware for first tests
- nv11, mdbCoinChanger: real hardware
Expand All @@ -39,20 +39,20 @@ Code structure overview
- shopping:

- backend: backends that provide connection to a webshop, ERP system, database etc and manages products, categories, carts and financial accounting (storage of payments)

- abstract: abstract base class
- offline_base: abstract base class for backends that read products only once at the start and keep the cart in memory; as opposed to a always-online system that has its whole state somewhere in the cloud
- dummy: has some fake products, just silently accepts all payments without storing them somewhere
- oerp: OpenERP / odoo implementation, still needs testing.
- legacy_offline_kassenbuch: backend with product importing from a python script, SQLite based double-entry bookkeeping, contains many german database field names and is therefore marked as legacy. With some re-writing it would make a decent SQLite backend. Has a management CLI kassenbuch.py in the main folder.

- payment_methods: different methods of payment like manual cash entry, automatic cash in+output, charge on client account, ...
- libs: some helping libraries
- produkte: empty directory for local caching of product data (TODO rename)
- scripts: some helping cronjobs
- TODO


Indices and tables
==================

Expand Down
2 changes: 1 addition & 1 deletion install_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ else
fi

echo "while [ ! -f /home/$INSTALL_USER/FabLabKasse/FabLabKasse/scripts/xsession.sh ]; do sleep 1; echo Waiting for git repo; done; /home/$INSTALL_USER/FabLabKasse/FabLabKasse/scripts/xsession.sh" > /home/$INSTALL_USER/.xsession
ln -s /home/$INSTALL_USER/FabLabKasse/FabLabKasse/scripts/xsession.sh /home/$INSTALL_USER/.xsession
ln -s /home/$INSTALL_USER/FabLabKasse/FabLabKasse/scripts/xsession.sh /home/$INSTALL_USER/.xsession

# the ubuntu cloud image doesn't include german locale, so the OpenERP import crashes -- add it.
echo 'de_DE.UTF-8 UTF-8' | sudo tee -a /etc/locale.gen
Expand Down

0 comments on commit ef4112f

Please sign in to comment.