View Full Version : iSiloXC wrapper script
nicholas
03-03-2004, 01:29 PM
Here's a copy of a python script to make iSiloXC easier to use. Once it's setup up, just do
web2isilo http://www.site.com/page.html
To put it onto your palm! It can work with jpilot to automate the full installation.
I only wrote this one today, after I upgraded to iSilo 4 to better manage my T3 screen. My previous one didn't understand XML, but this one does it a bit better.
Maybe I shouldn't use a base ixl file and generate one from scratch, but for now I load in a template and adjust it's DOM.
That lets me set some 'defaults' by editing the template it loads in.
You'll have to edit the top of the script, and rename it too (both files!).
This script is GPL :-)
algal
11-29-2005, 02:40 PM
Hello all,
I downloaded nicholas's wrapper script and made some changes to it.
I removed the hardcoded dependency on the separate template file, on the special directory for iSiloXC, the special directory for receiving the pdb file, and the special directory for temporary files. I added documentation and a basic usage printout.
To run it now, you only need to have iSiloXC in your path and the PyXML package installed. You do
web2islo http://myurl.com
and it will leave the pdb in the directory you ran it from.
On the other hand, I removed the option for automatically installing to a special Windows directory running under WINE under linux, so if you were in love with that, sorry.
p.s. hmm, having a hard time uploading the attachment. well let me know if anyone wants it and I'll tray again later
nicholas
11-30-2005, 01:50 AM
I'd like to try it :-)
The only valid extensions for attachments are: bmp doc gif jpe jpeg jpg pdf png psd txt zip, so if that is the trouble rename to .txt.
Nick
algal
11-30-2005, 02:58 AM
Ok, here's another try at uploading this thing.
nicholas, I hope you don't mind the changes I made. I was just looking for a very generic wrapper script that I could just drop in without configuration and use for file conversions. It occurred to me some others might want that too, so that's what I made this into.
I have ideas for one or two features I might add. If I get around to them I'll post them here too.
alexis
p.s. This works on OSX, and should work on winxp too afaik, so maybe we should crossreference this to those forums as well.
mithras86
11-28-2006, 02:45 PM
Ok, a little bump, but I can't get it to work. I use a Palm Tungsten T and sync with gpilot-install-file:
jurian@karlijn:~/Desktop$ ./web2silo.py test.pdf
Links are:
+ test.pdf
Fetching test.pdf to find a title...
Document is a local file
test.pdf
Options are:
Preparing test.pdf (test.pdf)
Calling iSiloXC
Document list filename: [/tmp/tmpOJWQ3X.idx]
Option flags: verbose
Read 1 entries from the document list.
Document 1 of 1: test.pdf
Step 1 of 4: Retrieve sources
file:///home/jurian/Desktop/test.pdf
Step 2 of 4: Resolve links
Step 3 of 4: Convert to destination format
Compressing text...
Generating formatting information...
Compressing text...
Converting images...
Generating formatting information...
Writing destination file...
4,0K /home/jurian/Desktop/test_pdf.pdb
jurian@karlijn:~/Desktop$ gpilot-install-file test_pdf.pdb
gpilotd-Message: Activating object OAFIID:GNOME_Pilot_Daemon
fileconduit-Message: Jurian Palm completed 1447012801
jurian@karlijn:~/Desktop$After syncing, MobiReader doesn't recognize the file :confused:
I see a file test.pdf listed in my Palm, and I can delete this file. What should I do?
algal
03-02-2007, 10:07 AM
Ok, a little bump, but I can't get it to work. I use a Palm Tungsten T and sync with gpilot-install-file:
[code]jurian@karlijn:~/Desktop$ ./web2silo.py test.pdf
Hi mithras,
You're trying to convert a pdf file with iSiloXC.
I've never done that. In fact, i thought iSilo was only good for text files, html files, and graphics.
I've only used the script on URLs pointing to HTML files. You might try passing test.pdf as a URL pointing to a local file, as in file:///home/username/Desktop/test.pdf. Just a thought.
ubuntuuser
07-05-2008, 01:12 AM
Both scripts - the original and the one from algal - don't work on Ubuntu 8.04. It says:
ubuntu@Linux:/usr/local/bin$ web2isilo http://www.test.de
Traceback (most recent call last):
File "/usr/local/bin/web2isilo", line 32, in <module>
from xml.dom.ext.reader import Sax2
ImportError: No module named ext.reader
Python-xml is installed.
Any ideas?
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.