gempir

Log migration

Dec 4th, 2018
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. I think we should ignore channels for this project, the data is not that important so any files named channel.txt can be ignored.
  2.  
  3. What I need:
  4.  
  5. Folders/Files in this structure:
  6. channelid/year/month/userid.txt
  7.  
  8. Example:
  9. 11148817/2018/12/22484632.txt
  10.  
  11. Current data is similar, but uses usernames and month is a string instead of int. ALSO
  12. Files can be .txt or txt.gz in the old logs, new logs should only be .txt I will gzip them later myself.
  13.  
  14.  
  15.  
  16. Current lines are saved like this:
  17. [2017-12-31 23:15:32] gempir: FeelsWeirdMan
  18.  
  19. This the new format:
  20. @badges=subscriber/6,premium/1;color=#FF0000;display-name=Redflamingo13;emotes=;id=2a31a9df-d6ff-4840-b211-a2547c7e656e;mod=0;room-id=11148817;subscriber=1;tmi-sent-ts=1490382457309;turbo=0;user-id=78424343;user-type= :[email protected] PRIVMSG #pajlada :Thrashh5, FeelsWayTooAmazingMan kinda
  21.  
  22. For more explanations of these parts this test might be helpful:
  23. https://github.com/gempir/go-twitch-irc/blob/master/message_test.go
  24.  
  25. Obviously we can't get all that data from just the line of txt. but what we should be able to get is:
  26. room-id, tmi-sent-ts (this is very important for the timestamp in the end), user-id, and maybe display-name if you feel like it.
  27.  
  28. Almost all messages are PRIVMSG so you don't need to do different types just PRIVMSG.
Advertisement
Add Comment
Please, Sign In to add comment