Vaclav Slavik | 1 Apr 2004 10:28
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

Kevin Ollivier wrote:
> When users finish creating their EClass, they can distribute it on
> CD-ROM or publish it to web. (Or make a PDF too, actually.) For CD
...
> ;-), and people also would like to have highlighted search results.
> Enter Documancer. =) 

It's funny to see people use it for things it was never intended to 
do ;) Not that I mind, of course. 

> Furthermore, what would be nice is if 
> Documancer could remember CD-based books in the book manager, and
> when such a book was selected, it would prompt something like
> "Please insert the CD-ROM for book X to load this book."
>
> Here is what I suggest as a solution to these issues:
>
> 1) Have Documancer's wxConfig write a Version key upon startup.
> This way I can check to see if Documancer is of a high enough
> version to support what we're doing.

I don't want to do this -- what if you use two versions? They'd keep 
fighting over the value. And if the user didn't run Documancer yet, 
there would be no ~/.documancer/config.ini and thus no version info. 

OTOH, being able to run "documancer --version" would be useful (done 
in CVS). And maybe a registry entry on Windows with path to installed 
Documancer, as (HKLM or HKCU)\Software\V.S.
(Continue reading)

Kevin Ollivier | 1 Apr 2004 19:03
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

On Apr 1, 2004, at 12:28 AM, Vaclav Slavik wrote:

[snip]

>
>> Furthermore, what would be nice is if
>> Documancer could remember CD-based books in the book manager, and
>> when such a book was selected, it would prompt something like
>> "Please insert the CD-ROM for book X to load this book."
>>
>> Here is what I suggest as a solution to these issues:
>>
>> 1) Have Documancer's wxConfig write a Version key upon startup.
>> This way I can check to see if Documancer is of a high enough
>> version to support what we're doing.
>
> I don't want to do this -- what if you use two versions? They'd keep
> fighting over the value. And if the user didn't run Documancer yet,
> there would be no ~/.documancer/config.ini and thus no version info.
>
> OTOH, being able to run "documancer --version" would be useful (done
> in CVS). And maybe a registry entry on Windows with path to installed
> Documancer, as (HKLM or HKCU)\Software\V.S.
> \Documancer\${version}\path. Would that suffice? You can look into
> HKLM\Software\V.S.\Documancer (and if it doesn't exist, HKLM) to see
> all (typically, 1) version numbers under it.

Sure, this is what I'm looking for. =)
(Continue reading)

Vaclav Slavik | 5 Apr 2004 00:22
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

Kevin Ollivier wrote:
> I know this is easy enough to do on Unix, but on Windows with their
> drive system, any drive could be removable storage, or could be a
> permanent storage drive. 

I thought it's the other way around -- virtually impossible on Unix 
and piece of cake on Windows. This MSDN page seems to confirm at 
least the Windows part of my claim:
http://msdn.microsoft.com/library/en-us/fileio/base/getdrivetype.asp

Regards,
Vaclav

--

-- 
PGP key: 0x465264C9, available from http://pgp.mit.edu/

Kevin Ollivier | 5 Apr 2004 17:14
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

On Apr 4, 2004, at 3:22 PM, Vaclav Slavik wrote:

> Hi,
>
> Kevin Ollivier wrote:
>> I know this is easy enough to do on Unix, but on Windows with their
>> drive system, any drive could be removable storage, or could be a
>> permanent storage drive.
>
> I thought it's the other way around -- virtually impossible on Unix
> and piece of cake on Windows. This MSDN page seems to confirm at
> least the Windows part of my claim:
> http://msdn.microsoft.com/library/en-us/fileio/base/getdrivetype.asp

You're right, thanks. I found this is the Python win32 module too. =) I 
thought that with Unix usually the mount point would say CD or CD-ROM. 
Of course, it's still guessing, but that's what I was thinking about 
when I said Unix was easy enough. ;-)

Thanks,

Kevin

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
(Continue reading)

Kevin Ollivier | 7 Apr 2004 18:40
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi Vaclav,

In regards to the ".book" format, I just thought of a simpler solution 
that meets my needs. =) Just update the book loading code to try and 
guess the content format (i.e. if it has extension .html or .htm, it's 
probably HTML. =) and load the file. It will also check for a fulltext 
index, and if it exists, automatically turn on indexing.

Then, make it so that this book loading code is run whenever a file is 
passed in from the command line, which will give me the CD loading 
behavior I need. I'll also write code so that it will work when a file 
is dropped on it on Mac. (BTW, if the format can't be guessed, it will 
prompt the user to choose. But for things like ".htm" or ".html", I 
think it's quite reasonable to assume its HTML. =) I can probably also 
do a little trick with Resource Files on Mac to ensure that the 
index.html file for my EClass is associated directly with Documancer.

If you're fine with this, I'll go ahead and write the code for it and 
submit a patch. Also, I see you added in the version checking code as 
well. Thanks!

Kevin

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
Kevin Ollivier | 7 Apr 2004 22:50
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

I'm working on this and I've actually got it loading books. Nothing too 
special, but if I give it a filename and a book name, I can load the 
book into Documancer. However, since I have my own SWISH-E index file, 
I'd like to use it instead of the one that Documancer uses by default. 
Do you mind if I add an 'indexdir' preference, which uses its value for 
getIndexDir() if set, if not it just reverts to the default behavior.

Let me know what you think, or if you've got any other ideas on how to 
solve this. =)

Thanks,

Kevin

On Apr 7, 2004, at 9:40 AM, Kevin Ollivier wrote:

> Hi Vaclav,
>
> In regards to the ".book" format, I just thought of a simpler solution 
> that meets my needs. =) Just update the book loading code to try and 
> guess the content format (i.e. if it has extension .html or .htm, it's 
> probably HTML. =) and load the file. It will also check for a fulltext 
> index, and if it exists, automatically turn on indexing.
>
> Then, make it so that this book loading code is run whenever a file is 
> passed in from the command line, which will give me the CD loading 
> behavior I need. I'll also write code so that it will work when a file 
> is dropped on it on Mac. (BTW, if the format can't be guessed, it will 
(Continue reading)

Vaclav Slavik | 11 Apr 2004 00:36
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

Kevin Ollivier wrote:
> I'm working on this and I've actually got it loading books. Nothing
> too special, but if I give it a filename and a book name, 

The name can be guessed from HTML file...

> I can 
> load the book into Documancer. However, since I have my own SWISH-E
> index file, I'd like to use it instead of the one that Documancer
> uses by default. Do you mind if I add an 'indexdir' preference,

It's already there, called "cachedir".

I still can't make up my mind on whether to use .book files or not, 
but it would be better to use them than to pass book definition on 
command line (at least that's how I understand your proposal).

Regards,
Vaclav

--

-- 
PGP key: 0x465264C9, available from http://pgp.mit.edu/
Vaclav Slavik | 11 Apr 2004 00:27
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

Kevin Ollivier wrote:
> In regards to the ".book" format, I just thought of a simpler
> solution that meets my needs. =) Just update the book loading code
> to try and guess the content format (i.e. if it has extension .html
> or .htm, it's probably HTML. =) and load the file. It will also
> check for a fulltext index, and if it exists, automatically turn on
> indexing.

It can't -- the index is managed by Documancer, so there's no such 
thing as already existing index (how would it determine its 
location?).

VS

--

-- 
PGP key: 0x465264C9, available from http://pgp.mit.edu/
Kevin Ollivier | 11 Apr 2004 00:59
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi Vaclav,

On Apr 10, 2004, at 3:27 PM, Vaclav Slavik wrote:

> Hi,
>
> Kevin Ollivier wrote:
>> In regards to the ".book" format, I just thought of a simpler
>> solution that meets my needs. =) Just update the book loading code
>> to try and guess the content format (i.e. if it has extension .html
>> or .htm, it's probably HTML. =) and load the file. It will also
>> check for a fulltext index, and if it exists, automatically turn on
>> indexing.
>
> It can't -- the index is managed by Documancer, so there's no such
> thing as already existing index (how would it determine its
> location?).

In the case of a user loading an EClass into Documancer, there may be 
an existing index file which was created by EClass. (EClass uses 
SWISH-E indexing for full text search on CD, and eventually web too.) I 
was hoping that I could make use of the existing index file instead of 
having Documancer re-create the index file. In the case of EClass, the 
index file is in the root directory of the EClass (usually the CD root 
dir), so Documancer could see if there is an index file there, and if 
so, use it.

Thanks,

Kevin
(Continue reading)

Kevin Ollivier | 11 Apr 2004 01:08
Picon
Favicon

Re: [documancer] Using Documancer for HTML books on CD

Hi,

On Apr 10, 2004, at 3:36 PM, Vaclav Slavik wrote:

> Hi,
>
> Kevin Ollivier wrote:
>> I'm working on this and I've actually got it loading books. Nothing
>> too special, but if I give it a filename and a book name,
>
> The name can be guessed from HTML file...

Yeah, I just haven't gotten that far yet. =)

>> I can
>> load the book into Documancer. However, since I have my own SWISH-E
>> index file, I'd like to use it instead of the one that Documancer
>> uses by default. Do you mind if I add an 'indexdir' preference,
>
> It's already there, called "cachedir".

See my other reply as to why I'd like to check for an existing index. 
Basically the issue is that EClass also creates a SWISH-E index file 
when exporting to CD.

> I still can't make up my mind on whether to use .book files or not,
> but it would be better to use them than to pass book definition on
> command line (at least that's how I understand your proposal).

Yes, that's correct. If that's fine with you then, I can go ahead and 
(Continue reading)


Gmane