Monday, May 16, 2016

Web comics using a Bash script

Over at Linux Journal, I recently wrote a short article about reading web comics using a Bash script.

I follow several web comics. Every morning, I used to open my browser and check out each comic's web site to read that day's comic. That method worked well when I read only a few web comics, but it became a pain to stay current when I followed more than about ten comics.

These days, I read around twenty web comics: Darths and Droids, Ctrl+Alt+Del, Questionable Content, and a bunch of others. It takes a lot of time to open each website separately just to read a Web comic. I suppose I could bookmark the web comics, but that's twenty browser tabs to open every morning. Whether I open them all at once or one at a time, that seems like too much time for me.

I figured there had to be a better way, a simpler way for me to read all of my web comics at once. So I wrote a Bash script that automatically collects my web comics and puts them on a single page on a personal web server in my home. Now, I just open my web browser to my private web server, and read all my comics at once.

The Linux Journal article walks you through how to build the Bash script using wget, xmllint and ImageMagick, and provides the actual script as an example.
image: Linux Journal

5 comments:

  1. I just put all of my comics into a Firefox bookmark group, and use the "open group in tabs" to open them all immediately. Works fine for me with about sixty-odd comics (though I do split it into three groups to avoid stressing the machine loading them all at once).

    ReplyDelete
  2. You can also use an RSS feed reader like Liferea.

    ReplyDelete
  3. You really should have a look at rss. Perhaps run ttrss on your server?

    ReplyDelete
  4. I'd tried RSS, but the problem is that several of the web comics that I read include a tiny thumbnail image in the RSS feed, so those are unreadable. One or two others don't include the comic at all in the RSS feed. This script gets around that by fetching the comics directly from the comic websites.

    ReplyDelete
    Replies
    1. A feed reader is a very convenient tool, so another possibility is to create an RSS document instead of an HTML one, and feed that to the reader.

      This is what I do to read dilbert.com and howtoons.com in Liferea, I use Tweeper:

      https://ao2.it/en/blog/2013/12/04/tweeper-02-now-also-debian

      https://ao2.it/en/blog/2015/09/18/tweeper-04-released-scraping-facebook-and-instagram

      I also follow people on various social media in my feed reader with Tweeper so that I don't have to log in each time...

      If you are interested in using Tweeper I could add support to it for some other web comic sites.

      Ciao,
      Antonio

      Delete

Note: Only a member of this blog may post a comment.