comics search plugin

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
adambot
Bruji Friend
Bruji Friend
Posts: 17
Joined: Mon Jun 04, 2007 9:31 pm

comics search plugin

Post by adambot »

Greetings,

Now that i have modified my nib file to display comic information, i would like to build a plugin that will automatically retrieve the comic information for me from comics.org/wikipedia/comicbookdb. I downloaded the example plugin, however i don't even know where to start. Has anyone written one of these before that used data from an http page? Is the source code available for the search plugin in the extra section for cdpedia?

thanks for any help you can offer :D
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

Here is a sample plugin for comics.org. You will have to drop a copy of your modified Bookpedia into the build folder under both Release and Debug so that the plug-in project can launch the program automatically for easy testing and debugging.

With the debug version you can even set a breakpoint in your code and use command-y to step through your code and see how your variables change as you are parsing the information.

For Wikipedia the fact that their site does not let you narrow the search to just comics means you have to find out a way to find out the comics between other results say the movie of Spiderman. But the info boxes that Wikipedia uses are very useful especially since the Wikipedia language in it's raw format for the boxes is easier to parse as it's meant for a computer to understand. To get an XML with this format use Special:Export feature for example http://en.wikipedia.org/wiki/Special:Export/Spider-Man
mattydee
Contributor
Contributor
Posts: 7
Joined: Wed Oct 17, 2007 10:37 pm

Post by mattydee »

adambot ~

were you able to successfully make the plugin work? i'd be very interested in your set-up, if so. i'm looking for a new book database, and thought if comics could work as well, then maybe this would be the way to go.

conor ~
add me to the list of dedicated comicspedia requesters.

~mattydee
adambot
Bruji Friend
Bruji Friend
Posts: 17
Joined: Mon Jun 04, 2007 9:31 pm

Post by adambot »

I had it working for awhile, but then i upgraded to version 4 and everything broke on me... I am working on re-creating everything now.

Adam(bot)
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

If you get stuck and need a hand with the code don't hesitate to ask. The new 4.0 plug-in architecture has potential, but I haven't documented it yet as I am concentrating on Leopard first.
swiss1939
Junior Member
Junior Member
Posts: 4
Joined: Fri Jun 08, 2007 3:02 pm
Location: Brooklyn, NY

comic database

Post by swiss1939 »

I dont know if this would work but I check comicspriceguide.com, granted it doesnt really list detailed info about writer/artist/inker, etc but it is very useful for finding variant covers and prices.
adambot
Bruji Friend
Bruji Friend
Posts: 17
Joined: Mon Jun 04, 2007 9:31 pm

Post by adambot »

Conor - Do you have any examples of search plugins for the new 4.x apps?

thanks,
Adam
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Post by Nora »

You can download a sample plug-in from here. (At the moment the plug-in is set to look at our site and take out the version number and a screenshot.)

To use the new project and make it work you have to place a copy of Bookpedia.app where the plug-in is created because there is a script included that will automatically place the plug-in in Bookpedia.app and launch the program when you build the plug-in.
You want to place the program in both "Products/Debug/" and "Products/Release/" (you can find out the full path by doing 'get info' on the project file).
Once that's done, look for Executables on the left-hand side of the window and ctrl-click it to choose 'Add new'. Name the new executable Bookpedia and point it to your copy of Bookpedia in "Products/Debug/". Now you can use build and debug (command-y) to test your plug-in.
The great advantage of this is you can ctrl-click on the code and say 'add breakpoint' and the debugger will come up and stop the program at that point and you can step through each instruction and see the variables change.

Also this plug-in is old, so we don't use our own convenience methods but you will see them in the controller header that you can use the methods to pull out sections from strings instead of using the NSScanner:

NSString *aTitle = [results stringBetween:@"<title>" and:@"</title>"];
mattydee
Contributor
Contributor
Posts: 7
Joined: Wed Oct 17, 2007 10:37 pm

Post by mattydee »

i just wanted to reopen the discussion of a comics search plug-in. i don't know anything about coding, but i sure enjoy my pedias (books, games, dvds), and in the absence of a dedicated comics pedia, would love the option to customize bookpedia with plug-in.

if anyone is till working on this, i'd be glad to beta test it for you.

thanks!
Post Reply