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.

29 lines
772 B
Bash

11 months ago
#!/bin/bash
11 months ago
11 months ago
# Download the text of a pad
11 months ago
wget https://pad.xpub.nl/p/radioworm-20231107/export/txt -O radioworm-20231107.pad.txt
11 months ago
# convert the pad to a CSV
11 months ago
python3 scripts/split-urls-csv.py < radioworm-20231107.pad.txt | \
python3 scripts/csv-add-end.py > radioworm-20231107.csv
11 months ago
# 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
11 months ago
# Filter the CSV with a keyword
11 months ago
csvgrep -c text -m "#intro" radioworm-20231107.csv > radioworm-20231107.intro.csv
11 months ago
# Generate a shell script
11 months ago
python3 scripts/csv-to-melt.py < radioworm-20231107.intro.csv > edit.sh
11 months ago
# Get the source
11 months ago
wget https://hub.xpub.nl/chopchop/worm/xpub/radioworm-20231107.ogg
11 months ago
# Perform the edit
11 months ago
bash edit.sh