Schwanksta / alertthing

A parser and auto-downloader for Google Alerts

This URL has Read+Write access

alertthing / README
100644 41 lines (24 sloc) 1.727 kb
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
29
30
31
32
33
34
35
36
37
38
39
40
41
alertthing -- Cache URLS sent via Google Alert on the local machine.
====================================================================
 
AlertThing will automatically parse out and download URLs linked to in a set of Google Alerts. In order to properly use this script, you must have Google Alerts send alerts in plain text only, not in HTML format. This is an option when you initially create your alert.
 
This script requires a configuration file, "alertcfg.txt", which it will first look for its own directory. In this config file, you must define 4 variables:
 
 
********************
DATA_PATH - The directory you wish to story the cached files in. Note that you must use forward slashes, even on windows.
 
USER - The GMail address
 
PASSWORD - The password to that email address
 
LABELS - The labels that you have GMail filtering your Google Alerts to. Labels must be separated ONLY by a comma, not by a comma and a space, like you might want to do out of habit. Example:
 
    LABELS: Label, Another label ## WRONG!!
    LABELS: Label,Another label ## CORRECT
 
DUMP - The file to aggregate downloaded files, stripped of HTML.
 
The order in which you place these variables in the config file does not matter.
********************
 
This script will also accept a command line argument with the full path to the configuation file in it. Ex:
 
> alertthing.py C:/Path/To/My/Config/alertcfg.txt
 
Note that, like the DATA_PATH variable in your config file, you must use forward slashes, even on Windows.
 
Sample alertcfg.txt:
********************
 
DATA_PATH: /home/you/google_alerts/data
USER: you@gmail.com
PASSWORD: yourpassword
LABELS: Label one,Label two,Label three
DUMP: /home/you/google_alerts/data/dumpfile.txt