Skip to content

Commit 96309c1

Browse files
committed
Improve readme, and minor cleanup.
1 parent 8f53179 commit 96309c1

10 files changed

Lines changed: 42 additions & 6 deletions

README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22

33
A GUI application for letting members log in on a public machine and interact with their data. It connects to a [makeradmin](https://github.com/makerspace/makeradmin) backend where the data resides. Memberbooth can perform the following:
44
* Display current member status (lab membership end date)
5-
* Print labels for storage boxes (with QR code that can be scanned with [box-terminator](https://github.com/makerspace/BoxTerminator-App)) and labels for other temporary storage.
5+
* Print labels for storage boxes (with QR code that can be scanned with the box-terminator functionality built-in to makeradmin) and labels for other temporary storage.
66

77
Optional Slack usage logging can be enabled.
88

9+
This is used at Stockholm Makerspace for their [memberbooth](https://wiki.makerspace.se/Memberbooth).
10+
11+
<img src="./examples/ui.png" style="max-width:400px;">
12+
913
## Prerequisites
1014

11-
* You need to obtain a token from the makeradmin backend that has the correct permissions for accessing the "memberbooth" endpoints.
15+
- You need to obtain a token from the makeradmin backend that has the correct permissions for accessing the "memberbooth" endpoints. You can find it in the Settings page.
1216

1317
## Installation
1418

19+
**Supported OS**: Linux (possibly works on mac and windows too, but not guaranteed)
20+
1521
Install the `uv` package manager: https://docs.astral.sh/uv/getting-started/installation/
1622

1723
## Usage
@@ -28,9 +34,39 @@ If you want to run against a custom backend (e.g. for development purposes), the
2834
### Logging in
2935
The memberbooth application is then logged in by running the *login.py* script. This script will log in to the backend and a optionally a slack notification system.
3036

31-
### Printing labels for members
37+
### Printing labels from the command line
3238
*print_label.py* prints labels for members.
3339

3440
```bash
3541
uv run ./print_label.py <member_number> --no-printer --type=box
3642
```
43+
44+
## Types of labels
45+
46+
Example label images can be found in the [examples directory](./examples):
47+
48+
### Box label
49+
<img src="./examples/box_label.png" alt="Box label example" style="max-width:200px;">
50+
51+
### Temporary storage label
52+
<img src="./examples/temp_storage_label.png" alt="Temporary storage label example" style="max-width:200px;">
53+
54+
### Warning label
55+
<img src="./examples/warning_label.png" alt="Warning label example" style="max-width:200px;">
56+
57+
### Name tag
58+
<img src="./examples/name_tag.png" alt="Name tag example" style="max-width:200px;">
59+
60+
### Meetup label
61+
<img src="./examples/meetup_label.png" alt="Meetup label example" style="max-width:200px;">
62+
63+
### 3D printer filament label
64+
<img src="./examples/3d_printer_filament_label.png" alt="3D printer filament label example" style="max-width:200px;">
65+
66+
## Supported printers
67+
68+
- [Brother QL 800](https://store.brother.se/catalogs/brothersweden/devices/label-printer/ql/ql800)
69+
- [Brother QL 800W](https://store.brother.se/catalogs/brothersweden/devices/label-printer/ql/ql810w)
70+
- Possibly more models in the Brother QL series
71+
72+
Note that the "Editor Lite" mode must be *off* for it to work.
11 KB
Loading

examples/box_label.png

29.4 KB
Loading

examples/meetup_label.png

20.1 KB
Loading

examples/name_tag.png

15.5 KB
Loading

examples/temp_storage_label.png

36.2 KB
Loading

examples/ui.png

153 KB
Loading

examples/warning_label.png

53.3 KB
Loading

print_label.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
def main() -> None:
2222
parser = argparse.ArgumentParser()
2323
group = parser.add_mutually_exclusive_group()
24-
parser.add_argument("--type", choices=["box", "temp", "3d", "warning", "meetup"], default="name")
24+
parser.add_argument("--type", choices=["box", "temp", "3d", "warning", "name", "meetup"], default="name")
2525
group.add_argument("-t", "--token_path", help="Path to Makeradmin token.", default=config.makeradmin_token_filename)
2626
group.add_argument("--development", action="store_true", help="Mock events")
2727
parser.add_argument("--no-backend", action="store_true", help="Mock backend (fake requests)")
@@ -92,7 +92,7 @@ def main() -> None:
9292
label = label_creator.create_label(uploaded_label)
9393

9494
if ns.no_printer:
95-
file_name = f'box_label_{member.member_number}_{str(int(time()))}.png'
95+
file_name = f'{member.member_number}_{ns.type}_{str(int(time()))}.png'
9696
logger.info(
9797
f'Program run with --no-printer, storing label image to {file_name} instead of printing it.')
9898
print(f"Saving box label to {file_name}")

src/label/creator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def create_warning_label(label: label_data.WarningLabel) -> Label:
371371
qr_code_wiki_link = create_qr_code(WIKI_LINK_MEMBER_STORAGE).make_image()
372372
labels: list[LabelObject] = [LabelImage(config.SMS_LOGOTYPE_PATH),
373373
LabelString(
374-
f'This project is, as of {datetime.today().date()}, violating our project marking rules. Unless corrected, the board may throw this away by {label.expires_at.strftime('%Y-%m-%d')}.',
374+
f'This project is, as of {label.base.created_at.date()}, violating our storage rules. Unless corrected, the board may throw this away by {label.expires_at.strftime('%Y-%m-%d')}.',
375375
multiline=True),
376376
*([LabelString(label.description, multiline=True)] if label.description else []),
377377
LabelString("More info on the following web page:"),

0 commit comments

Comments
 (0)