All | 43 Folders | Accessibility | BoingBoing | Books | Computer Related | Family | Films | General | Hacking | Hobbies | Humor | Java | Links | Omni | OpenSolaris | Puzzles and Games

Main | Next day (Sep 11, 2004) »
20040910 Friday September 10, 2004

Initial Version of an Auto-Generated Bookmarks Tool

It's Friday hack day. As I mentioned earlier in the week, I've been working on a Java application that takes a "bookmarks.xml" file describing a set of topics that you potentially want to automatically generate the best bookmarks for. This post is just to say that it's working great.

I will now try to jump through whatever hoops are needed to share the source code so others can use it and hopefully help to further improve it.

So here's how it works in more details. The initial XML file has entries of the form:

    <?xml version="1.0"?>
    <!-- Sample set of auto-generated bookmarks -->
    <bookmarks>

      <topic
        name="Perl"
        >

        <entry
          label="API"
          query="Perl language operators functions"
        />
        <entry
          label="FAQ"
          query="Perl language FAQ"
        />
        <entry
          label="Tutorial"
          query="Perl language tutorial"
        />
        <entry
          label="Manual Pages"
          query="Perl language manual pages"
        />
        <entry
          label="HOWTOs"
          query="Perl language HOWTOs"
        />
        <entry
          label="Modules"
          query="Perl language interfaces modules"
        />

      </topic>
    </bookmarks>

Over time, I'll probably add more tags to this file to help delineate different subjects, but for now my sample bookmarks.xml file contains the entries above for a variety of different programming languages that I'm interested in (C, C++, Java, JavaScript, Korn Shell, Lisp, Perl, Python, Objective-C, Ruby, Smalltalk and Tcl/Tk).

When the Java app reads in the bookmarks file, it creates a row of labeled checkboxes, one for each entry in the topic. Each row is a JPanel which gets added to a scrollable pane. The user checks the ones that they would like to generate bookmarks for. When you are ready, you click on a "Generate" button, and the application then makes Google search API calls to generate the best URL for each search. It then writes the results out as an HTML page.

Here's what it generated when I checked all bookmarks (HTML web page headers and footers removed):

There are currently three command line options you can supply to the tool:

There's still lots to do. As you'll see from some of the URL's automatically generated above, the search query terms need to be refined to hone in on the best and/or correct web pages to return. As it stands, it does a surprisingly good job with very simple search terms. There are some bad ones like this for "Smalltalk HOWTOs" though. Something where others can help is to generate unique search query strings that best capture the web page wanted.

I also want to improve the GUI a bit, add in a menu-bar, and GUI ways to set the input/output files and the search key. Plus some easy way to automatically check all the checkboxes for one topic, and so on.

Hopefully I'll find some time to continue this next week.

[]

[]

( Sep 10 2004, 01:26:43 PM PDT ) [Listen] Permalink Comments [2]

Science Fiction Authors Blogging

By word of mouth, I've so far come across the following science fiction authors who are also blogging. I'm sure there are lots of others. If you know of any, please let me know by commenting on this post, and assuming you have the URL of their blog, I'll add an entry to the list.

There are also various newsgroups of Science Fiction / Fantasy folks here (thanks bentley).

[]

[]

( Sep 10 2004, 09:45:51 AM PDT ) [Listen] Permalink Comments [15]