# Ghostscript password removal
gs -dNOPAUSE -dBATCH -q -sDEVICE=pdfwrite \
-sPDFPassword="${PDF_PASSWORD}" -sOutputFile=output.pdf -f input.pdf
# qpdf decrypt removing password
# https://jade.fyi/blog/workflow-pdfs/
qpdf --password="${PDF_PASSWORD}" --decrypt input.pdf output.pdf
Organise filenames matching, .*[%(id)s].{webm,mp4,mkv}
, into directories.
for f in *.{webm,mp4,mkv}; do
vid=$(printf "%s" "${f}" | sed -E 's/.*\[(.*)\].*$/\1/' ) &&
upid=$(yt -o "%(uploader_id)s" --print filename -- "${vid}") &&
mkdir -p "${upid}" &&
mv -v -t "${upid}" "${f}"
done
Fedora 42, removed the passwordsafe
package. Thus the impetus to migrate to
KeePassXC. This bash script converts pwsafe.xml
to tsv. Using yq
to output tsv
and awk
to replace .
seperator with /
in the group name.
yq -o tsv '
[["group","title","username","password","url","email","runcommand","notes"]] +
[.passwordsafe.entry[] |
[.group,.title,.username,.password,.url,.email,.runcommand,.notes]]' pwsafe.xml \
| awk -v OFS='\t' '{ gsub(/[.]/, "/" , $1); print }' -