Jump to content

XKCD Downloader


Recommended Posts

Hey all,

This is the first script I've decided to post, and I'm pretty happy with it. Its basic function is to download comics from xkcd.com, and save them for offline use. It can also update the ones you have, and create xkcd-ish websites to view the downloaded comics offline. The webpages also have the 'Random' function.

The only thing I'm missing is a search function, which I am NOT happy with, so I disabled it. It loads a logfile, you type your search term, it loads the SAME file again, then you get your results, to generate a results page, it loads the logfile a third time and makes it. That's why I disabled the search feature. :D I'd much rather have a javascript search integrated into the webpage. Anyone here know a good way to do that?

It downloads comics, alt-text and transcripts. Transcripts are in the search function currently, so they're disabled.

Can't wait to hear feedback! I'm only posting source if someone is interested in it.

Will T

EDIT: If you 'Download All' before you 'Get Info' it will seem to download twice. This is normal. Wait for the second progress bar to finish.

EDIT 2: I had a request for source, so I've attached it. WARNING: My code is mostly uncommented and quite messy. Browse at own risk... :D

XKCD_Downloader_0.1a.zip

post-48365-1245648064_thumb.jpg

post-48365-1245648078_thumb.jpg

post-48365-1245648112_thumb.jpg

post-48365-1245648126_thumb.jpg

post-48365-1245648138_thumb.jpg

XKCD_Downloader_0.1a_SOURCE.zip

Edited by montymintypie
Link to comment
Share on other sites

Im trying it at the moment.

I like the way you made your GUI. Very nice!

But when I press 'Download All Comics', where does it save them? :D

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

It makes a new folder, 'XKCD Comics'. In this folder are all the images, a logfile (contains image filename/title/logfile etc) and a hash file (so you can't mess with the logfile and break something :D )

If you generate a webpage, it makes a folder for them too, and stick a few images in there (XKCD logo and favicon) as well. If search is working (which it isn't) it'll make a third folder for transcripts.

Will

Link to comment
Share on other sites

It makes a new folder, 'XKCD Comics'. In this folder are all the images, a logfile (contains image filename/title/logfile etc) and a hash file (so you can't mess with the logfile and break something :D )

If you generate a webpage, it makes a folder for them too, and stick a few images in there (XKCD logo and favicon) as well. If search is working (which it isn't) it'll make a third folder for transcripts.

Will

Ah yes, found it. But the Generate Webpage isn't working for me. When I press the button, all button's get disabled and nothing happens.

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

where exactly is the folder made, i searched my computer, and nothing was found

EDIT: Found it, but after waiting 20 minutes for it to download, i only got 8 pictures, and it tried to download them all again... it also cant find the logfile

Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Link to comment
Share on other sites

That's weird... It's set to create the folder in the @ScriptDir

Generate webpage should load a logfile, then write all the info into webpages. Did you move the folder by chance? And does it change any of the status labels before it does nothing?

Found it, but after waiting 20 minutes for it to download, i only got 8 pictures, and it tried to download them all again... it also cant find the logfile

The way it gets the comics is by first getting the info for all of them. _InetGetSource (or whatever the function is called) and it then filters out the alt text, image name, image url, image filename etc. This is the equivalent of the 'Get Info' button on the GUI. It then downloads all of the comic images, using the URL from the 'Get Info' part. After it finishes downloading all the images, it then writes a logfile. I think you might have mistaken the 'Get Info' part for the downloading part. I'll change some of the labels so it's a little more informative. It also doesn't make the folder until it starts to download.

Will

Link to comment
Share on other sites

Great program, just hope all those downloads won't crash their server :D

Edited by colafrysen
[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...