Open nephros opened 1 year ago
@szopin, would you be open to implementing something like a small D-Bus api, or SFOS Share Action receiver in SFV, so that Bugger could call native SFV bits? That would be a bit cleaner (well...) than duplicating code.
Whatever works for you is fine by me, sadly way out of my league I'm afraid. I'm happy to accept any PRs, just won't be able to help as have 0 experience with dbus outside of playing with it in terminal (action receiver first time I hear of)
action receiver first time I hear of
Yes I dont think that's an official term, I mean the thing that sits on the other end of a Sailfish.Share ShareAction and handles the data. I don't know whether there is documentation about it anywhere, but one can look at how the email app does it:
/usr/share/jolla-email/email.qml
(DBus interface to receive shared data)/usr/share/jolla-email/pages/ShareComposerPage.qml
(handling the data)Interesting, if it's doable from QML only then a big plus as would increase my available troubleshooting time immensely. Text data should be no problem, not sure about file uploads, for picture upload had to workaround with imgbb as they accept base64 encoded data and qml has no support for binary strings, for logs maybe some kind of online pastebin could be used and links automatically generated (don't think discourse has attachments support, looks like only images) edit: https://pastebin.com/doc_api seems nice, also https://github.com/PrivateBin/PrivateBin/wiki/API but implementing AES just to then paste a link on a public forum is probably overkill edit3: nvm, just noticed the logcollect branch
Yeah I have explored a couple of avenues, in that branch and a couple of local ones.
There's issue #29 but it's stalled by the fact that I can launch email either pre-filling subject (mailto:), or adding files (ShareAction) but not both.
Tried to work around the second by faking the email body but doing things like compression or MIME-encoding in JS is painful (for the user/CPU -- there's plenty of ready-to-use JS libraries that can do it) for non-trivial string lengths/file sizes.
something like a small D-Bus api, or SFOS Share Action receiver in SFV, so that Bugger could call native SFV bits?
A third option could be a MIME scheme handler. If SFV registered itself as a handler for either 'https://forum.sailfishos.org' or maybe a custom scheme like sfos-forum://
, Bugger could call it per URL as it does now, and SFOS would present a choice of browser and SFV.
I have done something like that in one of my first SFOS hacks, youtube-dl-helper:
https://gitlab.com/nephros/youtube-dl/-/blob/sfos-fixes/files/youtube-dl-open-url.desktop#L11
https://gitlab.com/nephros/youtube-dl/-/blob/sfos-fixes/files/youtube-dl-open-helper.sh#L4 (<-- just realized there's a bug in the case
, but it happens to be harmless)
https://forum.sailfishos.org/t/sailfish-community-news-11th-march-sdk-mimetypes/5409
If we go with this custom scheme is probably better to avoid hijacking normal links to the forum
If we go with this custom scheme is probably better to avoid hijacking normal links to the forum
Well, it could also be a viewed as a feature...
With no UI accessible way of overriding those 'features' it kinda gets messy in sfos when every app registers itself (on my old jolla C I would get like 5-6 options and then due to some bug even Browser started showing twice... Not a good experience)
On Thursday, 19 January 2023, Peter G. wrote:
If we go with this custom scheme is probably better to avoid hijacking normal links to the forum
Well, it could also be a viewed as a feature...
-- Reply to this email directly or view it on GitHub: https://github.com/sailfishos-chum/bugger/issues/36#issuecomment-1397457062 You are receiving this because you were mentioned.
Message ID: @.***
-- Sent from my Jolla
Inspired by: https://github.com/szopin/harbour-sfos-forum-viewer/pull/63#issuecomment-1396920756
Things like:
could be lifted from/done through SFV instead of a NIH implementation.