{"id":13592236,"url":"https://github.com/tweetback/tweetback","last_synced_at":"2025-04-13T04:59:41.595Z","repository":{"id":63583725,"uuid":"560936316","full_name":"tweetback/tweetback","owner":"tweetback","description":"Take ownership of your Twitter data and get your tweets back","archived":false,"fork":false,"pushed_at":"2023-11-13T21:47:41.000Z","size":78,"stargazers_count":663,"open_issues_count":63,"forks_count":95,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-13T04:59:35.536Z","etag":null,"topics":["11ty","indieweb","twitter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tweetback.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-11-02T15:30:41.000Z","updated_at":"2025-04-04T12:06:14.000Z","dependencies_parsed_at":"2023-11-13T22:44:24.520Z","dependency_job_id":null,"html_url":"https://github.com/tweetback/tweetback","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweetback%2Ftweetback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweetback%2Ftweetback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweetback%2Ftweetback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweetback%2Ftweetback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tweetback","download_url":"https://codeload.github.com/tweetback/tweetback/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665756,"owners_count":21142123,"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":["11ty","indieweb","twitter"],"created_at":"2024-08-01T16:01:07.232Z","updated_at":"2025-04-13T04:59:41.565Z","avatar_url":"https://github.com/tweetback.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","twitter"],"sub_categories":[],"readme":"# `tweetback` Twitter Archive\n\nTake ownership of your Twitter data. First talked about at [Jamstack Conf 2019](https://www.zachleat.com/web/own-your-content/) and in [this blog post](https://www.zachleat.com/web/own-my-tweets/).\n\n* _Referenced on [Delete Twitter](https://deletetwitter.com/)!_\n\n## Demos\n\n* https://www.zachleat.com/twitter/\n* https://twitter.11ty.dev/\n\n## Features\n\n* Built with [Eleventy](https://www.11ty.dev/)\n* Each tweet has its own independent URL (with backwards/forwards threading!)\n* Uses [`@tweetback/canonical`](https://github.com/tweetback/tweetback-canonical) to resolve other Twitter archives URLs (internal links stay in the archive and don’t link out to Twitter).\n* `t.co` links are bypassed and original hyperlinks URLs are used.\n* Links to users, tweets, non-truncated URLs.\n* Nicer link formatting for links-to-tweets: @username/:id.\n* Support some markdown: I sometimes use `backtick` markdown notation for code in my tweet text. This translates to `\u003ccode\u003e` properly.\n* Analytics:\n\t* See your most popular tweets\n\t* Who you retweet the most\n\t* Who you reply to the most\n\t* Frequently used swear words\n\t* Top emoji\n\t* Top hashtags\n\n## Usage\n\n* Clone/download this repository\n* In your terminal, `cd` to the folder of the project\n* Install [Node.js](https://nodejs.org/)\n* Run `npm install`\n\n### Populate the database from your Twitter Archive zip\n\n1. Copy `./data/tweets.js` from your [Twitter Archive](https://help.twitter.com/en/managing-your-account/how-to-download-your-twitter-archive) `zip` file into the `./database` directory of this project.\n   * Rename `window.YTD.tweet.part0` in `tweets.js` to `module.exports`\n1. If you want to exclude Twitter Circles tweets (these are included in the archive, why 😭): copy `./data/twitter-circle-tweet.js` from your Twitter Archive `zip` file into the `./database` directory of this project.\n   * Rename `window.YTD.tweet.part0` in `twitter-circle-tweet.js` to `module.exports`\n1. Run `npm run import` or `npm run import-without-circles`\n\n### Build the web site\n\n1. Edit the `_data/metadata.js` file to add metadata information.\n1. Run `npm run build` (will just create the proper files) or `npm start` (will run a server to look at them in your browser).\n\t* _Optional:_ If you want the web site to live in a subdirectory (e.g. `/twitter/`), use [Eleventy’s Path Prefix feature](https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix) via the command line `--pathprefix=twitter` or via a return object in your configuration file. Careful: this is an option to Eleventy and not npm, so it needs to live after a `--` separator (for instance, `npm run build -- --pathprefix=twitter`).\n\n⚠️ _Warning_: the first build may take quite a long time (depending on the size of your archive), as remote media is fetched/downloaded into your project locally. Repeat builds will be much faster.\n\n### Fetch additional tweets from the API (optional)\n\nIf you want to fetch additional tweets from the API and put them into your sqlite database:\n\n1. You will need a twitter developer token an a `TWITTER_BEARER_TOKEN` environment variable (from the Twitter API v2). Read more about [App-only Bearer Tokens](https://developer.twitter.com/en/docs/authentication/oauth-2-0/bearer-tokens).\n1. Run `npm run fetch-new-data`\n\n### Add your production URL to `@tweetback/canonical` (optional)\n\nhttps://github.com/tweetback/tweetback-canonical has a `mapping.js` file that stores the existing twitter username =\u003e canonical URL mappings. These will be transformed automatically to point to other archives in all `tweetback` instances.\n\n### Publish your archive (optional)\n\n- To [GitHub Pages](docs/deploy-with-github-pages.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftweetback%2Ftweetback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftweetback%2Ftweetback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftweetback%2Ftweetback/lists"}