Make Your Own Favorite Instructables CDROM

Over the past few weeks I've been viewing the Instructables web site by rating, to see which ones I might like to do with my son. As I found interesting ones, I saved the PDF of the instructions in an Instructables directory on my computer. I was then going to burn a CDROM with all these saved files on it.

The problem with this approach is that it's not always obvious from the saved names, what the Instructable was about.

So this morning, I hacked up a simple script, that would look at all the filenames in that Instructables directory, then use the various Instructable web pages to create an index.html file that shows thumbnails and titles for each PDF file. I then added that file to the Instructables directory.

I then burned a CDROM with all the saved files and the index.html so that we can navigate them more easily.

Here's the script. It assumes the index.html file is in the same directory as all the PDF's.

If you'd like to use it, then you should save the PDF's you are interested in into a specific directory, then adjust the instDir variable in the script to point to that directory. If you've been selecting them by rating and you know how many pages you've viewed, then you can adjust the maxPage variable accordingly. The script will exit when it's either found all your saved files, or it's hit the maxPage web page.

(I initially tried to use BeautifulSoup to parse the Instructables web pages, but there's something there that it doesn't like. I also tried SimpleJSON, but that failed to parse it too. In the end, I just parsed the HTML myself. It didn't find all my PDF files. I can only assume that some of the ones I'd previously saved have now been renamed or deleted).

Here's a sample of the output it generated for the index.html file to show what it looks like in a browser. Hover over the images to get the titles. Obviously the links won't work as the PDF's aren't in the same directory for my blog.

The index.html that went on the CDROM has a lot more potential projects. Now we'll get to see which ones Duncan might be interested in helping to make.

[]

[]

[]

Comments:

Post a Comment:
Comments are closed for this entry.
About

user12607856

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today