hfaran / slack-export-viewer

A Slack Export archive viewer that allows you to easily view and share your Slack team's export
https://pypi.python.org/pypi/slack-export-viewer
MIT License
939 stars 194 forks source link

Mistake In Messages.CS CreateSlackMessageHtmlArchiveFile #57

Closed traxinv closed 6 years ago

traxinv commented 6 years ago

Good day,

First off thank you very much for this it helped my tremendously.

I found a small mistake in your code in the procedure: static void CreateSlackMessageHtmlArchiveFile the write to HTML was taking the first 250 lines every time instead of being incremented with messageIndexPosition.

Also the HTML file being produced did not have any CR LF in the file causing it to become unmanageable "wide".

StringBuilder fileBody =new StringBuilder(); fileBody.Append(""); for (int i = messageIndexPosition; i < messageIndexPosition + numOfMessagesToTake; i++) { var messageAsHtml = MessageToHtml(messageList[i], channelsMapping); fileBody.AppendLine(messageAsHtml); } fileBody.AppendLine(""); messageIndexPosition += numOfMessagesToTake; w.WriteLine(fileBody);

traxinv commented 6 years ago

crap wrong project.. please close.