arboard
arboard copied to clipboard
Allow to read/write data of any format
Hi, nice crate! I'm looking into implementing Web Clipboard API for Deno and this crate seems perfect for that. Though, there has to be a method to directly read/write bytes to implement that. Will it be added?
Yeah, allowing to read and write arbitrarily typed data seems like a useful addition. Maybe an enum of possible clipboard types could be used as an efficient and typo-resistent alternative to MIME type strings.
I started working on this
Which operating system would you use for the implementation work? Just because I'll start working on that next. (The macOS implementation should be usable at this point)
@ArturKovacs we would need support for all the 3 systems this crate supports; so win, osx & x11.
I was going to implement it for all of those anyways. I was just asking in case you wanted to start working on it before the implementation here is complete.
Oh I see, I misunderstood. Well we currently are unsure whether to add the clipboard API or not, so implementation wont start in the next few days in either case.
Got it! Thanks for letting me know.
@ArturKovacs Hi! I'm interested in this library. I need rich text and file clipboard access too. I'd happily settle for a binary API for arbitrary formats though!
Is this still actively being worked on?
Hi I would like to finish #23 first, but admittedly I lost motivation to work on that PR after many failed attempts.
Although it is possible, that I will spend some time with either the any-format branch or #23 in the near future, now that you ask.
Hello! I'm working on a toy terminal hex editor and I'm wondering if there's any status updates on this issue, as it'd be useful to copy raw bytes into the clipboard.
Regardless, really nice project and thanks for all of the work!
Hi @ArturKovacs , is there any update on this ?
I started experimenting on this and was able to support any format on X11. However, I just noticed that my approach/API is a lot different than yours.
My approach was to implement these functions on clipboard:
// get formats currently present in clipboard
get_formats()
// get bytes for given format
get_bytes(format: &[u8])
// sets the bytes with given format(mime-type)
set_bytes(bytes: &[u8], format: &[u8])
Hi I lost interest to continue working on this. Anyone can of course use/steal my work from the any-format branch.