200ok-ch / organice

An implementation of Org mode without the dependency of Emacs - built for mobile and desktop browsers
https://organice.200ok.ch/
GNU Affero General Public License v3.0
2.44k stars 151 forks source link

point organice to a read-only url, eg local file:// #940

Closed ashmanskas closed 1 year ago

ashmanskas commented 1 year ago

I just gave organice a try, to see how handy it may be for letting me browse and search existing org content without editing it.

To do this, I wound up creating a gitlab repo, since my attempt to read via fastmail's webdav interface, as well as my attempt to read via local webdav, returned a failure message that didn't include any details; and I seldom use dropbox.

I think that for initially trying out organice on a desktop/laptop, it would be very handy to be able to point organice to a URL at which to find an org file, eg

https://raw.githubusercontent.com/xenodium/xenodium.github.io/master/index.org

or

file:///home/ashmansk/org/test.org

Alternatively, one could point to a directory, possibly containing .organice-config.json as well as a set of org files.

Is this a feature that would have wider appeal?

munen commented 1 year ago

Is this a feature that would have wider appeal?

Sure, apart from it not being technically possible.

However, there's ways to check out organice:

unhammer commented 1 year ago

my attempt to read via fastmail's webdav interface, as well as my attempt to read via local webdav, returned a failure message that didn't include any details

Just tried fastmail, from the console log it seems fastmail's CORS policy stops it from being used by organice (you would need to access it from a browser that doesn't check CORS policies). Would be nice if organice mentioned the CORS failure, but maybe that's difficult to know from js.

munen commented 1 year ago

@unhammer There is extensive documentation on how WebDAV as a protocol works, including CORS: https://organice.200ok.ch/documentation.html#faq_webdav

ashmanskas commented 1 year ago

The WebDAV/CORS documentation in the FAQ is indeed very extensive. I suppose the WebDAV failure message "There was an error retrieving files!" could potentially point the user to the excellent diagnostic suggestions at

https://organice.200ok.ch/documentation.html#faq_webdav

which do mention why "organice cannot show you a really semantic error message on" WebDAV access failures.

It seems the message is generated in 'getDirectoryListing', which is not specific to the WebDAV sync backend.

https://github.com/200ok-ch/organice/blob/a7f57ce8520778625ba634617be681e2de6c117d/src/actions/sync_backend.js#L83

@unhammer There is extensive documentation on how WebDAV as a protocol works, including CORS: https://organice.200ok.ch/documentation.html#faq_webdav