maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   (Automatic/one-tap) Photo upload to Owncloud (https://talk.maemo.org/showthread.php?t=94547)

bennypr0fane 2015-02-01 23:13

(Automatic/one-tap) Photo upload to Owncloud
 
Hi,
I'm trying to work out a procedure for the easiest possible way to automate upload of pictures taken with the Jolla to an Owncloud server.
We currently have no native application that can do it. What we do have is Rsync, and some powerful command line tools and Linux packages.
With Rsync and the ShellEx application, we can reduce the effort needed to upload all new pics to Owncloud to one tap.
What's stopping me right now is the problem: Where do I rsync to?
Webdav is the only recommended upload solution for OC besides sync clients/apps and the web interface.
Owncloud's webdav share needs to be mounted somewhere in order to have a target to rsync to.
We currently cannot mount the share on the phone itself, although we have davfs2 on Openrepos. It won't install on my Jolla because of a dependencies error (maybe NielDK can shed some more light on this issue).
If you have a root server that is always on and is not your Owncloud server, it should be easy for you to mount the OC webdav share there and rsync your Jolla pics to it.
However, I have only my OC machine with an open internet port, so I have to mount the webdav to that. It's not working for me though, so I was hoping you guys could help me work out the proper mount options for a share *on the server that it comes from*.
I have unsolved threads here and here.
I know this part is not exactly a Jolla/SailfishOS topic, but it's part of the procedure that we could use with the tools we have at our disposal already and post it on TJC as a wiki, once all the details are clear.
If I succeed to mount the share on the OC server and the channel is open, the next step could be some sort of daemon that monitors the folder where the camera saves the pics, and triggers the rsync command whenever a picture is taken. Suggestions for this are welcome.

pycage 2015-02-02 17:00

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Just a suggestion: You could rip out the WebDAV implementation from Cargo Dock and use that. It shouldn't be too dependent on the UI, if at all.

https://github.com/pycage/cargodock/...api/davapi.cpp

juiceme 2015-02-02 19:15

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Quote:

Originally Posted by bennypr0fane (Post 1459254)
If I succeed to mount the share on the OC server and the channel is open, the next step could be some sort of daemon that monitors the folder where the camera saves the pics, and triggers the rsync command whenever a picture is taken. Suggestions for this are welcome.

That part can be done really easy with pyinotify like in cloudsync.sh:
http://talk.maemo.org/showpost.php?p...61&postcount=8

bennypr0fane 2015-02-02 19:57

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Quote:

Originally Posted by pycage (Post 1459333)
Just a suggestion: You could rip out the WebDAV implementation from Cargo Dock and use that. It shouldn't be too dependent on the UI, if at all.

https://github.com/pycage/cargodock/...api/davapi.cpp

At the moment this is read-only, it doesn't support uploads. At least that's the case for Cargo Dock. Unfortunately I don't have the skill set needed to find out whether or not it's true for just the Webdav part, nor for using that for anything else :-(
Maybe someone who does can try and take a look?

bennypr0fane 2015-02-02 20:01

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Quote:

Originally Posted by juiceme (Post 1459346)
That part can be done really easy with pyinotify like in cloudsync.sh:
http://talk.maemo.org/showpost.php?p...61&postcount=8

great, that is in fact the kind of thing that I was thinking of. :cool: It's way more hacky though, someone should make it into a GUI app...

nieldk 2015-02-02 20:25

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Quote:

Originally Posted by bennypr0fane (Post 1459351)
great, that is in fact the kind of thing that I was thinking of. :cool: It's way more hacky though, someone should make it into a GUI app...

What dependency problem are you having with davfs2 on openrepos ? I just tried installing it again, and on my device it install fine without complains, did you enable my repository ?

juiceme 2015-02-02 21:03

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Quote:

Originally Posted by bennypr0fane (Post 1459351)
great, that is in fact the kind of thing that I was thinking of. :cool: It's way more hacky though, someone should make it into a GUI app...

Well what you want to do, is to make it a service that monitors your "/home/nemo/Pictures/Camera/" and automatically uploads anything when you snap a picture or take a video.

No need for any kind of GUI there.

[*] actually I am of a mind that less GUI-tweaking you need to do, the smarter your device is...

m4r0v3r 2015-02-02 22:16

Re: (Automatic/one-tap) Photo upload to Owncloud
 
can you have services on the Jolla? I thought it wasn't possible due to API restrictions and wakelocks?

juiceme 2015-02-03 04:54

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Quote:

Originally Posted by m4r0v3r (Post 1459370)
can you have services on the Jolla? I thought it wasn't possible due to API restrictions and wakelocks?

Of course you can!
For example cron is one of most valuable things that I have in my device.

pycage 2015-02-03 18:50

Re: (Automatic/one-tap) Photo upload to Owncloud
 
Quote:

Originally Posted by bennypr0fane (Post 1459349)
At the moment this is read-only, it doesn't support uploads. At least that's the case for Cargo Dock. Unfortunately I don't have the skill set needed to find out whether or not it's true for just the Webdav part, nor for using that for anything else :-(
Maybe someone who does can try and take a look?

The WebDAV implementation in Cargo Dock supports uploads to WebDAV.


All times are GMT. The time now is 09:39.

vBulletin® Version 3.8.8