How to setup Webview on private server?

54 views
Skip to first unread message

Roberto Inzerillo

unread,
Jan 3, 2020, 4:35:00 AM1/3/20
to Subsurface Divelog
Hi everybody,
 I'm happy with Subsurface on Windows, the cloud sync and the Webview UI. Still I'm wondering if it's possible to setup the Webview on my own private server.

I don't seem to find any reference to the software license, to a possible download link or anything else related.

Any hint?

Robert C. Helling

unread,
Jan 3, 2020, 12:30:09 PM1/3/20
to Subsurface Divelog
In the desktop version, you can export your dives to html. Upload those files to your web server and there you are. 

Best
Robert 

Dirk Hohndel

unread,
Jan 3, 2020, 12:35:32 PM1/3/20
to Subsurface Divelog
Correct. There's also a build target for a separate 'export_html' app in the source code, and that's the app that's used to create the web pages on cloud.subsurface-divelog.org on every push to the cloud storage.
Since that software doesn't contain any AGPL components, links to the license aren't required on the website...

/D

Roberto Inzerillo

unread,
Jan 3, 2020, 1:08:35 PM1/3/20
to Subsurface Divelog
Thanks Robert and Dirk, very usefull to know.
I couldn't imagine that was so simple. In fact exporting as HTML generates exactly the very same page the Webview offers online.

I thought Subsurface would export data to the cloud and the Webview server would then elaborate it and generate the HTML/Javascript on the fly ... which, as I see now, is not the case :-)

Fair enough. 
I wonder now if Subsurface program can be customized in order to make it upload that file to my own ftp server instead. That would be more straightforward. It does use ftp, right? ... or not?

Dirk Hohndel

unread,
Jan 3, 2020, 1:58:50 PM1/3/20
to Subsurface Divelog
It doesn't use ftp.
The cloud server simply has a hook that runs whenever a user pushes new dive data into the cloud - and that hook runs export_html and writes the new HTML straight into the web server's file system :-)

/D

-- 
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/d5613ed9-c06d-4bfb-abc5-4ac5ec940239%40googlegroups.com.

Roberto Inzerillo

unread,
Jan 4, 2020, 3:33:42 PM1/4/20
to Subsurface Divelog
Il giorno venerdì 3 gennaio 2020 19:58:50 UTC+1, Dirk ha scritto:
It doesn't use ftp. 
The cloud server simply has a hook that runs whenever a user pushes new dive data into the cloud - and that hook runs export_html and writes the new HTML straight into the web server's file system :-)

Ok, that's reasonable enough.

Are those data pushed in some "usable" form? Would it be possible to let Subsurface push it elsewhere (my own server)?

Robert C. Helling

unread,
Jan 4, 2020, 7:11:17 PM1/4/20
to Subsurface Divelog


Am Samstag, 4. Januar 2020 21:33:42 UTC+1 schrieb Roberto Inzerillo:
Il giorno venerdì 3 gennaio 2020 19:58:50 UTC+1, Dirk ha scritto:
It doesn't use ftp. 
The cloud server simply has a hook that runs whenever a user pushes new dive data into the cloud - and that hook runs export_html and writes the new HTML straight into the web server's file system :-)

Are those data pushed in some "usable" form? Would it be possible to let Subsurface push it elsewhere (my own server)?

The cloud storage is git internally. Subsurface has the URL of the Subsurface cloud server hardcoded. But you can save you log file to a local repository (in the save dialog, go to a git repository and use [branch_name] as the filename). Then you can use this repository as any other git repository, in particular push it to a remote server (which could then have a hook to run export_html).

Honestly, the "Export to html" plus scp to your web server is probably as easy as it gets (as long as you are not serving some thousand people's dive logs). 

Dirk Hohndel

unread,
Jan 4, 2020, 7:52:12 PM1/4/20
to subsurfac...@googlegroups.com


> On Jan 4, 2020, at 12:33 PM, Roberto Inzerillo <roberto....@gmail.com> wrote:
>
> Are those data pushed in some "usable" form? Would it be possible to let Subsurface push it elsewhere (my own server)?

It is - but that is intentionally made hard because this is very fragile and in reality requires you to really understand how we use git internally as our storage engine. There is a format in which you can set the filename for saving your dives that enables you to talk to a git server of your choice.
But the moment we document this, people will ask to get help with it and we will never see the end of the support requests for it.

So, if this is something you're comfortable with, look at the sources and you'll see that you can provide a git URL with a specific syntax and if you set up a git server then you can store data to that server and do whatever you want with your data there.
But I simply do not have the time to support people trying to do that.

The easiest solution really is what Robert suggests. Run export_html locally.

/D

Reply all
Reply to author
Forward
0 new messages