https://github.com/fabsrc/twitter-to-image
:bird: :camera: Creates images from tweets.
https://github.com/fabsrc/twitter-to-image
image twitter
Last synced: 9 months ago
JSON representation
:bird: :camera: Creates images from tweets.
- Host: GitHub
- URL: https://github.com/fabsrc/twitter-to-image
- Owner: fabsrc
- Created: 2016-08-29T13:36:08.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-30T11:25:11.000Z (almost 10 years ago)
- Last Synced: 2025-02-20T14:11:17.693Z (over 1 year ago)
- Topics: image, twitter
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Twitter to Image
[](https://travis-ci.org/fabsrc/twitter-to-image)
[](https://david-dm.org/fabsrc/twitter-to-image)
[](https://david-dm.org/fabsrc/twitter-to-image?type=dev)
[](http://standardjs.com/)
Creates images from tweets.
## Install
```bash
npm install
```
## Start
```bash
npm start
```
Use the `PORT` environment variable to set a custom port. Default port is `3000`.
## Usage
The application is able to return multiple formats which can be specified in the url. The default is `png`.
```
http://localhost:3000/statuses/:tweet_id.:format?
http://localhost:3000/:screenname/status/:tweet_id.:format?
```
### Examples
#### PNG
```
http://localhost:3000/statuses/210462857140252672
http://localhost:3000/twitterapi/status/210462857140252672
http://localhost:3000/statuses/210462857140252672.png
http://localhost:3000/twitterapi/status/210462857140252672.png
```
#### JPEG
```
http://localhost:3000/statuses/210462857140252672.jpeg
http://localhost:3000//twitterapi/status/210462857140252672.jpg
http://localhost:3000/statuses/210462857140252672.jpeg
http://localhost:3000//twitterapi/status/210462857140252672.jpg
```
#### HTML
```
http://localhost:3000/statuses/210462857140252672.html
http://localhost:3000/twitterapi/status/210462857140252672.html
```
#### SVG
*Makes use of the [`foreignObject`](https://developer.mozilla.org/de/docs/Web/SVG/Element/foreignObject) element which is currently not supported by Internet Explorer.*
```
http://localhost:3000/statuses/210462857140252672.svg
http://localhost:3000/twitterapi/status/210462857140252672.svg
```
## Test
```bash
npm test
```
## Development
```bash
npm run dev
```
## License
Licensed under the [MIT License](http://opensource.org/licenses/mit-license.php).