···215215 --sql="select distinct followed_id from following" \
216216 --ids
217217218218+## Importing data from your Twitter archive
219219+220220+You can request an archive of your Twitter data by [following these instructions](https://help.twitter.com/en/managing-your-account/how-to-download-your-twitter-archive).
221221+222222+Twitter will send you a link to download a `.zip` file. You can import the contents of that file into a set of tables (each beginning with the `archive-` prefix) using the `import` command:
223223+224224+ $ twitter-to-sqlite import archive.db ~/Downloads/twitter-2019-06-25-b31f2.zip
225225+226226+This command does not populate any of the regular tables, since Twitter's export data does not exactly match the schema returned by the Twitter API.
227227+228228+You may want to use other commands to populate tables based on data from the archive. For example, to retrieve full API versions of each of the tweets you have favourited in your archive, you could run the following:
229229+230230+ $ twitter-to-sqlite statuses-lookup archive.db \
231231+ --sql='select tweetId from [archive-like]' \
232232+ --skip-existing
233233+218234## Design notes
219235220236* Tweet IDs are stored as integers, to afford sorting by ID in a sensible way
tests/__init__.py
This is a binary file and will not be displayed.
+10
tests/test_create_zip.py
···11+import pathlib
22+33+from .utils import create_zip
44+55+66+def test_create_zip():
77+ zf = create_zip()
88+ assert {"account.js", "saved-search.js", "following.js", "follower.js"} == {
99+ f.filename for f in zf.filelist
1010+ }