Offcourse - a proof of concept offline reader for discourse


(etewiah) #1

So, I have been wondering for a while about what it would take to create an offline reader for discourse. I know many people think its not necessary but ‘different strokes for different folk’ - for me personally it would be super useful.

Recently I decided to have a go and this is the result:

http://klavado.com/offcourse

Now, a big massive warning: this is only a PROOF OF CONCEPT!!! It looks terrible and has about 6.5 million bugs but the basic functionality is there.

I will improve it over the coming weeks but I’m sharing it at this early stage to get some initial feedback about the idea. Is the basic idea sound? Would you use it? Is there something about my approach that is fundamentally wrong?

You can have a peek through the code here:

Again, please bear with me as this is just a proof of concept. There are a lot of small things I need to fix in the code so I’m not looking for detailed feedback at this stage but I am interested in general feedback about the concept and if anyone might be interested in working with me on it.


Format for hard copy or PDF printing
Pocket (offline reader) support
Tools to "aggregate" many Discourse forums?
(Erlend Sogge Heggen) #2

I’m very fond of offline functionality. Thanks for picking this up, and best of luck to ya. I’m no developer but if you need help testing anything just holler.

For me, the ideal outcome of this proof-of-concept would be that it is merged into core.

I see no good reason why Discourse shouldn’t eventually have offline-capabilities on par with Google Docs and Inbox. We’re dealing with digested communications, which is the perfect candidate for offline use.

Simple Use Case:

Load in the last 200 posts of the forum while you’re on the Wi-Fi, then when you’re on the road/railways/skyway you can read 50 of them, reply to 10, and when you arrive at your next connected destination you’ll be prompted to publish your drafts.


(etewiah) #3

Thanks for the words of encouragement @erlend_sh - I appreciate it.

I’m not entirely convinced myself that this needs to be merged into core. I think it would work quite well as a standalone ember app. I started on it partly because I wanted to play with Ember CLI and I’m enjoying the process of working with it much more than with regular plugin development.

It should also be a nice opportunity to play with some alternative user interfaces for discourse.


(Tobias Eigen) #4

I love this development. What I would love to be able to do is put my discourse forum content on a USB drive and distribute it to members in Africa and other places where regular access to the Internet is a challenge.

I also would like to be able to select a topic or category and simply download it for offline reading or even printing out. The output would be a usefully formatted summary of the content.

Also no developer but happy to help with testing and ideating.


(etewiah) #5

That’s a pretty interesting use case @tobiaseigen. I hadn’t even thought of that. I can’t quite think how I would be able to allow the offline version to be stored on a USB drive though. If anyone can give me some pointers, I’ll investigate.

I’m quite happy with feature-creep on this. With the ease of development with Ember-CLI, its quite easy to try out new things just to see how it goes.

Yesterday it occurred to me that I could use this app as a way of collecting a directory of discourse sites out there. I’ve already been able to code a very simple implementation which I have now deployed to the site. Now each time you add a url to retrieve topics from, I save that so the next visitor will have that site as an option on the dropdown list.


(etewiah) #6

Okay, so I’ve managed to get it to a point where I’d say its usable. You should be able to add the url for any discourse site at all, select any topics you want and save them for offline reading.
The offline view of the topic is very basic but as a proof of concept I’d say it works. Please have a look again and let me know if there are any obvious major bugs:

http://klavado.com/offcourse


#7

Seems usable now, although I’m not sure why someone would use this instead of a real Discourse instance. Posting replies would be a major feature, but authentication could get tricky then.

I’ve notice that threads can get added to the sites too, which you probably dont want:


(etewiah) #8

Hey @Moter8, thanks for pointing that out. I’ve fixed it now :wink:

As to why someone would use offcourse, the idea is that you can select which topics you want to be able to view offline. Later, if you no longer have an internet connection, you can still browse to and read these topics which you can’t with the standard discourse. Was that not clear or is it that you don’t find that to be useful?

As I’ve been working on this, other use cases have occurred to me. For example, it wouldn’t be too difficult to let people save the collection of topics that interest them on the server as a curated list. Others can then look at these curated lists as a way to discover interesting topics. Does that make sense?


(Khoa Nguyen) #9

At offcourse is also a online website. User have to install offcourse to their computer right? (which is difficult for most of normal user)


#10

Nope, the threads get saved locally to your browser storage.

Yes I understood that, but it seems kinda lackluster to me. If Discourse were a mostly-mobile service or app then it would have more use to me.


(Erlend Sogge Heggen) #11

Chrome 40 Beta has a heavy focus on offline features. I’m excited!

Good use of Service Workers sounds like something that could greatly benefit standard Discourse as well.


(Caue Rego) #12

I think it would be much better to make a PR to discourse implementing a “print mode” for articles. That way you can use discourse with whichever your favorite offline reading method. Many are already available, no need to re-invent the wheel here.

I personally enjoy pocket.