Jump to content

Plucker Trick For Paperless Caching


TresOkies

Recommended Posts

Here is a trick for those of you who use Plucker to put cache data on your Palm. It doesn't require being a programmer, but you do need to be comfortable tweaking things.

 

I won't editorialize but I don't care for background images on cache pages and I want to remove them from my Plucker pages. I still want regular inline images. If you would like to remove background images from your Plucker pages, try the following steps. Keep in mind that I'm not a Python programmer. In fact, this was the first time I've ever opened a Python file, but it wasn't overly difficult to decode.

  1. Make sure you are using Plucker 1.6.
  2. Make a backup of the file named TextParser.py in case things go badly.
  3. Open the file named TextParser.py using whatever text editor you wish to use. On Windows, this file is probably in C:\Program Files\Plucker\parser\python\PyPlucker.
  4. Go to line 1308 (or thereabout). About 2/3 of the way into the file. Look for 'def start_body'.
  5. Make the lines look like those below. My additions are the two lines between the words '# HERE'
  6. Save the file.
  7. Run Plucker Desktop and update your cache channel(s).

def start_body (self, attributes):
   attributes = _list_to_dict (attributes)

   # Place the rgb value of <body>'s 'link' into our global variable for coloring anchors
   if attributes.has_key ('link'):
       rgb = string.lower (attributes['link'])
       self._anchor_forecolor = rgb
           
   # HERE
   if attributes.has_key ('background'):
       del attributes['background']
   # HERE
 
   # Append rgb value of <body>'s 'text' into our regular forecolor stack.

 

I make no warranties that this code is correct, but it seems to work for me.

 

Enjoy

 

-E

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...