{"id":16824933,"url":"https://github.com/tomnomnom/twarch","last_synced_at":"2025-04-11T04:13:55.182Z","repository":{"id":6956144,"uuid":"8208302","full_name":"tomnomnom/twarch","owner":"tomnomnom","description":"A Twitter Archive thing","archived":false,"fork":false,"pushed_at":"2013-02-26T15:31:09.000Z","size":248,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T04:13:48.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomnomnom.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-14T21:44:26.000Z","updated_at":"2025-02-18T20:14:52.000Z","dependencies_parsed_at":"2022-09-25T04:11:09.885Z","dependency_job_id":null,"html_url":"https://github.com/tomnomnom/twarch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Ftwarch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Ftwarch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Ftwarch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Ftwarch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomnomnom","download_url":"https://codeload.github.com/tomnomnom/twarch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339225,"owners_count":21087215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T11:12:28.011Z","updated_at":"2025-04-11T04:13:55.155Z","avatar_url":"https://github.com/tomnomnom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twarch\n\nImport your Twitter Archive into a SQLite database and then do stuff with it.\n\n## Requirements\n* PHP 5.3 or newer\n* SQLite PHP Extension\n* Linux of some description\n* [Composer](http://getcomposer.org/)\n\n## Installation\nEither:\n\n1. Download the [tarball](http://tomnomnom.com/twarch/twarch-0.0.2.tgz)\n2. Extract it with `tar xzf twarch-0.0.2.tgz`\n3. `cd` into the newly created directory\n\nOr:\n\n1. Clone the repo with `git clone git://github.com/TomNomNom/twarch.git`\n2. `cd` into the newly created directory\n3. Run `composer install` to get the dependencies \n\n## Importing your Twitter Archive\n1. Unzip your Twitter Arhive somewhere. In this example, mine is extracted into a directory called 'tweets':\n    ```\n    ▶ unzip tweets.zip -d tweets\n    ```\n\n2. Create an empty DB using the `createdb` mode:\n    ```\n    ▶ php twarch.php createdb\n    Successfully created DB\n    ```\n    \n3. Import your Tweets from the JS files in the archive by using the `import` mode:\n    ```\n    ▶ php twarch.php import tweets/data/js/tweets/*.js\n    Removing old Tweets...\n    Importing Tweets from [tweets/data/js/tweets/2008_11.js]\n    Importing Tweets from [tweets/data/js/tweets/2008_12.js]\n    ...\n    Importing Tweets from [tweets/data/js/tweets/2013_01.js]\n    Importing Tweets from [tweets/data/js/tweets/2013_02.js]\n    Imported 15027 Tweets\n    ```\n\n4. Do stuff with your data! \n\n## Stuff to do with your data\n\nYou can search for something:\n\n    ▶ php twarch.php find \"Java is weird\"\n    +------------+--------------------------+------------------------------------------------------------+\n    | Id         | Created                  | Text                                                       |\n    +------------+--------------------------+------------------------------------------------------------+\n    | 1023688023 | 2008-11-26T00:42:07+0000 | Done the 'hello, world' thing on the G1 now. Java is weird |\n    +------------+--------------------------+------------------------------------------------------------+\n\nList all of your Tweets:\n\n    ▶ php twarch.php all\n    +--------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n    | Id                 | Created                  | Text                                                                                                                                         |\n    +--------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n    | 1010488898         | 2008-11-18T00:34:32+0000 | At 15 of 80gb. Data recovery sucks.                                                                                                          |\n    | 1010523359         | 2008-11-18T01:02:23+0000 | \"Time for bed\", said Zebedee... \"Piss off, you springy bastard\", said Florence                                                               |\n    ...\n    | 305969208901115904 | 2013-02-25T09:15:18+0000 | @ghalfacree dead easy to do. I reckon you could manage it :)                                                                                 |\n    +--------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+\n\n\nGet a list of words and how often you used them:\n\n    ▶ php twarch.php uniquewords --min-count=500 --min-word-length=6\n    +-------------+-------+\n    | Word        | Count |\n    +-------------+-------+\n    | @lingmops   | 1471  |\n    | @ghalfacree | 862   |\n    | @scawp      | 817   |\n    | @johnmclear | 621   |\n    +-------------+-------+\n\nGet a total word count and other stats about your Tweets:\n\n    ▶ php twarch.php stats\n    Tweets: 15211\n    Total words: 211827\n    Words per Tweet: 14\n    Total characters: 1250269\n    Characters per Tweet: 82\n\nGet a list of who you've mentioned and how often:\n\n    ▶ php twarch.php mentions\n    +--------------------------+-------+\n    | Handle                   | Count |\n    +--------------------------+-------+\n    | @lingmops                | 1490  |\n    | @ghalfacree              | 871   |\n    | @scawp                   | 822   |\n    | @johnmclear              | 624   |\n    +--------------------------+-------+\n\nSee which hashtags you've used and how often:\n\n    ▶ php twarch.php hashtags\n    +-------------------------------------------------------------------------+-------+\n    | Hashtag                                                                 | Count |\n    +-------------------------------------------------------------------------+-------+\n    | #songsincode                                                            | 17    |\n    ...\n    | #joke                                                                   | 1     |\n    +-------------------------------------------------------------------------+-------+\n\n\nFind out what time of day you Tweet the most:\n\n    ▶ php twarch.php timeofday\n    +------+-------+\n    | Hour | Count |\n    +------+-------+\n    | 00   | 218   |\n    | 01   | 80    |\n    ...\n    | 22   | 552   |\n    | 23   | 317   |\n    +------+-------+\n\n\nWhich day of the week you Tweet the most:\n\n    ▶ php twarch.php dayofweek\n    +-----+-------+\n    | Day | Count |\n    +-----+-------+\n    | Mon | 2316  |\n    ...\n    | Sun | 1333  |\n    +-----+-------+\n\nOr which day of the month:\n\n    ▶ php twarch.php dayofmonth\n    +-----+-------+\n    | Day | Count |\n    +-----+-------+\n    | 01  | 515   |\n    | 02  | 548   |\n    ...\n    | 30  | 368   |\n    | 31  | 249   |\n    +-----+-------+\n\nOr even which month of the year:\n\n    ▶ php twarch.php monthofyear\n    +-------+-------+\n    | Month | Count |\n    +-------+-------+\n    | Jan   | 1586  |\n    | Feb   | 1598  |\n    ...\n    | Nov   | 1267  |\n    | Dec   | 1232  |\n    +-------+-------+\n\nYou can see how much you've Tweeted over time (with `year`, `month` or `day` resolution):\n\n    ▶ php twarch.php trend --resolution=year\n    +------+-------+\n    | Year | Count |\n    +------+-------+\n    | 2008 | 42    |\n    | 2009 | 1510  |\n    ...\n    | 2012 | 5617  |\n    | 2013 | 864   |\n    +------+-------+\n\n## Updating your data\n\nYou can update your data via HTTP with the `sync` mode:\n\n    ▶ php twarch.php sync tomnomnom\n    Last Tweet had ID [305359084289396736]\n    Importing Tweet with ID [305379759108530177]\n    Imported 1 Tweets\n\n## Coming soon\n* Possibly a [Phar](http://www.php.net/manual/en/book.phar.php) version\n* Other, interesting, modes to do more stuff with your data\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Ftwarch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomnomnom%2Ftwarch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Ftwarch/lists"}