-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmailbot.sh
More file actions
28 lines (22 loc) · 954 Bytes
/
Copy pathmailbot.sh
File metadata and controls
28 lines (22 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
#!!!REPLACE CAPS ELEMENTS WITH YOUR OWN!!!
#There are two websites here, so there are two emails.
#This is by design, but could be scaled or combined into one.
#website singularity-hub RSS feed is wgetted
filename="singularity-hub"
url="https://singularityhub.com/feed/"
output="<PATH_TO_FILE>/$filename.html"
#sed is used to remove as much of the xml data as possible
wget -qO- $url | sed -e 's/<[^>]*>//g;s/^ //g' > $output
wkhtmltopdf $output <PATH_TO_FILE>.pdf
echo "<EMAIL_BODY>" | mutt -a "<PATH_TO_FILE>" -s "<EMAIL_SUBJECT>" -- <RECIEVING EMAIL>
echo "Job Completed"
filenamez="torrentfreak"
urlz="http://feeds.feedburner.com/Torrentfreak"
outputz="<PATH_TO_FILE>$filenamez.html"
wget -qO- $urlz | sed -e 's/<[^>]*>//g;s/^ //g' > $outputz
wkhtmltopdf $outputz <PATH_TO_FILE>/$filenamez.pdf
echo "<EMAIL_BODY>" | mutt -a "<PATH_TO_FILE>" -s "<EMAIL_SUBJECT>" -- <RECIEVING EMAIL>
echo "Job Completed"
cd <PATH_TO_FILE>
rm *.html