You are not logged in.

#1 2015-07-02 16:05:22

Tuxy
Member
Registered: 2015-04-26
Posts: 22

xkcd.sh v1.0 {2015-03-31}

xkcd.sh v1.0 {2015-03-31} by Tux
XKCD comic strips downloader.
https://github.com/tuxy/bash/blob/master/xkcd.sh

--- Usage ---

 XKCD Downloader v1.0 
 by Tux {2015-03-31}

 Usage: ./xkcd.sh <id1> <id2>

// change comic strips directory

dir='/home/xkcd'

* Note you need to create directories using "mkdir -p". I'll fix this in next version, sorry smile

// example use

./xkcd.sh 1540 1545

Note: Files stored in "01545_comic.strip.title.png" format.

Thank you to Randall Munroe for https://xkcd.com/

Last edited by Tuxy (2015-07-02 16:53:39)


--{ Using Arch Linux Since 2011-10-25 }--
Keybase @ https://keybase.io/tuxy
GitHub @ https://github.com/tuxy

Offline

#2 2015-07-03 19:51:02

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: xkcd.sh v1.0 {2015-03-31}

If I use xkcd.sh 1 9999 ut will download all or just 1 and last comic?


Well, I suppose that this is somekind of signature, no?

Offline

#3 2015-07-03 21:17:55

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: xkcd.sh v1.0 {2015-03-31}

Just a curious question, how do you handle the interactive comics? Especially interested in the infinite zoom one.

EDIT:

I just read the source. To answer my own question, you have not done anything to handle interactive comics.

Now I wonder about a different thing. Your script needs curl to work. Why would you then download the png using wget?

Last edited by bstaletic (2015-07-03 21:44:04)

Offline

#4 2015-07-03 23:53:29

Tuxy
Member
Registered: 2015-04-26
Posts: 22

Re: xkcd.sh v1.0 {2015-03-31}

@ Jristz, yes you will download all available ones :-)

@ bstaletic, I did not know there is any gif ones, I will add support for that in next version. Also thanks for noticing wget will change that to curl as well :-)


--{ Using Arch Linux Since 2011-10-25 }--
Keybase @ https://keybase.io/tuxy
GitHub @ https://github.com/tuxy

Offline

#5 2015-07-04 00:21:52

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: xkcd.sh v1.0 {2015-03-31}

Just checking those interactive comics, and they are not .gifs.
Take a look at number 826 and 1416.

826: a lot of js to enable user interaction.
1416: Infinite zoom, loads one level at a time. Each level is a separate .png.

Wow, these extensions at the end of a sentence look ugly.

EDIT:
I found a web page containing all interactive and animated comics. The latter are, in fact, .gifs.

EDIT2:
There are also dynamic comics.

Last edited by bstaletic (2015-07-04 01:11:02)

Offline

#6 2015-07-04 15:31:51

Tuxy
Member
Registered: 2015-04-26
Posts: 22

Re: xkcd.sh v1.0 {2015-03-31}

@ bstaletic, Thanks for all the info. But if those are GIF/PNG/JPG, I won't be including them. Feel free to fork xkcd.sh on github.


--{ Using Arch Linux Since 2011-10-25 }--
Keybase @ https://keybase.io/tuxy
GitHub @ https://github.com/tuxy

Offline

#7 2015-07-04 19:54:53

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: xkcd.sh v1.0 {2015-03-31}

Tuxy,

I read every comic on line already, so I won't be downloading them. Just wanted to be helpful.

Offline

#8 2015-07-05 03:07:24

Tuxy
Member
Registered: 2015-04-26
Posts: 22

Re: xkcd.sh v1.0 {2015-03-31}

@ bstaletic, Thank you for your help.


--{ Using Arch Linux Since 2011-10-25 }--
Keybase @ https://keybase.io/tuxy
GitHub @ https://github.com/tuxy

Offline

Board footer

Powered by FluxBB