oxide icon indicating copy to clipboard operation
oxide copied to clipboard

Copy screenshot to xochitl

Open Eeems opened this issue 4 years ago • 7 comments

Describe the solution you'd like There should be the ability to copy a screenshot into xochtil so you can draw on it.

Eeems avatar Mar 14 '21 00:03 Eeems

@utopiah would you be willing to help with this? My current thought is to add something to https://github.com/Eeems/oxide/tree/master/applications/screenshot-viewer to trigger copying it into xochtil.

Eeems avatar Apr 03 '21 03:04 Eeems

I imagine the easiest way would be to convert screenshot.png screenshot.pdf (after an opkg install imagemagick-png) then adding it to listed documents in a directory by adding the right metadata. Unfortunately that last step is a bit problematic since 2.6 so still figuring out that last part for now.

Utopiah avatar Apr 03 '21 07:04 Utopiah

@Utopiah I'm ready to work on this. Any insight on what I should do to add the metadata required?

I wonder if remarkable-fs or something similar could be used on the device to make working with the files easier.

Eeems avatar Jul 18 '21 18:07 Eeems

Having something like

echo "{'parent':'','type':'DocumentType','visibleName':'$1'}" | sed s/\'/\"/g > ~/xochitl-data/`echo $1 | sed "s/.pdf//"`.metadata; 
echo '{ "fileType": "pdf" }' > ~/xochitl-data/`echo $1 | sed "s/.pdf//"`.content;

with $1 as filename should do. xochtil has to be restarted to make the file visible though.

Utopiah avatar Jul 19 '21 08:07 Utopiah

Hmm, maybe I should try to use the cloud API to avoid requiring a restart? That would require the user to be connected to the cloud though. That or figure out a way to force a refresh without a restart. Likely that will require binary patching which might not play nice with ddvk-hacks.

Eeems avatar Jul 19 '21 13:07 Eeems

Another thought would be to try to use the USB interface by enabling it and doing something similar to https://github.com/rM-self-serve/webinterface-wifi to expose it on localhost.

Eeems avatar Feb 10 '23 21:02 Eeems

Very interesting idea

Utopiah avatar Feb 11 '23 04:02 Utopiah