You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Download the text of a pad
|
|
|
|
wget https://pad.xpub.nl/p/radioworm-20231107/export/txt -O radioworm-20231107.pad.txt
|
|
|
|
|
|
|
|
# convert the pad to a CSV
|
|
|
|
python3 scripts/split-urls-csv.py < radioworm-20231107.pad.txt | \
|
|
|
|
python3 scripts/csv-add-end.py > radioworm-20231107.csv
|
|
|
|
|
|
|
|
# check if csvgrep is installed
|
|
|
|
if ! csvgrep --help &> /dev/null
|
|
|
|
then
|
|
|
|
echo "csvgrep could not be found, install csvtoolkit with pip or apt"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Filter the CSV with a keyword
|
|
|
|
csvgrep -c text -m "#intro" radioworm-20231107.csv > radioworm-20231107.intro.csv
|
|
|
|
|
|
|
|
# Generate a shell script
|
|
|
|
python3 scripts/csv-to-melt.py < radioworm-20231107.intro.csv > edit.sh
|
|
|
|
|
|
|
|
# Get the source
|
|
|
|
wget https://hub.xpub.nl/chopchop/worm/xpub/radioworm-20231107.ogg
|
|
|
|
|
|
|
|
# Perform the edit
|
|
|
|
bash edit.sh
|