all repos — tg2md @ 4bb3aff513740c29604a5d50fa16145746333645

converter from telegram json to jekyll md

tests/result.json (view raw)

  1{
  2 "name": "test",
  3 "type": "private_channel",
  4 "id": 9882011936,
  5 "messages": [
  6  {
  7   "id": 1,
  8   "type": "service",
  9   "date": "2020-11-12T12:53:52",
 10   "actor": "test",
 11   "actor_id": 9882011936,
 12   "action": "create_channel",
 13   "title": "test",
 14   "text": ""
 15  },
 16  {
 17   "id": 2,
 18   "type": "message",
 19   "date": "2020-11-12T12:54:07",
 20   "from": "test",
 21   "from_id": 9882011936,
 22   "text": "test text post"
 23  },
 24  {
 25   "id": 3,
 26   "type": "message",
 27   "date": "2020-11-12T12:57:31",
 28   "from": "test",
 29   "from_id": 9882011936,
 30   "photo": "photos/photo_1@12-11-2020_12-57-31.jpg",
 31   "width": 801,
 32   "height": 526,
 33   "text": ""
 34  },
 35  {
 36   "id": 4,
 37   "type": "message",
 38   "date": "2020-11-12T12:57:40",
 39   "from": "test",
 40   "from_id": 9882011936,
 41   "photo": "photos/photo_1@12-11-2020_12-57-31.jpg",
 42   "width": 801,
 43   "height": 526,
 44   "text": "photo with text"
 45  },
 46  {
 47   "id": 5,
 48   "type": "message",
 49   "date": "2020-11-12T12:58:18",
 50   "edited": "2020-11-12T13:03:00",
 51   "from": "test",
 52   "from_id": 9882011936,
 53   "text": [
 54    {
 55     "type": "italic",
 56     "text": "italic\n\n"
 57    },
 58    {
 59     "type": "bold",
 60     "text": "bold\n\n"
 61    },
 62    {
 63     "type": "underline",
 64     "text": "underline\n\n"
 65    },
 66    {
 67     "type": "strikethrough",
 68     "text": "strikethrough\n\n"
 69    },
 70    {
 71     "type": "pre",
 72     "text": "monospace",
 73     "language": ""
 74    }
 75   ]
 76  },
 77  {
 78   "id": 7,
 79   "type": "message",
 80   "date": "2020-11-12T13:01:05",
 81   "from": "test",
 82   "from_id": 9882011936,
 83   "file": "voice_messages/audio_1@12-11-2020_13-01-05.ogg",
 84   "media_type": "voice_message",
 85   "mime_type": "audio/ogg",
 86   "duration_seconds": 2,
 87   "text": ""
 88  },
 89  {
 90   "id": 8,
 91   "type": "message",
 92   "date": "2020-11-12T13:02:35",
 93   "from": "test",
 94   "from_id": 9882011936,
 95   "file": "files/test-sound.ogg",
 96   "media_type": "audio_file",
 97   "mime_type": "audio/x-vorbis+ogg",
 98   "duration_seconds": 1,
 99   "text": ""
100  },
101  {
102   "id": 9,
103   "type": "message",
104   "date": "2020-11-12T13:43:23",
105   "from": "test",
106   "from_id": 9882011936,
107   "text": [
108    {
109     "type": "italic",
110     "text": "italic"
111    },
112    " in text\n\n",
113    {
114     "type": "italic",
115     "text": "italic on whole line"
116    }
117   ]
118  },
119  {
120   "id": 10,
121   "type": "message",
122   "date": "2020-11-12T14:11:35",
123   "edited": "2020-11-12T14:18:17",
124   "from": "test",
125   "from_id": 9882011936,
126   "text": [
127    {
128     "type": "bold",
129     "text": "bold"
130    },
131    " in text\n",
132    {
133     "type": "bold",
134     "text": "bold below\n\n"
135    },
136    "normal text\n\n",
137    {
138     "type": "bold",
139     "text": "bold with one line gap\n"
140    },
141    "normal text"
142   ]
143  },
144  {
145   "id": 11,
146   "type": "message",
147   "date": "2020-11-12T14:34:47",
148   "from": "test",
149   "from_id": 9882011936,
150   "text": [
151    {
152     "type": "bold",
153     "text": "multiline\nbold\n\ntext"
154    }
155   ]
156  },
157  {
158   "id": 13,
159   "type": "message",
160   "date": "2020-11-12T14:45:43",
161   "edited": "2020-11-12T14:45:55",
162   "from": "test",
163   "from_id": 9882011936,
164   "text": [
165    {
166     "type": "code",
167     "text": "monospace with one baktick\n\n"
168    },
169    {
170     "type": "pre",
171     "text": "multiline\nmonospace",
172     "language": ""
173    }
174   ]
175  },
176  {
177   "id": 14,
178   "type": "message",
179   "date": "2020-11-12T14:48:48",
180   "edited": "2020-11-12T14:49:39",
181   "from": "test",
182   "from_id": 9882011936,
183   "text": [
184    {
185     "type": "text_link",
186     "text": "text link\n\n",
187     "href": "http://example.com/"
188    },
189    {
190     "type": "link",
191     "text": "example.com"
192    },
193    "\n\n",
194    {
195     "type": "email",
196     "text": "example@example.com"
197    }
198   ]
199  },
200  {
201   "id": 15,
202   "type": "message",
203   "date": "2020-11-12T15:05:32",
204   "from": "test",
205   "from_id": 9882011936,
206   "text": [
207    {
208     "type": "italic",
209     "text": "bold italic"
210    }
211   ]
212  }
213 ]
214}