Skip to content

Commit 12ba9d0

Browse files
committed
Added PDF utilities
1 parent 01dbff0 commit 12ba9d0

14 files changed

+43
-193
lines changed

azure/iot-edge-containerized/README.md

-5
This file was deleted.

azure/iot-edge-containerized/entrypoint.sh

-41
This file was deleted.

azure/iot-edge-module/.gitignore

-1
This file was deleted.

azure/iot-edge-module/Dockerfile

-15
This file was deleted.

azure/iot-edge-module/README.md

-64
This file was deleted.

azure/iot-edge-module/iot-edge-deployment.json.template

-64
This file was deleted.

other/sovreign-compute/docker/Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ FROM debian:latest
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

5-
COPY *.sh /sovreign/
5+
COPY install*.sh /sovreign/
6+
COPY pdf*.sh /usr/local/bin/
67
COPY .gotty /root/.gotty
78

8-
RUN ls /sovreign/ && /bin/sh /sovreign/install_utilities.sh && \
9+
RUN /bin/sh /sovreign/install_utilities.sh && \
910
/bin/sh /sovreign/install_tailscale.sh && \
1011
/bin/sh /sovreign/install_go.sh && \
1112
/bin/sh /sovreign/install_rust.sh && \
1213
/bin/sh /sovreign/install_uv.sh && \
1314
/bin/sh /sovreign/install_gotty.sh && \
14-
rm /sovreign/install*.sh
15+
rm -rf /sovreign
1516

1617
ENV PATH="/usr/local/go/bin:${HOME}/.cargo/bin:source:${HOME}/.local/bin:${PATH}"

other/sovreign-compute/docker/install_utilities.sh

+3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ apt-get install -yq \
77
build-essential \
88
curl \
99
git \
10+
imagemagick \
1011
jq \
1112
nano \
13+
poppler-tools \
1214
procps \
15+
qpdf \
1316
sudo \
1417
supervisor \
1518
tmux \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo -n "Password: "
6+
read -s PASSWORD1
7+
echo ""
8+
echo -n "Password (repeat): "
9+
read -s PASSWORD2
10+
echo ""
11+
if [ "$PASSWORD1" == "$PASSWORD2" ]; then
12+
mv $1 _$1
13+
qpdf --encrypt $PASSWORD $PASSWORD 256 -- $1 _$1
14+
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
convert $1 $2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
pdfunite $@
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
# - screen: 75dpi
6+
# - ebook: 150dpi
7+
# - printer: 300dpi
8+
9+
mv $1 _$1
10+
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$1 _$1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
pdfseparate -f 1 -l 1 $1 %03d.$1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
convert -density 300 $1 $2

0 commit comments

Comments
 (0)