Hi all,
It would be cool if Plucker show images inverted if backlight is on, for
those old good Palm IIIx devices (16-grayscaled). The text reads easier with
default backlight (light symbols on dark background), but images get
inverted. So, if it's not too hard, may be that feature come to the next
release? (It's for Palm OS viewer, to be defined).
There's also a small bug in Python parser release 1.8, the --filter option
is not recognized as valid. The following patch fixes it and makes filter
command work without tmpfiles. Works fine on my system (Cyrix 6x86MX machine
running W2K SP4 (5.00.2195) with Python saying "Python 2.3.4 (#53, May 25
2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32"), hope it would so on
others.
P.S. Why are --filter switch and filter param of plucker.ini not mentioned
in docs?
P.P.S. PIL works fine with Windows also, and it's free - maybe it worth
mention in REQUIREMENTS file too.
=== Spider.diff begin ===
--- Spider.py.orig 2004-05-19 11:18:20.000000000 +0300
+++ Spider.py 2004-08-31 01:52:46.925315200 +0300
@@ -40,7 +40,7 @@
from PyPlucker.Url import URL
from PyPlucker.AliasList import AliasList
from PyPlucker.UtilFns import message, error, show_exception
-import os, string, sys, types, re
+import os, string, sys, types, re, thread
VALID_LINK_ATTRIBUTES = (
@@ -803,19 +803,14 @@
filter = self._config.get_string ('filter')
if filter is not None:
try:
- tmpfile = tempfile.mktemp()
- f = open(tmpfile, "wb")
- f.write(document)
- f.close()
-
- command = filter + " " + tmpfile
- pipe = os.popen(command)
- document = pipe.read()
- pipe.close()
-
- finally:
- try: os.unlink(tmpfile)
- except: pass
+ pipe_w, pipe_r = os.popen2(filter, "b")
+ thread.start_new_thread(pipe_writer, (pipe_w,
document))
+ document = pipe_r.read()
+ pipe_r.close()
+
+ except:
+ message("Exception while running filter: ")
+ show_exception()
# OK, it's fair game, so we parse it
try:
@@ -953,7 +948,11 @@
def encountered_fatal_error (self):
return self._fatal_error
-
+# Thread function to write pipe data
+def pipe_writer(f, s):
+ f.write(s)
+ f.close()
+ return 0
def execute_commands (item_name, config):
verbosity = config.get_int ('verbosity', 1)
@@ -1395,7 +1394,7 @@
"status-file=", "version",
"tables", "depth-first",
"http-proxy=",
"http-proxy-user=",
"http-proxy-pass=",
- "fragments=", "creator-id=",
+ "fragments=", "creator-id=",
"filter=",
"bookmarks="])
if args:
# usage ("Only options are allowed as arguments.")
=== Spider.diff end ===
--
Best regards.
_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev