Skip to content

Instantly share code, notes, and snippets.

@HerrLevin
Created August 5, 2021 14:10
Show Gist options
  • Save HerrLevin/acf9e19438fb04f4de83f93c34b7ed27 to your computer and use it in GitHub Desktop.
Save HerrLevin/acf9e19438fb04f4de83f93c34b7ed27 to your computer and use it in GitHub Desktop.
This script is to semi-automatically re-send all REWE eBons to k118.de.
#!/bin/bash
to="<fillthisout>@reweebon.k118.de"
filetype="*.pdf";
cnt=$(ls -1q $filetype | wc -l)
i=0
for f in $filetype;
do
let i++;
thunderbird -compose "subject='Autosend $f',to=$to,body=$f ,attachment=$(pwd)/$f" &
# Wait for the window to open
sleep 2
xdotool key ctrl+Return
echo "$f"
echo $i/$cnt
done
@HerrLevin
Copy link
Author

This script is to batch-send all REWE eBon receipts.
You can download a zip of the receipts at https://shop.rewe.de/mydata/meine-einkaeufe/im-markt (click eBon Service verwalten and Alle eBons herunterladen).

To use this script, you need to have a working https://www.thunderbird.net installation as well as xdotool installed.
Simply put the script in your eBon-folder, change the recipient mail to the address found at https://k118.de/rewe and you're good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment