{"_id":"@deegeemee/tweetshot","_rev":"1-6b98ba0439e5050f547f7fa3366bf174","name":"@deegeemee/tweetshot","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@deegeemee/tweetshot","version":"0.0.1","keywords":["tweet","twitter","screenshot"],"author":{"name":"deegeemee"},"license":"MIT","_id":"@deegeemee/tweetshot@0.0.1","maintainers":[{"name":"deegeemee","email":"npm@deegeemee.net"}],"homepage":"https://github.com/deegeemee/tweetshot#readme","bugs":{"url":"https://github.com/deegeemee/tweetshot/issues"},"dist":{"shasum":"829f89f814473b236548ecd8e050e3c0b9707877","tarball":"https://registry.npmjs.org/@deegeemee/tweetshot/-/tweetshot-0.0.1.tgz","fileCount":16,"integrity":"sha512-vborra1LzdV7PiKu9eqL4Ez/wSCJuooWVFhIjbdVdRrA9zbxQQjUgMAciMW9lck5e+VHnTXQ0FdMYivhWP/e3w==","signatures":[{"sig":"MEYCIQDnQ5AU8RJB3okLkOhLW7hiB1/whFWBFRVAcrkpBomdpAIhAPEVTVuQvk9NY/mmUoYOC3ry9Sxeiz281YPIGxYa/NqR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29230},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"e9bfe9668000156f71ba1d96f9b04397193cff7c","scripts":{"lint":"tsc","test":"node --import tsx --test test/*.test.ts","build":"tsup src/index.ts --format cjs,esm --dts --clean","test:watch":"nodemon -w src -w test -e ts -x 'npm run test'"},"_npmUser":{"name":"deegeemee","email":"npm@deegeemee.net"},"repository":{"url":"git+https://github.com/deegeemee/tweetshot.git","type":"git"},"_npmVersion":"10.8.1","description":"A Node.js library to take screenshots of tweets","directories":{},"_nodeVersion":"20.13.1","dependencies":{"sharp":"^0.33.5","puppeteer-core":"^23.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.17.0","tsup":"^8.2.4","nodemon":"^3.1.4","prettier":"^3.3.3","typescript":"^5.5.4","@types/node":"^22.4.0","@changesets/cli":"^2.27.7"},"_npmOperationalInternal":{"tmp":"tmp/tweetshot_0.0.1_1724012197819_0.46874754506841354","host":"s3://npm-registry-packages"}},"0.0.2":{"version":"0.0.2","type":"module","name":"@deegeemee/tweetshot","author":{"name":"deegeemee"},"license":"MIT","description":"A Node.js library to take screenshots of tweets","homepage":"https://github.com/deegeemee/tweetshot#readme","bugs":{"url":"https://github.com/deegeemee/tweetshot/issues"},"repository":{"type":"git","url":"git+https://github.com/deegeemee/tweetshot.git"},"keywords":["tweet","twitter","screenshot"],"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean","test":"node --import tsx --test test/*.test.ts","test:watch":"nodemon -w src -w test -e ts -x 'npm run test'","lint":"tsc"},"dependencies":{"puppeteer-core":"^23.1.0","sharp":"^0.33.5"},"devDependencies":{"@changesets/cli":"^2.27.7","@types/node":"^22.4.0","nodemon":"^3.1.4","prettier":"^3.3.3","tsup":"^8.2.4","tsx":"^4.17.0","typescript":"^5.5.4"},"_id":"@deegeemee/tweetshot@0.0.2","gitHead":"8c077b00381e8955a495972f1e9cb95f5c259f1b","_nodeVersion":"20.13.1","_npmVersion":"10.8.1","dist":{"integrity":"sha512-Z571A5DQk8/9C/BiyaXtxHkgjuXoiKkNwG8hZQLy5EhbpFqoPs2u1Np5xNzkkAZ4c/Voi2Dcv+RVdumKlww66w==","shasum":"b5131c0ea0bd3a69a3312d1f0bfb305f833ccca8","tarball":"https://registry.npmjs.org/@deegeemee/tweetshot/-/tweetshot-0.0.2.tgz","fileCount":16,"unpackedSize":29250,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPbEQxT7tYzfcC+MQbXgLWJVdzED7T6rDgiYj9PIwUAgIhAI2rdf8vuOUmF1/M0u90tGOzvHb3dxCgV7q0ePOVKE2D"}]},"_npmUser":{"name":"deegeemee","email":"npm@deegeemee.net"},"directories":{},"maintainers":[{"name":"deegeemee","email":"npm@deegeemee.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tweetshot_0.0.2_1724013335136_0.9601872936955573"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-18T20:16:37.700Z","modified":"2024-08-18T20:35:35.475Z","0.0.1":"2024-08-18T20:16:37.968Z","0.0.2":"2024-08-18T20:35:35.270Z"},"bugs":{"url":"https://github.com/deegeemee/tweetshot/issues"},"author":{"name":"deegeemee"},"license":"MIT","homepage":"https://github.com/deegeemee/tweetshot#readme","keywords":["tweet","twitter","screenshot"],"repository":{"type":"git","url":"git+https://github.com/deegeemee/tweetshot.git"},"description":"A Node.js library to take screenshots of tweets","maintainers":[{"name":"deegeemee","email":"npm@deegeemee.net"}],"readme":"# @deegeemee/tweetshot\n\nA Node.js library to take screenshots of tweets\n\n## Installation\n\n```bash\nnpm install @deegeemee/tweetshot\n```\n\n## Usage\n\n```ts\nimport { tweetShot } from '@deegeemee/tweetshot';\n\nconst tweetUrl = 'https://x.com/deegeemeeonx/status/1772271871909581245';\n\ntweetShot({ tweetUrl }).then((buffer) => {\n  // Buffer is a Buffer\n});\n```\n\nOr if you want to save the screenshot to a file:\n\n```ts\nimport { tweetShot } from '@deegeemee/tweetshot';\n\nconst tweetUrl = 'https://x.com/deegeemeeonx/status/1772271871909581245';\n\ntweetShot({ tweetUrl, outFile: 'output.webp' }).then((output) => {\n  // output is a sharp.OutputInfo\n});\n```\n\n## API\n\n### tweetShot(params: TweetShotParams)\n\nPerforms screenshot of a tweet\n\n#### Parameters\n\n| Name             | Type    | Description                                                                                                           | Default                         |\n| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------- |\n| tweetUrl         | string  | Tweet URL to screenshot                                                                                               | N/A                             |\n| outFile          | string  | File to save the screenshot to.                                                                                       | N/A                             |\n| browser          | Browser | Browser to use for screenshotting.                                                                                    | N/A                             |\n| chromeExecutable | string  | Path to the Chrome executable.                                                                                        | CHROME_BIN environment variable |\n| hideMedia        | boolean | Hides the media in the tweet.                                                                                         | false                           |\n| hideThread       | boolean | Hides the thread in the tweet.                                                                                        | false                           |\n| lang             | string  | Language to use. See [supported languages](https://developer.x.com/en/docs/twitter-for-websites/supported-languages). | 'en'                            |\n| theme            | string  | The theme of the tweet.                                                                                               | 'dark'                          |\n| imageWidth       | number  | Width of the image to screenshot. Must be 220-550                                                                     | 550                             |\n| imageType        | string  | Image type to use. Can be `'webp' \\| 'jpeg' \\| 'png'`                                                                 | 'webp'                          |\n| imageQuality     | number  | Image quality to use. Value 0 - 100, not applicable for `'png'`                                                       | 100                             |\n\n# npm scripts\n\n`npm run build` - Builds the library  \n`npm run test` - Runs the tests  \n`npm run test:watch` - Runs the tests in watch mode  \n`npm run lint` - Runs the linter\n","readmeFilename":"README.md"}