-
Notifications
You must be signed in to change notification settings - Fork 1
/
label-printer
executable file
·78 lines (60 loc) · 2.16 KB
/
label-printer
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# autogenerate [README](README.md)
generate_description(){
find "$1" -maxdepth 1 -type f -not -path '*/\.*' |
sort |
while read -r script; do
[ "$(sed -n '/^#!/p;q' "$script")" ] || continue
filename="$(basename -- "$script")"
echo -n "* [${filename%.*}]($script) "
sed -n 2p "$script" | sed 's/ *# *//g;s/ *""" *//g'
done
}
generate_blueprints(){
find "./blueprints" -maxdepth 1 -type f -not -name README.md |
sort |
while read -r script; do
file="$(basename "$script")"
title="$(head -n 1 "$script" | sed 's/ *# *//g')"
echo "* [$title]($file)"
done
}
generate_icons(){
echo '<p align="center">'
find ./powertools/toolicons/512x512/devices -type f -name "computer-*.png" |
sort |
xargs printf ' <img src="%s" width=64/>\n'
echo '</p>'
}
echo \
"# :blue_book: Blueprints
Notes I take on my linux ~~tribulations~~ adventures in case I ever need to repeat them
## Index
$(generate_blueprints)" >| blueprints/README.md
git add blueprints/README.md
echo \
"$(generate_icons)
----
# Toolbelt
Collection of scripts, dotfiles and self-created guides that follow me on all
of my linux adventures
## :hammer: [Powertools](powertools) (.dotfiles)
Static config files
## 🧰 [Toolbox](toolbox)(scripts)
Scripts used in the terminal or on a keybind
$(generate_description "toolbox")
## :wrench: [Toolkit](powertools/dmenu/scripts) (dmenu scripts)
Scripts launched from my [menu](toolbox/menu.tool)
$(generate_description "powertools/dmenu/scripts")
## :iphone: [Handtools](handtools)
Scripts I use on my phone (used with [Tasker](https://tasker.joaoapps.com/) and
[Termux](https://github.com/termux/termux-app))
$(generate_description "powertools/termux/handtools")
## :link: Install
Installation scripts I use to setup my dotfiles
$(generate_description .)
## :blue_book: [Blueprints](blueprints)
Notes I take on my linux ~~tribulations~~ adventures in case I ever need to repeat them
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details" >| README.md
git add README.md