eltos / PasteIntoFile

Paste clipboard data into files and copy file contents directly via hotkey or context menu
MIT License
87 stars 6 forks source link

Arbitrary file type support #12

Closed tfiers closed 1 year ago

tfiers commented 1 year ago

Use case: I want to extract diagrams made in PowerPoint. They are available in vector format on the clipboard, as seen by NirSoft's InsideClipboard:

image

I can also paste them in e.g. Inkscape as vector graphics.

But PasteIntoFile does not seem to support pasting vector graphics. (There is pdf, but that seems to contain just the flattened image).

Would it be possible to add svg as a supported file format?



More generally, I wondered if it would be possible to let the user choose any arbitrary file format -- and then choose the entry in the clipboard to go into it, i.e. choose the 'mapping'.

This is presumably a larger code change than just adding .svg support; and it is something I do not need at the moment.

eltos commented 1 year ago

Regarding SVG support I implemented something in 24dcb07bc0f34d96d48255bfbbd1d985ec8ca7ac. It's not yet released but you can try the debug build from the next branch and see if that works for you: https://github.com/eltos/PasteIntoFile/suites/8792849471/artifacts/399543817

tfiers commented 1 year ago

Yup, works for me!

eltos commented 1 year ago

Great.
I'll leave this one open to think about your Idea on arbitrary mapping.

eltos commented 1 year ago

More generally, I wondered if it would be possible to let the user choose any arbitrary file format -- and then choose the entry in the clipboard to go into it, i.e. choose the 'mapping'.

I won't implement this anytime soon, mainly because I think - given the magnitude of data typically present in the clipboard - it will be more disturbing than helpful. This is because data is usually duplicated in many formats, and there are a lot of custom binary formats which usually don't have a file type association and are rarely to be saved. I would like to keep things simple for the user, so they get what they want easily and quickly (and often without any GUI interaction), and not overwhelm them with a long list of cryptic formats to choose from.

Also, if someone requires saving arbitrary clipboard data as binary, NirSoft's InsideClipboard can already do this.

Having said this, I'll close this issue.