kiwiirc
kiwiirc copied to clipboard
[Suggestion] Export button for selected buffer's chat history
Idea
Kiwi IRC should provide a means to export the current conversation to plain text, allowing the user to save chat history for later use, e.g. technical support instructions, or just general conversation.
For example, in ContainerHeader.vue
, a button labeled Export
or with a :floppy_disk: icon. A JavaScript-generated blob of plain-text could then be downloaded, or open a new window with the raw conversation.
Though the IRCv3 chat history proposals will reduce the need for this with modern IRC servers, not all servers will support this and users may still want a local copy (e.g. for offline reading or backups).
Example (#freenode
)
After clicking Export
, the browser would prompt to download Freenode IRC - freenode - 2019-1-23 [timestamp].txt
or some such generated filename.
[20:03:30] β dcircuit_test_ki has joined
[20:03:31] <@ChanServ> [#freenode] Please read the topic.
[20:03:34] <rpifan> A_D, am i unbanned yet
[20:04:40] β nullsign is now known as junksin
[20:04:41] <thumbs> rpifan: from where?
[20:05:15] β jaeleet has joined
[20:06:27] β TR11 has joined
Additional
It is possible to copy-paste an entire conversation from the Kiwi IRC window, but depending on the selected layout, the text is not nicely formatted (timestamps, nicknames, and messages being separated by newlines, all mashed together). Selecting the entire conversation without selecting any of Kiwi IRC's interface text is a minor hassle, too, especially on mobile devices.
Results with copy-paste today
20:03:30
β dcircuit_test_ki has joined
20:03:31
@ChanServ
[#freenode] Please read the topic.
20:03:34
rpifan
A_D, am i unbanned yet
20:04:40
β nullsign is now known as junksin
20:04:41
thumbs
rpifan: from where?
20:05:15
β jaeleet has joined
20:06:27
β TR11 has joined
According to a quick discussion on IRC, this might fit as a plugin.
Great suggestion @digitalcircuit - this is something that we have discussed before! Thanks for giving such an in depth post too π
@prawnsalad - this is something I'd like to give a shot today, even if it doesn't make it into master. I think it might help me get a deeper understanding of how Kiwi is meshed together.
Now that better text copying support has landed, it might now be easier to add a button that simplyβ¦
- Tells Kiwi IRC's UI to select all messages in the current conversation (including ones hidden behind scrolling)
- Generates the plain text as if preparing for copy-paste
- Saves the copied text viaβ¦
- Triggering a JavaScript blob download of a plain-text file named
Freenode IRC - freenode - 2019-1-23 [timestamp].txt
or such (possibly more complex, more convenient for saving) - Copying to the clipboard (possibly easier, less immediately obvious how to save)
- Triggering a JavaScript blob download of a plain-text file named