Skip to content

Commit 63d69db

Browse files
committed
install-info and deps
1 parent c425114 commit 63d69db

File tree

6 files changed

+62
-74
lines changed

6 files changed

+62
-74
lines changed

CONTACT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# LabelPush
1+
# Contact Info
22

33
- Author: Matteljay
44
- E-mail: Matteljay-at-pm-dot-me

README.md

Lines changed: 52 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,105 @@
1-
# LabelPush - Lightweight label printing app
1+
# LabelPush
2+
## Simple lightweight label printing app
23

34
- License: MIT License
45
- Author: Matteljay
56
- Language: Python (>= 3.5)
67
- Homepage: https://github.com/Matteljay
78

9+
810
## Screenshots
911

1012
![](screenshots/01_welcome.png)
1113
![](screenshots/02_hello_serif.png)
1214
![](screenshots/03_hello_double_bold.png)
1315
![](screenshots/04_settings.png)
1416

15-
## Getting started
1617

17-
LabelPush is a lightweight label printing application written in Python.
18-
It is built to be fast and simple to use. The CUPS printing system is
19-
used. So make sure the printer is correctly installed with all default
20-
settings such as label size. This link should take you to your local
18+
## Introduction
19+
20+
LabelPush is a simple lightweight label printing application written in Python.
21+
It is built to be fast and simple to use. The CUPS printing system is used.
22+
Please make sure the printer is correctly installed with all correct
23+
settings such as label/paper size. This link should take you to your local
2124
settings: [CUPS-localhost](http://localhost:631/printers/)
2225

26+
2327
## Installation
2428

25-
Two libraries, the Kivy cross-platform GUI and Pillow imaging library
26-
are required for LabelPush. Arch Linux (Manjaro) is very up-to-date,
27-
installation will be very quick. This will be briefly explained below.
29+
Package dependencies are kept to a minimum. The proper installation guides
30+
for your system can be found via these links:
2831

29-
Unfortunately most Debian-based systems like Linux Mint and Ubuntu Linux
30-
do not have the required up-to-date versions of these libraries.
32+
- [Kivy](https://kivy.org/doc/stable/installation/installation.html) & [Pillow](https://python-pillow.org/)
33+
Version 1.10.1 with SDL2 window provider are required! (NOT 1.9 with PyGame).
34+
An updated Python Imaging Library is always recommended with a graphical Python program. And definitely required for LabelPush.
3135

32-
However the requirements can be compiled and installed via the Python
33-
package management system 'pip'. To be able to compile, install at least
34-
these system packages via apt-get or the Synaptic Package Manager:
36+
- [pip3](https://github.com/pypa/pip) & [setuptools](https://github.com/pypa/setuptools)
37+
These are Python 3 installation tools. Universally useful!
3538

36-
sudo apt-get install python3-pip python3-dev python3-setuptools \
37-
libgl1-mesa-dev xclip
39+
- [CUPS](https://www.cups.org/)
40+
Printer server for macOS and other UNIX-like operating systems.
3841

39-
### Option 1
42+
### Debian Linux
4043

41-
Now, get a copy of LabelPush. The 'whl' file from the
42-
[releases-page](https://github.com/Matteljay/labelpush/releases) is
43-
the easiest to work with. It does not require extracting, simply run:
44+
For most up-to-date Debian based systems like Ubuntu Linux and Linux Mint this should work *as root*:
4445

45-
sudo pip3 install /path/to/file.whl
46+
add-apt-repository ppa:kivy-team/kivy
47+
apt-get install python3-kivy python3-pip python3-setuptools
48+
pip3 install --upgrade pillow labelpush
4649

47-
All of the requirements should now get downloaded, compiled and
48-
automatically installed. This can take a while. When finished, the
49-
shortcut can be found from your menu-bar in the 'Office' category.
50-
If the icon does not show up, you may need to restart your desktop.
50+
### Arch Linux
5151

52-
### Option 2
52+
For the more up-to-date Arch Linux (Manjaro) simply run *as root*:
5353

54-
Alternatively, you can install from tar.gz or the GitHub master tree.
55-
First, extract the archive. Then run from within the extracted folder:
54+
pacman -S python-kivy python-pillow python-pip python-setuptools
55+
pip3 install labelpush
5656

57-
sudo pip3 install .
5857

59-
### Option 3
58+
## How to launch
6059

61-
Alternatively, you can run it without installing to the root
62-
filesystem. Again, extract the downloaded archive. Then run:
60+
When finished, the shortcut icon can be found from your menu-bar in the **Office** category.
61+
If the icon does not show up, you may need to restart your desktop.
62+
Alternatively, open your graphical user terminal and type **labelpush.py**
6363

64-
pip3 install --user -r requirements.txt
65-
./labelpush.py
6664

67-
### Arch Linux
65+
## For developers, hackers and testers
6866

69-
Now, let's have a look at Arch Linux. Install these packages:
67+
Other ways to install are explained below. The above dependencies are still required!
68+
Only use the info below if you know what you are doing.
7069

71-
sudo pacman -S python-kivy python-pillow python-setuptools cython
70+
### Option 1
7271

73-
You can now choose from the 3 methods above, they will execute much
74-
faster as no compilations are required:
72+
You can install from tar.gz or the GitHub master tree.
73+
First, download and extract the archive from the [releases](https://github.com/Matteljay/labelpush/releases) page.
74+
Then run from within the extracted folder:
7575

76-
sudo pip3 install /path/to/file.whl
7776
sudo pip3 install .
78-
./labelpush.py
79-
8077

81-
## Development version
82-
83-
Optionally, you can use git:
84-
85-
git clone git://github.com/Matteljay/labelpush.git
86-
cd labelpush
78+
### Option 2
8779

88-
This should install dependencies:
80+
Alternatively, you can run it without installing to the root
81+
filesystem. Again, extract the downloaded archive. Then run:
8982

9083
pip3 install --user -r requirements.txt
84+
./labelpush.py
9185

9286

93-
## Other platforms
94-
95-
96-
### Linux distributions
97-
98-
This application should work on other up-to-date flavors of Linux like
99-
Slackware, Gentoo, openSUSE, Fedora, Red Hat, Mandriva, CentOS,...
87+
## More platforms
10088

101-
FreeBSD (TrueOS) and macOS are Linux based but are also untested.
89+
### Other UNIX
10290

91+
Other flavors of Linux are untested but there is no reason for them
92+
not to work. Slackware, Gentoo, openSUSE, Fedora, Red Hat, Mandriva, CentOS,...
10393

104-
### Windows
94+
### Android, iPhone and Windows
10595

106-
Although Python and the required libraries are cross-platform, this
107-
application will not work on Windows due to the big difference in
108-
printer software (no CUPS). If a strong desire exists, find a way to
96+
These platforms probably won't work as they feature different printer
97+
software (no CUPS). If a strong desire exists, find a way to
10998
motivate me :-)
11099

111100

112-
## Contact info & Donations
101+
## Contact info & donations
113102

114-
See [contact](CONTACT.md) file.
103+
See the [contact](CONTACT.md) file on GitHub.
115104

116105

labelpush.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
# -*- mode: python -*-
33
#
4-
# LabelPush - lightweight label printing app
4+
# LabelPush - Simple lightweight label printing app
55
# Copyright (C) 2018 Matteljay-at-pm-dot-me
66
#
77
# Permission is hereby granted, free of charge, to any person
@@ -64,7 +64,7 @@
6464
import shutil
6565

6666
name = 'labelpush'
67-
version = '2018.11.27'
67+
version = '2018.12.11'
6868
def_defaultcfg = {
6969
'lpname': 'default', # printer name
7070
'labw': 637, # labelwidth
@@ -81,9 +81,9 @@
8181
{ "type": "options", "title": "lp printername", "desc": "List of available printers from 'lpstat'",
8282
"section": "settings", "key": "lpname", "options": ["default"] },
8383
{ "type": "title", "title": "Label size and style" },
84-
{ "type": "numeric", "title": "Label width", "desc": "300 dpi -> 300 dots per 25.4 mm -> 1 mm = 11.8 dots",
84+
{ "type": "numeric", "title": "Label width", "desc": "Horizontal resolution, paper size is set via CUPS! http://localhost:631",
8585
"section": "settings", "key": "labw" },
86-
{ "type": "numeric", "title": "Label height", "desc": "Example: 2+1/8 x 1 inch or approx 54 x 25 mm",
86+
{ "type": "numeric", "title": "Label height", "desc": "Vertical resolution, current ratio set for 2+1/8 x 1 inch or 54x25 mm",
8787
"section": "settings", "key": "labh" },
8888
{ "type": "options", "title": "Font selection", "desc": "Pick a font from 'fc-list :fontformat=TrueType'",
8989
"section": "settings", "key": "font", "options": ["DejaVuSans"] },
@@ -581,7 +581,7 @@ def normalize(v):
581581
pymod_versioncheck('pillow', PILLOW_VERSION, '5.3.0') # DO NOT USE the old python-pil, i tried and it sucks
582582
# Kivy handles command line arguments :-)
583583
#from argparse import ArgumentParser
584-
#parser = ArgumentParser(description='Lightweight label printing app')
584+
#parser = ArgumentParser(description='Simple lightweight label printing app')
585585
#parser.add_argument('-c', '--config', default=['~/.config/labelpush.ini'], dest='FILE', help='configuration file to use')
586586
#print(parser.parse_args())
587587
# GUI settings

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
setuptools >= 40.4.3
2-
Cython >= 0.28.5
3-
Pygame >= 1.9.4
1+
setuptools >= 20.7.0
42
Kivy >= 1.10.1
53
Pillow >= 5.3.0
4+

screenshots/04_settings.png

-218 Bytes
Loading

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
# to install directly, invoke via pip: sudo pip3 install .
3-
# to generate a whl file: ./setup.py bdist_wheel
3+
# packages for PyPI.org: ./setup.py sdist bdist_wheel && twine upload dist/*
44

55
import setuptools
66
import os, sys, re
@@ -30,7 +30,7 @@
3030
version = extracted_version,
3131
author = 'Matteljay',
3232
author_email = '[email protected]',
33-
description = 'Lightweight label printing app',
33+
description = 'Simple lightweight label printing app',
3434
long_description = long_description,
3535
long_description_content_type = 'text/markdown',
3636
url = 'https://github.com/Matteljay/labelpush',

0 commit comments

Comments
 (0)