-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
executable file
·50 lines (38 loc) · 1.4 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
#########################################
# Printer prerequisites
#########################################
# Install printer system dependencies
sudo apt-get update
sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python-serial python-pil python-unidecode -y
# # Install printer driver (CUPS filter). Disregard g++ warning.
git clone https://github.com/adafruit/zj-58
pushd zj-58
make
sudo ./install
popd
# # Make printer the default printer
# # Note the baud rate number may differ depending on printer
sudo lpadmin -p ZJ-58 -E -v serial:/dev/serial0?baud=19200 -m zjiang/ZJ-58.ppd
sudo lpoptions -d ZJ-58
# Test printer
# stty -F /dev/serial0 19200
# echo -e "This is a test.\\n\\n" > /dev/serial0
# Restart system
# sudo reboot
# Clone Adafruit Python Thermal Printer library repo
git clone [email protected]:adafruit/Python-Thermal-Printer.git
cp Python-Thermal-Printer/Adafruit_Thermal.py ../
#########################################
# Generally useful
#########################################
sudo apt-get install vim -y
#########################################
# NYT mini xword script prerequisites
#########################################
# Install nvm; node v14+ required
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install v14.4.0
# Needed for Puppeteer
sudo apt-get install chromium-browser -y