Download Jar. Libraryless. Click here for Pure Java version (8644L/62K).
1 | !7 |
2 | |
3 | p-exp { |
4 | long lastDate = 0, lastOriginalDate = 0; |
5 | new L<TelegramMsg> msgs; |
6 | for (S s : mL("Telegram Bot Log")) pcall { |
7 | Map map = safeUnstructureMap(s); |
8 | S type = cast map.get('type); |
9 | S text = cast map.get('text); |
10 | long originalDate = toInt(map.get('originalDate))*1000L; |
11 | long date = parseLocalDateWithMilliseconds_orKeepLong(map.get('date)); |
12 | if (originalDate != 0) print("diff: " + (date-originalDate)); |
13 | print("Type: " + type + ", date diff: " + (date-lastDate) + "/" + (date-lastOriginalDate) + "/" + (originalDate-lastDate) + ", text: " + quote(text)); |
14 | msgs.add(nu(TelegramMsg, +date, +originalDate, +text, |
15 | firstName := map.get('userFirstName), |
16 | lastName := map.get('userLastName), |
17 | userID := toInt(map.get('userID)), |
18 | sent := eq(type, 'sent), |
19 | globalID := map.get('globalID))); |
20 | lastDate = date; |
21 | lastOriginalDate = originalDate; |
22 | } |
23 | pnlStruct(msgs); |
24 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017616 |
Snippet name: | Read Telegram Mech Log Spike [OK] |
Eternal ID of this version: | #1017616/11 |
Text MD5: | 700bba6a55e15b92779bed045d9b32e7 |
Transpilation MD5: | 6c094b9b372606538d290f3ca8909516 |
Author: | stefan |
Category: | javax / networking |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-30 21:40:02 |
Source code size: | 952 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 1567 / 1160 |
Version history: | 10 change(s) |
Referenced in: | [show references] |