VoodooPad

Discussion corner for Developers of Serendipity.
Post Reply
TimothyP
Regular
Posts: 13
Joined: Fri Apr 01, 2005 12:29 pm
Location: UK
Contact:

VoodooPad

Post by TimothyP »

I use the mac software voodoopad to maintain a desktop Wiki style database of my reading/notes at work. It can publish itself as a set of interlinking html files. What I was wondering was, would it be possible to browse this structure as serendipity entries?

Any ideas what the best approach would be to easily integrate it with my serendipity blog ? I'd like it to take on the same format as entries, in the same way the static page plugin does..

Cheers for now, any help appreciated

Tim
Tim Putnam
Between the devil and the deep blue sea
http://deepbluesea.fracsoft.com/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: VoodooPad

Post by garvinhicking »

Basically that wouldn't be too hard.

You will need an importer PHP code that you write yourself. That should parse your desktop HTML files and insert the content either as a staticpage entry (into the table "serendipity_staticpages") or you could insert it as a serendipity entry. You can use the serendipity framework by including "serendipity_config.inc.php" and use the updertEntry() function found in include/functions_entries.inc.php to create an entry. For examples look at our Blog-Importers in include/admin/importers/ to see how we use the updertEntry() function there.

By "parsing" I mean, strip out the content only, and maybe replace the internal links to each other with proper links to your staticpages/entries. If you use staticpages it would be easy. Say you have the files "note1.html", "fullnote.html" and "mynote.html".

You could insert them as staticpages with the title "fullnote", "note1" and "mynote" and replace every occuring link inside those files with "note1.html" => "index.php?serendipity[subpage]=note1" and so on.

I hope that helps you for a general direction?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
TimothyP
Regular
Posts: 13
Joined: Fri Apr 01, 2005 12:29 pm
Location: UK
Contact:

Nice!

Post by TimothyP »

I especially like the sound of importing to static pages, going to give it a crack. Thanks for the invaluable advice.
Tim Putnam
Between the devil and the deep blue sea
http://deepbluesea.fracsoft.com/
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

TimothyP went on to implement the plugin and reports of it's implementation here - http://fracsoft.com/serendipity/index.p ... ki-manager
gw
Post Reply