Re: Plucker server on Project Gutenberg

2005-11-05 Thread Marcello Perathoner

The first experimental PG plucker server is up.

Find the no. of the ebook you want and then call this url:

  http://www.gutenberg.org/cache/plucker/17000.plucker

replace 17000 with your ebook no.


This will build the file, if not existent. That may take some time when 
the servers are busy. The second download should come much faster out of 
the cache.


If something awful happens, like no suitable source file was found, you 
should get an error page.


The source file will be HTML if available, else TXT. TXT files are 
parsed by a custom gutenberg parser, which works well enough on modern 
files but gets worse when applied to older ones.




BTW, what is the preferred mime-type for plucker ?



--
Marcello Perathoner
[EMAIL PROTECTED]

___
plucker-dev mailing list
plucker-dev@rubberchicken.org
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev


Plucker server on Project Gutenberg

2005-11-02 Thread Marcello Perathoner
I'm the webmaster of Project Gutenberg and I'm about to install the 
plucker distiller on the PG website. The idea is to have people download 
a ready-made plucker pdb instead of requiring them to run the distiller 
on the appropriate ebook file.


I'm going to replace the text/plain parser with a custom one that will 
(try to) parse chapter heads, italics etc. out of the plain text.


I encountered a couple of problems doing that. I'll send some more mails 
to describe them.



--
Marcello Perathoner
[EMAIL PROTECTED]

___
plucker-dev mailing list
plucker-dev@rubberchicken.org
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev


Why are bookmarks sorted?

2005-11-02 Thread Marcello Perathoner

I'm writing a custom text/plain parser.

I'm parsing a text file and as I go along I add all chapter heads to the 
bookmark list using:


  PluckerDocs.PluckerTextDocument.add_bookmark

When I look at the plucker database all bookmarks are sorted by title:

  Appendix A
  Appendix B
  Chapter 1
  Chapter 10
  Chapter 2
  ...

I'm wondering why bookmarks have to be sorted? Is there any reason to do 
that?


The code that does this is in:

  PluckerDocs.PluckerBookmarkDocument.dump_record




--
Marcello Perathoner
[EMAIL PROTECTED]

___
plucker-dev mailing list
plucker-dev@rubberchicken.org
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev


Re: Plucker server on Project Gutenberg

2005-11-02 Thread Marcello Perathoner

Alexander R. Pruss wrote:

That's a wonderful idea.  Are you going to be caching the pdbs, or will 
it be fast enough to generate on demand?


I'll have to cache them.


Are you going to be making the docs split into 32K pages, or will you 
use the continuation flag to make each doc look like a single page (this 
requires Plucker viewer 1.6)?


I use seamless and zlib. But if users request alternate formats, I may 
consider adding them, like images / no images, etc.




--
Marcello Perathoner
[EMAIL PROTECTED]

___
plucker-dev mailing list
plucker-dev@rubberchicken.org
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev


Re: Plucker server on Project Gutenberg

2005-11-02 Thread Marcello Perathoner

David A. Desrosiers wrote:

I'm going to replace the text/plain parser with a custom one that will 
(try to) parse chapter heads, italics etc. out of the plain text.


I'd be interested to see how you solve the context issue that has 
been brought up on the pg lists over the last year or so. Its a very 
complicated issue, and to date, nobody has solved it without trying to 
reinvent the base PG text format into something different.


I have the option of doing:

  pgtext  filter | PyPlucker  pdb

or

  to write a custom parser for PyPlucker.


The PG format has changed a lot over 30+ years. None of the 3rd-party 
tools I know is able to correctly parse all PG texts.


The custom text/plain parser I'm writing will plug into PyPlucker and do 
a very simple analysis of the text. I'm not aiming at a 100% or even 99% 
solution. I'm just trying to make the average PG text look good enough 
for distribution.





--
Marcello Perathoner
[EMAIL PROTECTED]

___
plucker-dev mailing list
plucker-dev@rubberchicken.org
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev


Re: Plucker server on Project Gutenberg

2005-11-02 Thread Marcello Perathoner

Lambert, Mark wrote:


I don't know if this would help or not, but I always go off the HTML
version and break on any H1 or H2.  That isn't perfect either, but is
easier to do. 


Not all PG ebooks have an HTML version.


--
Marcello Perathoner
[EMAIL PROTECTED]

___
plucker-dev mailing list
plucker-dev@rubberchicken.org
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev


Re: Plucker server on Project Gutenberg

2005-11-02 Thread Marcello Perathoner

Lambert, Mark wrote:


But it is low-hanging fruit that would make it simpler for those that
have HTML.


If they have HTML, of course I use HTML. But more than half of them don't.



--
Marcello Perathoner
[EMAIL PROTECTED]

___
plucker-dev mailing list
plucker-dev@rubberchicken.org
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev