Compare commits
No commits in common. "8d9b6f75d0b75e9495b3a963f02bd26acd989b26" and "32ad36a287f1eded549e42ad1bed77acb148be3b" have entirely different histories.
8d9b6f75d0
...
32ad36a287
49
README.adoc
49
README.adoc
@ -1,49 +0,0 @@
|
|||||||
sklad
|
|
||||||
=====
|
|
||||||
|
|
||||||
'sklad' is a simple personal warehouse management system or, let's rather say,
|
|
||||||
"stuff management system", employing a web UI for easy mobile access from
|
|
||||||
a smartphone. The templates are currently localised only in the Czech language.
|
|
||||||
|
|
||||||
The project also contains reusable Go packages with a Brother QL-series USB
|
|
||||||
printer driver and a simple BDF bitmap font renderer, as well as a few related
|
|
||||||
utilities for previewing, printing and debugging.
|
|
||||||
|
|
||||||
Building and Running
|
|
||||||
--------------------
|
|
||||||
Build dependencies: Go +
|
|
||||||
Runtime dependencies: Linux, a Brother QL label printer connected over USB
|
|
||||||
|
|
||||||
$ go get -u https://janouch.name/sklad/cmd/sklad
|
|
||||||
|
|
||||||
You will need to bootstrap the database by writing a minimal 'db.json':
|
|
||||||
....
|
|
||||||
{
|
|
||||||
"Password": "login-password",
|
|
||||||
"Prefix": "A",
|
|
||||||
"BDPPath": "font.bdf",
|
|
||||||
"BDFScale": 3
|
|
||||||
}
|
|
||||||
....
|
|
||||||
|
|
||||||
Decent Unicode fonts in the BDF format can be obtained from
|
|
||||||
https://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html
|
|
||||||
though they will need some upscaling because of the printer's high DPI.
|
|
||||||
|
|
||||||
After placing the templates and the BDF font file in the current working
|
|
||||||
directory, run the application as follows:
|
|
||||||
|
|
||||||
$ sklad :8000 db.json
|
|
||||||
|
|
||||||
Contributing and Support
|
|
||||||
------------------------
|
|
||||||
Use https://git.janouch.name/p/sklad to report any bugs, request features,
|
|
||||||
or submit pull requests. `git send-email` is tolerated. If you want to discuss
|
|
||||||
the project, feel free to join me at ircs://irc.janouch.name, channel #dev.
|
|
||||||
|
|
||||||
Bitcoin donations are accepted at: 12r5uEWEgcHC46xd64tt3hHt9EUvYYDHe9
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
|
||||||
This software is released under the terms of the 0BSD license, the text of which
|
|
||||||
is included within the package along with the list of authors.
|
|
@ -259,6 +259,9 @@ func main() {
|
|||||||
templates[name] = template.Must(template.ParseFiles("base.tmpl", name))
|
templates[name] = template.Must(template.ParseFiles("base.tmpl", name))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Eventually we will need to load a font file for label printing.
|
||||||
|
// - The path might be part of configuration, or implicit by filename.
|
||||||
|
|
||||||
http.HandleFunc("/login", wrap(handleLogin))
|
http.HandleFunc("/login", wrap(handleLogin))
|
||||||
http.HandleFunc("/logout", sessionWrap(wrap(handleLogout)))
|
http.HandleFunc("/logout", sessionWrap(wrap(handleLogout)))
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user