1 | # Tweet markdown renderer
|
2 |
|
3 | [![npm](https://img.shields.io/npm/v/tweet.md.svg?style=flat-square)](https://www.npmjs.com/package/tweet.md)
|
4 | [![Travis](https://img.shields.io/travis/silentroach/tweet.md.svg?style=flat-square&label=travis)](https://travis-ci.org/silentroach/tweet.md)
|
5 | [![David](https://img.shields.io/david/dev/silentroach/tweet.md.svg?style=flat-square&label=deps)](https://david-dm.org/silentroach/tweet.md#info=devDependencies)
|
6 |
|
7 | Render your [tweets](https://dev.twitter.com/overview/api/tweets) with [entities](https://dev.twitter.com/overview/api/entities) to beautiful markdown.
|
8 |
|
9 | ## Installing
|
10 |
|
11 | You can install the latest package version for [Node.js](https://nodejs.org):
|
12 |
|
13 | ```
|
14 | $ npm install tweet.md
|
15 | ```
|
16 |
|
17 | ## How to use
|
18 |
|
19 | Just as you think it should be used:
|
20 |
|
21 | ```js
|
22 | var render = require('tweet.md');
|
23 | var output = render(tweetObjectFromAPI);
|
24 | ```
|
25 |
|
26 | ## Examples
|
27 |
|
28 |
|
29 |
|
30 | ### [01-link.json](examples/01-link.json)
|
31 |
|
32 | Tweet [610382345024204800](https://twitter.com/twitterapi/status/610382345024204800) by Twitter API
|
33 |
|
34 | - - -
|
35 | Removing the 140 character limit from Direct Messages [twittercommunity.com/t/removing-the…](https://t.co/h0I2M3P2vm "https://twittercommunity.com/t/removing-the-140-character-limit-from-direct-messages/41348/")
|
36 | - - -
|
37 |
|
38 | ### [02-multiline.json](examples/02-multiline.json)
|
39 |
|
40 | Tweet [628296576822149120](https://twitter.com/twitter/status/628296576822149120) by Twitter
|
41 |
|
42 | - - -
|
43 | Tweet poems you like<br />at [#TwitterPoetryClub](https://twitter.com/search?q=%23TwitterPoetryClub)<br />prose, sonnets and more<br /><br />Via [@bustle](https://twitter.com/bustle "Bustle"), learn how to wax poetic on Twitter: [bustle.com/articles/10068…](http://t.co/vItyyGqX7R "http://www.bustle.com/articles/100683-twitterpoetryclub-members-share-their-love-of-poetry-in-140-characters-or-less")
|
44 | - - -
|
45 |
|
46 | ### [03-russian.json](examples/03-russian.json)
|
47 |
|
48 | Tweet [633203477540380672](https://twitter.com/jsunderhood/status/633203477540380672) by Разработчик
|
49 |
|
50 | - - -
|
51 | Привет! С вами сегодня и всю неделю [@pepelsbey](https://twitter.com/pepelsbey "Вадим Макеев"), он же Вадим Макеев в прямом эфире из Осло, см. глобус Европы [pic.twitter.com/clb7TLnxZS](http://t.co/clb7TLnxZS)
|
52 | - - -
|
53 |
|