Command-line tool to capture clean and simple tweet snapshots.
- π Adjustable width
- π Rounded corners & transparent background
- π Dark mode
- π Customizable locale
- π ββοΈ No "Share" & "Info" buttons
- π No watermark
- π₯ Snap multiple tweets at once
Support this project by βοΈ starring and sharing it. Follow me to see what other cool projects I'm working on! β€οΈ
The only requirement is to have Google Chrome Browser.
npm i -g snap-tweet
Use npx to run without installation.
Must be built first: npm run build
npx snap-tweet
By default, the tweet snap is opened in your default image viewer so you can decide whether to save or not.
snap-tweet https://twitter.com/jack/status/20
Save the tweet snap to a specified directory using the --output-dir
flag.
snap-tweet https://twitter.com/jack/status/20 --output-dir ~/Desktop
Snap a tweet in dark mode using the --dark-mode
flag.
snap-tweet https://twitter.com/jack/status/20 --dark-mode
Pass in a custom width for the tweet using the --width
flag.
snap-tweet https://twitter.com/github/status/1390807474748416006 --width 900
Pass in a different locale using the --locale
flag.
snap-tweet https://twitter.com/TwitterJP/status/578707432 --locale ja
Using the Japanese locale (ja)
Use the --show-thread
flag to include the parent tweet in the screenshot.
snap-tweet https://twitter.com/jack/status/1108487919969275904 --show-thread
Parent tweet inlcuded in the screenshot
Snap multiple tweets at once by passing in multiple tweet URLs.
snap-tweet https://twitter.com/naval/status/1002103497725173760 https://twitter.com/naval/status/1002103559276478464 https://twitter.com/naval/status/1002103627387813888
snap-tweet
Usage:
$ snap-tweet <...tweet urls>
Options:
-d, --dark-mode Show tweet in dark mode
-c, --fill-comment-button Fill the comment button
-l, --fill-like-button Fill the like button
-h, --help Show help
-b, --hide-follow-button Hide the follow button
--locale <locale> Locale (default: "en")
-o, --output-dir <path> Tweet screenshot output directory
-f, --output-filename <string> Tweet screenshot output filename
-x, --scale <number> Scale of tweet (multiplier to increase the resolution)
(default: 1)
-s, --show-comments Show comments
-t, --show-thread Show tweet thread
--version Show version
-w, --width <width> Width of tweet (default: 550)
It all started when I simply wanted to embed a couple tweets into a Google Doc...
Quick googling showed that there's no way to embed an actual tweet because Google Docs doesn't support HTML iframes or JavaScript. And I wasn't going to install a plugin just for some tweets.
I figured I could just take a screenshot of the tweet. But only to realize I would be spending way too much time cropping each tweet, and they still wouldn't be perfect because of the lack of transparency behind the rounded corners. And not to mention, the static screenshot would include buttons like "Copy link to Tweet" that looked actionable but actually weren't.
I found services like Screenshot Guru (and their Twitter Screenshots Chrome extension), Pikaso, etc. but none of them met my needs (low quality images, actionable buttons present, watermarks, etc.).
All I wanted to do was to embed the tweet like how it looks in the official embedder into a static environment. No sign up, no watermark, no BS... It shouldn't be this hard! π€―
So of course, I spent a few hours developing a tool to save us all the headache π
(I know, this is some pretty crazy yak shaving. Checkout my other projects to see how deep I've gone.)
If you have a question about usage, ask on Discussions.
If you'd like to make a feature request or file a bug report, open an Issue.
These are modifications originally done by @FelixDubois (privatenumber#38). Unfortunately, he deleted his fork, so this is a new fork with his work.
- Can specify the output filename
- Scaling parameter to increase resolution
- Fill the comment and/or like buttons
- Show or hide the amount of comments