Welcome!
This is a management program written for my school library.
If you really want to use this, follow the instructions below:
- Make sure you have Python >= 3.6
- (optional) create a new virtual environment and activate it. If you don't, you may have to adjust the following commands
- download and unpack the latest code (
master
branch if you're feeling adventurous, some (hopefully) stable release if not) - write a bare-bones config file (you can use
exampleconfig.cfg
as an example) $ python buchschloss/models.py
to create the database (SQLite)$ export BUCHSCHLOSS_CONFIG=/path/to/your/config.file
or start the following commands with$ env BUCHSCHLOSS_CONFIG=/path/to/your/config.file
- test your config file with
$ python -m buchschloss config
- TODO: insert probable errors and how to get rid of them here
- when it's valid, start the simple command-line interface with
$ python -m buchschloss cli
- Type
login SAdmin
at the----- >
prompt - Type
Pa$$w0rd
when asked for a password - the prompt should change to
Member[SAdmin](level_4) >
- you can now do everything! Type
help commands
to see the available commands
TODO: write something that explains how to actually do stuff
The actual files are in the buchschloss
directory. Inside, there is:
core.py
the main application providing the interface used by the user interfacesmodels.py
definition of the database models; can be run as a script to initialize the databaseutils.py
stuff that doesn't belong anywhere elsecli.py
a simple command-line interface providing a thin wrapper around the core APIgui2/
a package of the current GUI, written withtkinter
widgets.py
special widgets usedvalidation.py
entry validation logicactions.py
the code that actually calls the actions exposed bycore
main.py
the graphical application__init__.py
glue
lua/
subpackage for lua scripting support__init__.py
main execution, sandboxing and lua-based cli interfaceobjects.py
object wrappers exported to luabuiltins.lua
abstraction of core APIs
I am more-or-less in the process of documenting the internal parts (see doc/
).
As of now, only some basic functions are tested, notably excluding (in the sense of not being tested) the GUI. I will try to add relevant tests whenever I change something.