]> njoseph.me Git - blog.git/blob - content/posts/read-it-later-solution.md
Rolling my own Read It Later solution
[blog.git] / content / posts / read-it-later-solution.md
1 ---
2 title: "Rolling my own Read It Later solution"
3 date: 2020-09-18T23:51:09+05:30
4 lastmod: 2020-09-18T20:40:09+05:30
5 tags : [ "free-software", "Pocket", "Wallabag", "read-it-later", "Syncthing", "SingleFile", "Firefox", "addons" ]
6 categories : [ "free-software", "privacy", "archiving" ]
7 layout: post
8 type: "post"
9 highlight: false
10 ---
11
12 After using Pocket (originally called Read It Later) and the self-hostable free software
13 Wallabag, I [started wondering](https://toot.thoughtworks.com/@njoseph_1/104872980794830072)
14 if this problem of archiving web pages to read later can be solved without
15 having to use a web application.
16
17 Pocket | Wallabag
18 :-------------------------:|:-------------------------:
19 ![Pocket Logo](/blog/pocket.png) | ![Wallabag Logo](/blog/wallabag.png)
20
21 Essentially, what I need is a way of saving the entire content of a web page for
22 offline reading and maintain a list of such items. Also, I'd like the files to be
23 available on multiple devices.
24
25 ![Why not Syncthing meme](/blog/why-not-syncthing.png)
26
27 My go-to solution for making things available on multiple devices is [Syncthing](https://syncthing.net/ "Syncthing website").
28 Syncthing is a file synchronization solution that allows synchronizing the files
29 in one directory across multiple devices (a lot like rsync). Now the problem
30 boils down to saving web pages as files.
31
32 Most browsers allow you to save webpages. But webpages saved thus are not a
33 single file, but a HTML file and a folder containing images, CSS files and
34 other assets. There's fortunately a Firefox addon called
35 [SingleFile](https://addons.mozilla.org/en-US/firefox/addon/single-file
36 "SingleFile addon") which does exactly this. It allows you to save a webpage as
37 a single HTML file by embedding the CSS, fonts, images etc.
38 (Printing to PDF is another option, but I'm not a big fan of PDF files.)
39
40 SingleFile | Syncthing
41 :-------------------------:|:-------------------------:
42 ![SingleFile logo](/blog/singlefile.png) | ![Syncthing logo](/blog/syncthing.png)
43
44 Firefox allows you to configure custom shortcuts for each extension. My
45 preferred shortcut for saving a page for offline reading is Alt+C. You can also
46 click on the SingleFile icon to save the current page.
47
48 ![SingleFile addon shortcut](/blog/singlefile-addon-shortcut.png)
49
50 SingleFile doesn't provide an option to set the download directory but saves the
51 file to the default download directory of the browser. I don't use the default
52 download directory anyway, so I set it to `~/Sync/to-read`
53 (`~/Sync` is the default directory synced by Syncthing). For other downloads,
54 Firefox asks me where to save each download.
55
56 ![Firefox default download location](/blog/firefox-default-download.png)
57
58 In the file manager, simply sort by "Last Modified" to see the latest saved items.
59
60 ![Sorting by last modified](/blog/last-modified.png)
61
62 You can now read your pages completely offline - a feature which most
63 read-it-later services cannot boast of!
64
65 ## Caveats
66
67 * Browser performance might suffer when loading large pages saved by SingleFile.
68 Printing to PDF might be a better option in this case.
69 * Firefox Reader View might not work on a saved page even if it had worked on the original page.
70
71 ## Acknowledgements
72
73 Thanks to [@mathew@mastodon.social](https://mastodon.social/@mathew "Mathew's profile on mastodon.social") for suggesting the SingleFile addon.