Browse Source

Other fixes.

master
Franco Masotti 2 years ago
parent
commit
868e63bbe6
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 6
      README.rst
  2. 2
      assets/buy_me_a_coffee.svg
  3. 1
      automated_tasks/archiving/archive-invoice-files.myuser.service
  4. 1
      automated_tasks/archiving/archive-invoice-files.myuser.timer
  5. 3
      automated_tasks/archiving/archive_media_with_label.yaml
  6. 1
      automated_tasks/archiving/pdftoocr.myuser_documents.conf
  7. 1
      automated_tasks/archiving/pdftoocr.myuser_documents.service
  8. 1
      automated_tasks/archiving/pdftoocr.myuser_documents.timer
  9. 1
      automated_tasks/archiving/pdftoocr_deploy.myuser_documents.conf
  10. 1
      automated_tasks/archiving/youtube-dl.some_subject.service
  11. 3
      automated_tasks/audio/set-turntable-loopback-sound.asoundrc
  12. 1
      automated_tasks/audio/set-turntable-loopback-sound.service
  13. 1
      automated_tasks/desktop/random-wallpaper.timer
  14. 1
      automated_tasks/desktop/random_wallpaper.sh
  15. 1
      automated_tasks/desktop/set_display_gamma.TV_HDMI1.conf
  16. 1
      automated_tasks/desktop/set_display_gamma.sh
  17. 1
      automated_tasks/drives/mdadm-check.timer
  18. 2
      automated_tasks/drives/smartd-test.ata_disk1.service
  19. 1
      automated_tasks/drives/xfs-defrag.my_uuid.service
  20. 1
      automated_tasks/drives/xfs-defrag.my_uuid.timer
  21. 1
      automated_tasks/drives/xfs_defrag.conf
  22. 6
      automated_tasks/file-sharing/rtorrent.rc
  23. 1
      automated_tasks/misc/monitor-and-notify-git-repo-changes.myrepos.service
  24. 1
      automated_tasks/misc/monitor-and-notify-git-repo-changes.myrepos.timer
  25. 1
      automated_tasks/misc/monitor_and_notify_git_repo_changes.myrepos.conf
  26. 15
      automated_tasks/misc/vdirsyncer.service
  27. 17
      automated_tasks/misc/vdirsyncer.timer
  28. 1
      automated_tasks/misc/yacy-search-server.service
  29. 1
      automated_tasks/system/clean_pacman.sh
  30. 3
      automated_tasks/system/hblock-unbound.service
  31. 1
      automated_tasks/system/hblock-unbound.timer
  32. 2
      automated_tasks/system/hblock_unbound.footer.conf
  33. 1
      automated_tasks/system/hblock_unbound.header.conf
  34. 2
      automated_tasks/system/iptables-geoport.timer
  35. 2
      automated_tasks/system/iptables_geoport.yaml
  36. 2
      automated_tasks/system/roothints.timer
  37. 2
      automated_tasks/video/convert_videos.yaml
  38. 7
      docs/conf.py
  39. 1
      docs/copyright_license.rst
  40. 4
      docs/helper_scripts.rst
  41. 2
      docs/introduction.rst
  42. 8
      docs/rules.rst
  43. 10
      docs/running.rst
  44. 34
      docs/scripts.rst
  45. 3
      utils/deploy.py
  46. 3
      utils/prepare_environment.py

6
README.rst

@ -7,7 +7,7 @@ automated-tasks
:alt: Buy me a coffee
:target: https://buymeacoff.ee/frnmst
A collection of `free software <https://www.gnu.org/philosophy/free-sw.html>`_
A collection of `free software <https://www.gnu.org/philosophy/free-sw.html>`_
scripts that I currently use on my computer systems.
.. image:: assets/logo.png
@ -27,9 +27,9 @@ https://frnmst.github.io/automated-tasks/
Assets' credits
---------------
- the *Hey! Read this.* image reported here is released under the
- the *Hey! Read this.* image reported here is released under the
`CC BY 2.0 license <https://creativecommons.org/licenses/by/2.0/>`_ by
Michael Downey. See the
Michael Downey. See the
`original source <https://www.flickr.com/photos/michaeljdowney/2174625842>`_.
- the logo is composed of three pictures:

2
assets/buy_me_a_coffee.svg

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="106" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="106" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555555" d="M0 0h31v20H0z"/><path fill="#ff813f" d="M31 0h75v20H31z"/><path fill="url(#b)" d="M0 0h106v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="165" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="210">buy</text><text x="165" y="140" transform="scale(.1)" textLength="210">buy</text><text x="675" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="650">me a coffee</text><text x="675" y="140" transform="scale(.1)" textLength="650">me a coffee</text></g> </svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="106" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="106" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555555" d="M0 0h31v20H0z"/><path fill="#ff813f" d="M31 0h75v20H31z"/><path fill="url(#b)" d="M0 0h106v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="165" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="210">buy</text><text x="165" y="140" transform="scale(.1)" textLength="210">buy</text><text x="675" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="650">me a coffee</text><text x="675" y="140" transform="scale(.1)" textLength="650">me a coffee</text></g> </svg>

Before

Width:  |  Height:  |  Size: 964 B

After

Width:  |  Height:  |  Size: 965 B

1
automated_tasks/archiving/archive-invoice-files.myuser.service

@ -11,4 +11,3 @@ Group=myuser
[Install]
WantedBy=multi-user.target

1
automated_tasks/archiving/archive-invoice-files.myuser.timer

@ -7,4 +7,3 @@ Persistent=true
[Install]
WantedBy=timers.target

3
automated_tasks/archiving/archive_media_with_label.yaml

@ -34,7 +34,7 @@ checksum:
upper label:
length: 2
separator:
separator:
elements: '_'
new name original file name: '__'
@ -42,4 +42,3 @@ separator:
upper label lower label: '
'

1
automated_tasks/archiving/pdftoocr.myuser_documents.conf

@ -1,4 +1,3 @@
DOCUMENT_DIR='/home/myuser/Documents'
INPUT_FILENAME='out.pdf'
EXPECTED_USER='myuser'

1
automated_tasks/archiving/pdftoocr.myuser_documents.service

@ -9,4 +9,3 @@ Group=myuser
[Install]
WantedBy=multi-user.target

1
automated_tasks/archiving/pdftoocr.myuser_documents.timer

@ -7,4 +7,3 @@ Persistent=true
[Install]
WantedBy=timers.target

1
automated_tasks/archiving/pdftoocr_deploy.myuser_documents.conf

@ -6,4 +6,3 @@ GRAYSCALE='y'
# If this file exists the GRAYSCALE variable will be set to 'n'.
# This file also gets deleted at the end of the script.
COLOR_OVERRIDE_FILE='color'

1
automated_tasks/archiving/youtube-dl.some_subject.service

@ -11,4 +11,3 @@ Group=myuser
[Install]
WantedBy=multi-user.target

3
automated_tasks/audio/set-turntable-loopback-sound.asoundrc

@ -6,7 +6,7 @@
# Creative Commons Attribution-ShareAlike 3.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-sa/3.0/>.
# work. If not, see <http://creativecommons.org/licenses/by-sa/3.0/>.
# The license is assumed to be the same one as the Gentoo wiki.
@ -98,4 +98,3 @@ pcm.!default {
pcm "main"
}
}

1
automated_tasks/audio/set-turntable-loopback-sound.service

@ -11,4 +11,3 @@ Group=mydesktopuser
[Install]
WantedBy=multi-user.target

1
automated_tasks/desktop/random-wallpaper.timer

@ -7,4 +7,3 @@ Persistent=true
[Install]
WantedBy=timers.target

1
automated_tasks/desktop/random_wallpaper.sh

@ -13,4 +13,3 @@ set -euo pipefail
CONFIG="${1}"
DISPLAY=:0 feh --bg-center "$(shuf -n1 "${CONFIG}" --random-source=/dev/urandom)"

1
automated_tasks/desktop/set_display_gamma.TV_HDMI1.conf

@ -1,4 +1,3 @@
XORG_DISPLAY_ID=':0'
DISPLAY_OUTPUT='HDMI1'
GAMMA_OPTION='1.1:1.1:1.1'

1
automated_tasks/desktop/set_display_gamma.sh

@ -16,4 +16,3 @@ CONFIG="${1}"
export DISPLAY="${XORG_DISPLAY_ID}"
/usr/bin/xrandr --output "${DISPLAY_OUTPUT}" --gamma "${GAMMA_OPTION}"

1
automated_tasks/drives/mdadm-check.timer

@ -7,4 +7,3 @@ Persistent=true
[Install]
WantedBy=timers.target

2
automated_tasks/drives/smartd-test.ata_disk1.service

@ -3,7 +3,7 @@ Description=execute smartd on ata-disk1
[Service]
Type=simple
ExecStart=/home/jobs/scripts/by-user/root/smartd_test.py /home/jobs/scripts/by-user/root/smartd_test.yaml ata-disk1
ExecStart=/home/jobs/scripts/by-user/root/smartd_test.py /home/jobs/scripts/by-user/root/smartd_test.yaml ata-disk1
User=root
Group=root

1
automated_tasks/drives/xfs-defrag.my_uuid.service

@ -9,4 +9,3 @@ Group=root
[Install]
WantedBy=multi-user.target

1
automated_tasks/drives/xfs-defrag.my_uuid.timer

@ -7,4 +7,3 @@ Persistent=true
[Install]
WantedBy=timers.target

1
automated_tasks/drives/xfs_defrag.conf

@ -27,4 +27,3 @@ gotify token = <app token>
gotify title = XFS defragmentation
gotify message = defragmented my-uuid
gotify priority = 5

6
automated_tasks/file-sharing/rtorrent.rc

@ -56,9 +56,9 @@ encryption = require,require_RC4,allow_incoming,try_outgoing
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
#
dht = auto
# UDP port to use for DHT.
#
# UDP port to use for DHT.
#
dht_port = 6881

1
automated_tasks/misc/monitor-and-notify-git-repo-changes.myrepos.service

@ -9,4 +9,3 @@ Group=gitea
[Install]
WantedBy=multi-user.target

1
automated_tasks/misc/monitor-and-notify-git-repo-changes.myrepos.timer

@ -7,4 +7,3 @@ Persistent=true
[Install]
WantedBy=timers.target

1
automated_tasks/misc/monitor_and_notify_git_repo_changes.myrepos.conf

@ -31,4 +31,3 @@ GOTIFY_PRIORITY='5'
# Check repository every CHECK_TIMEOUT_INTERVAL_SECONDS seconds.
CHECK_TIMEOUT_INTERVAL_SECONDS=1800

15
automated_tasks/misc/vdirsyncer.service

@ -2,8 +2,8 @@
# Copyright (C) 2019 by Franco Masotti
#
# Some rights reserved.
#
# Redistribution and use in source and binary forms of the software
#
# Redistribution and use in source and binary forms of the software
# as well as documentation, with or without modification,
# are permitted provided that the following conditions are met:
#
@ -16,11 +16,11 @@
# THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
# THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
# AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[Unit]
@ -37,4 +37,3 @@ Group=mydesktopuser
[Install]
WantedBy=multi-user.target

17
automated_tasks/misc/vdirsyncer.timer

@ -1,11 +1,11 @@
# Copyright (c) 2014-2016 by Markus Unterwaditzer & contributors. See AUTHORS.rst for more details.
#
# Some rights reserved.
#
# Redistribution and use in source and binary forms of the software
#
# Redistribution and use in source and binary forms of the software
# as well as documentation, with or without modification,
# are permitted provided that the following conditions are met:
#
#
# - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice, this list of conditions
# and the following disclaimer in the documentation and/or other materials provided with the distribution.
@ -15,11 +15,11 @@
# THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
# THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
# AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[Unit]
@ -32,4 +32,3 @@ AccuracySec=5m
[Install]
WantedBy=timers.target

1
automated_tasks/misc/yacy-search-server.service

@ -11,4 +11,3 @@ Group=yacy
[Install]
WantedBy=multi-user.target

1
automated_tasks/system/clean_pacman.sh

@ -24,4 +24,3 @@ orphans=$(pacman --query --unrequired --deps --quiet) \
&& pacman --remove --nosave --recursive ${orphans} --noconfirm --verbose
sync

3
automated_tasks/system/hblock-unbound.service

@ -5,10 +5,9 @@ After=network-online.target
[Service]
Type=simple
ExecStart=/home/jobs/scripts/by-user/root/hblock_unbound.sh /home/jobs/scripts/by-user/root/hblock_unbound.yaml
ExecStart=/home/jobs/scripts/by-user/root/hblock_unbound.sh /home/jobs/scripts/by-user/root/hblock_unbound.yaml
User=root
Group=root
[Install]
WantedBy=multi-user.target

1
automated_tasks/system/hblock-unbound.timer

@ -7,4 +7,3 @@ Persistent=true
[Install]
WantedBy=timers.target

2
automated_tasks/system/hblock_unbound.footer.conf

@ -5,5 +5,3 @@ forward-zone:
# Fallback to use in case dnscrypt-proxy doesn't work:
# forward-addr: 8.8.8.8

1
automated_tasks/system/hblock_unbound.header.conf

@ -15,4 +15,3 @@ do-not-query-localhost: no
# Local addresses.
local-data: "something. 31536000 IN A 192.168.0.1"

2
automated_tasks/system/iptables-geoport.timer

@ -4,6 +4,6 @@ Description=Apply the iptables geoport rules monthly
[Timer]
OnCalendar=monthly
Persistent=true
[Install]
WantedBy=timers.target

2
automated_tasks/system/iptables_geoport.yaml

@ -25,7 +25,7 @@ logging enabled: true
# {rude,polite}
invalid packet policy: 'rude'
# The path where the ip addresses list will be saved.
# The path where the ip addresses list will be saved.
cache directory: './.cache'
# Have a look at https://www.ipdeny.com/ipblocks/

2
automated_tasks/system/roothints.timer

@ -16,6 +16,6 @@ Description=Run root.hints monthly
[Timer]
OnCalendar=monthly
Persistent=true
[Install]
WantedBy=timers.target

2
automated_tasks/video/convert_videos.yaml

@ -242,7 +242,7 @@ device:
controls: 'brightness=128,contrast=64,saturation=32,hue=0,chroma_gain=57'
# PAL video is approximately 720x576 resolution. VHS tapes have about half the horizontal quality, but this post convinced me to encode at 720x576 anyway:
# http://forum.videohelp.com/threads/215570-Sensible-resolution-for-VHS-captures?p=1244415#post1244415
# http://forum.videohelp.com/threads/215570-Sensible-resolution-for-VHS-captures?p=1244415#post1244415
capabilities: 'video/x-raw, format=UYVY, framerate=25/1, width=720, height=576'
# Set these based on your hardware/location (search Wikipedia for the exact norm in your country)

7
docs/conf.py

@ -33,10 +33,9 @@ release = '7.0.0'
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx_rtd_theme',
'sphinx.ext.githubpages',
]
'sphinx.ext.coverage',
'sphinx_rtd_theme',
'sphinx.ext.githubpages']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

1
docs/copyright_license.rst

@ -17,4 +17,3 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

4
docs/helper_scripts.rst

@ -33,7 +33,7 @@ To remove a service or a timer you either do it manually or:
The script will take care of blacklisting the units.
In case you want to enable the unit it again, simply uncomment
In case you want to enable the unit it again, simply uncomment
the section and re-run the deploy script.
Programming languages
@ -69,7 +69,7 @@ Purpose
~~~~~~~
This script copies all the scripts and their systemd unit files, as well as ``deploy.py``
to the appropriate places
to the appropriate places
.. note:: This file is generated dynamically by ``prepare_environment.py``.

2
docs/introduction.rst

@ -5,7 +5,7 @@ This repository contains a collection of scripts that I have written and/or adap
Releasing them to the public is a way to improve their quality as well as to
simplify their deployment.
Another goal is to provide reusable programs: a clear separation between a script and
Another goal is to provide reusable programs: a clear separation between a script and
the configuration makes it possible to reuse the same code for multiple circumstances.
Automation

8
docs/rules.rst

@ -62,8 +62,8 @@ Variable name Description
Schema
``````
.. important:: Since `commit 8852e61 <https://github.com/frnmst/automated-tasks/commit/8852e6109bbf6bfffcadaf2727e62f6f4eed3e67>`_
the metadata file is generated dynamically using the
.. important:: Since `commit 8852e61 <https://github.com/frnmst/automated-tasks/commit/8852e6109bbf6bfffcadaf2727e62f6f4eed3e67>`_
the metadata file is generated dynamically using the
``YAML data`` sections of the scripts documentation.
.. important:: Optional elements must be omitted if empty.
@ -80,10 +80,10 @@ The following schema represents a single entry translated into HTML.
<img src="assets/image/${script_name}_${i}"> # i = 0->n
<h4>Purpose</h4> # required
<p></p> # required
<h4>Examples</h4>
<h4>Examples</h4>
<p></p>
<h4>Steps</h4> # an implicit step for all the scripts is to edit the configuration file{,s}
<ol>
<ol>
<li></li> # 1->n
</ol>
<h4>References</h4>

10
docs/running.rst

@ -29,11 +29,11 @@ Once everyting is installed you can run the usual systemd commands such as:
systemctl list-timers
systemctl status ${service_or_timer}
systemctl start ${service_or_timer}
systemctl stop ${service_or_timer}
systemctl enable ${service_or_timer}
systemctl disable ${service_or_timer}
systemctl status ${service_or_timer}
systemctl start ${service_or_timer}
systemctl stop ${service_or_timer}
systemctl enable ${service_or_timer}
systemctl disable ${service_or_timer}
systemctl daemon-reload

34
docs/scripts.rst

@ -125,7 +125,7 @@ Dependencies
+======================+============+==================+
| Python | - python3 | 3.8.5 |
+----------------------+------------+------------------+
| fpyutils | | 1.2.0 |
| fpyutils | | 1.2.0 |
+----------------------+------------+------------------+
| exiftool | - exiftool | 12.00 |
+----------------------+------------+------------------+
@ -172,8 +172,8 @@ I use this script to transform paper documents in ocr'd PDFs.
Examples
~~~~~~~~
This script processes one file per directory. The output filename
will be the SHA 1 sum of the directory name. For example, given ``documents/a/out.pdf``,
This script processes one file per directory. The output filename
will be the SHA 1 sum of the directory name. For example, given ``documents/a/out.pdf``,
three files will result:
================================================================ =====================================================================================================================================================================================
@ -184,7 +184,7 @@ File name Description
``documents/a/SHA512SUMS`` a checksum file containing the SHA 512 checksums of ``documents/a/86f7e437faa5a7fce15d1ddcb9eaeaea377667b8.pdf`` and ``documents/a/86f7e437faa5a7fce15d1ddcb9eaeaea377667b8.pdf.txt``
================================================================ =====================================================================================================================================================================================
Infact ``$ echo -n 'a' | sha1sum``
Infact ``$ echo -n 'a' | sha1sum``
corresponds to ``86f7e437faa5a7fce15d1ddcb9eaeaea377667b8``.
Steps
@ -315,7 +315,7 @@ Dependencies
+----------------------+----------------+------------------+
| aria2 | | 1.35.0 |
+----------------------+----------------+------------------+
| fpyutils | | 1.2.0 |
| fpyutils | | 1.2.0 |
+----------------------+----------------+------------------+
Configuration files
@ -375,7 +375,7 @@ During this process, cryptographical signatures and integrity checks are perform
Steps
~~~~~
1. Create a new virtual environment as explained in
1. Create a new virtual environment as explained in
`this post <https://gitlab.com/frnmst/frnmst.gitlab.io/blob/master/_posts/2019-11-10-running-python-scripts-with-different-package-versions.md>`_,
and call it ``archive_invoice_files``
2. optionally run common command 1
@ -416,7 +416,7 @@ Dependencies
+----------------------------+------------+------------------+
| fattura-elettronica-reader | | 1.0.0 |
+----------------------------+------------+------------------+
| fpyutils | | 1.2.0 |
| fpyutils | | 1.2.0 |
+----------------------------+------------+------------------+
Licenses
@ -1105,7 +1105,7 @@ Dependencies
Configuration files
~~~~~~~~~~~~~~~~~~~
Only 1 URL or path is allowed per line. feh will raise an error
Only 1 URL or path is allowed per line. feh will raise an error
if an empty line is parsed.
.. important:: The configuration file must contain only URLs or paths.
@ -1228,7 +1228,7 @@ Steps
one you want to work on
2. optionally run common command 1
.. important:: To avoid tests being interrupted you must avoid putting the
.. important:: To avoid tests being interrupted you must avoid putting the
disks to sleep, therefore, programs like
`hd-idle <https://hd-idle.sourceforge.net/>`_ must be stopped
before running the tests.
@ -1680,7 +1680,7 @@ Purpose
My `Gitea <https://gitea.io/en-us/>`_ instance is configured to mirror
some repositories. Every 30 minutes this script checks for new
commits in those bare git repositories. If something new
is commited a notification is sent to my `Gotify <https://github.com/gotify/server>`_
is commited a notification is sent to my `Gotify <https://github.com/gotify/server>`_
instance.
.. note:: This script also works for non-bare git repositories.
@ -1769,7 +1769,7 @@ Steps
.. note:: To install YaCy you need the `OpenJDK Java 13 headless runtime environment <https://openjdk.java.net/>`_ package.
2. run common command 2 using ``yacy`` as parameter
3. clone the YaCy search server repository into ``/home/yacy``:
3. clone the YaCy search server repository into ``/home/yacy``:
::
@ -1924,7 +1924,7 @@ internal network.
Steps
~~~~~
1. separate Unbound's configuration into a header and footer file.
1. separate Unbound's configuration into a header and footer file.
Have a look at the provided configuration files.
2. clone the hblock repository: ``$ git clone https://github.com/hectorm/hblock.git``
@ -1969,7 +1969,7 @@ In case something goes wrong you can use this fallback command:
# cat hblock_unbound.header.conf hblock_unbound.footer.conf > /etc/unbound/unbound.conf
.. note:: The provided configuration files are designed to work
.. note:: The provided configuration files are designed to work
along with `dnscrypt-proxy 2 <https://github.com/jedisct1/dnscrypt-proxy>`_
Licenses
@ -2403,7 +2403,7 @@ Purpose
~~~~~~~
I use this script to record video streams captured by webcams
with `Motion <https://motion-project.github.io/>`_.
with `Motion <https://motion-project.github.io/>`_.
.. important:: We will assume that Motion is already configured and running.
@ -2439,7 +2439,7 @@ Dependencies
Configuration files
~~~~~~~~~~~~~~~~~~~
You can use hardware acceleration instead of using software for the encoding
You can use hardware acceleration instead of using software for the encoding
process. Using hardware acceleration should reduce the load on the processor:
"Hardware encoders typically generate output of significantly lower quality than good software encoders like x264, but are generally faster and do not use much CPU resource. (That is, they require a higher bitrate to make output with the same perceptual quality, or they make output with a lower perceptual quality at the same bitrate.)"
@ -2532,7 +2532,7 @@ Have a look at
For DVDs I use a standard 5.25'' SATA DVD drive.
When everything is set I start to encode a video. Transcoding is done
on a different computer, a server, because its processor has a couple of extra
on a different computer, a server, because its processor has a couple of extra
cores and it is much more recent.
References
@ -2626,5 +2626,3 @@ YAML data
service:
- convert-videos.samsung.service
<!--YAML-->

3
utils/deploy.py

@ -66,7 +66,8 @@ def copy_unit_files(unit_files: list, dst_dir: str = DST_DIR):
def start_and_enable_unit(unit_name: str, unit_type: str):
r"""Start and enable services or timers."""
assert unit_type in ['service', 'timer']
if unit_type not in ['service', 'timer']:
raise ValueError
print('unit: ' + unit_name + '.' + unit_type)
o1 = subprocess.run(shlex.split('systemctl enable ' +

3
utils/prepare_environment.py

@ -56,7 +56,8 @@ def gen_copy_file_command(src: str, dst: str) -> str:
def print_commands(commands: list):
for command in commands:
assert isinstance(command, str)
if not isinstance(command, str):
raise TypeError
for command in commands:
print(command)

Loading…
Cancel
Save