@@ -40,27 +40,24 @@ We used the Gmail API to download 550 messages from Guido's Gmail
4040(details below).
4141
4242Given a folder with ` *.eml ` files in MIME format, we ran our email
43- ingestion tool, ` tools/ingest_email.py ` . (All these details will change
44- in the future, hopefully to be more similar to ` ingest_vtt.py ` .)
45-
46- ** TODO: Switch to describing ingest_email.py.**
47-
48- The tool takes one positional argument, a directory, in which it will
49- create a SQLite database named ` gmail.db ` .
50- ``` sh
51- python tools/ingest_email.py .
52- ```
53- The tool is interactive. The only command to issue is the following:
43+ ingestion tool, ` tools/ingest_email.py ` . You run it as follows:
5444``` sh
55- @add_messages --path " email-folder"
45+ python tools/ingest_email.py -d gmail.db email-folder/
5646```
47+ You can also pass individual ` .eml ` files instead of a directory.
48+ Use ` -v ` for verbose output.
49+
5750The process took over an hour for 500 messages. Moreover, it complained
5851about nearly 10% of the messages due to timeouts or just overly large
5952files. When an error occurs, the tool recovers and continues with the
60- next file.
53+ next file. Previously ingested emails are automatically skipped on
54+ subsequent runs.
6155
6256We can then query the ` gmail.db ` database using the same ` query.py `
63- tool that we used for the Monty Python demo.
57+ tool that we used for the Monty Python demo:
58+ ``` sh
59+ python tools/query.py -d gmail.db
60+ ```
6461
6562### How to use the Gmail API to download messages
6663
0 commit comments