RE: [Openberg-devel] Glad to join the development of OPENBERG
Status: Beta
Brought to you by:
yoric
From: David T. <Dav...@en...> - 2005-07-31 19:40:49
|
For the C++ code, I'd suggest using the content of obError.h. That is, mostly, macros OB_MSG and OB_PRINT_MSG -- and the documentation regarding how to read that output. For the JS code, there is a function dump() defined in openberg_ui.js, which should help you. To make development easier, you should also configure your shell variable PROFILE_DIRECTORY to point to your Firefox profile directory (mine is=20 /home/yoric/.mozilla/firefox/slwkd2tx.ob/ ), so as to be able to use make update instead of having to reinstall OpenBerg after each modification. Cheers, David Le dimanche 31 juillet 2005 =C3=A0 04:33 -0400, yuefeit a =C3=A9crit : > Hi David, >=20 > This is Yuefei. >=20 > Thank you for your advice. >=20 > I have been trying to trace the code. I searched the mozilla's website ho= ping=20 > to find some prompt service such that I could use some prompt or popup bo= xes=20 > but it seems that mozilla only provides nsIPromptService which is a virtu= al=20 > class and I have to implement my own. >=20 > Then I added some code in openberg_init() and obBookLibrarian's=20 > GetBookFromURI(), which just simply writes some info into a logfile. But=20 > unfortunately after I recompiled, reinstall and reopen a book. Nothing wa= s=20 > writted to that logfile. My code which writes some info into a logfile do= esn't=20 > seem to be wrong, if it were not wrong, it should write some info into th= at=20 > file because I guess when I opened a book , open_init and GetBookFromURI = were=20 > supposed to be called. >=20 > Could you give me some advice on this or some better means of tracing the= C++=20 > code? >=20 > Thank you very much! >=20 > Yuefei >=20 > >=3D=3D=3D=3D=3D Original Message From ope...@li...urceforge.n= et =3D=3D=3D=3D=3D > >Le mercredi 27 juillet 2005 =C3=83 12:27 -0400, yuefeit a =C3=83=C2=A9c= rit : > >> Hi David, > >> > >> This is Yuefei. > >> I have read related descriptions about the Gutenberg books and downloa= ded=20 > its > >> code as well. > >> > >> Currently, when a user launches the openberg and tries to open a book,= he=20 > has > >> three choices: > >> from a file, from the net and from the library. From my understanding = what=20 > I > >> need to do is to add a filter such that when the user wants to open a > >> Gutenberg (e.g. xxx.txt) from anyone of the three sources and the filt= er=20 > would > >> convert the book (xxx.txt) to the html format (xxx.html) and present i= t. > >> This filter can be a subclass derived from BookWithCache. > >> Is that right? > > > >That's the way I see it, too. > >To provide the filter, I see three possibilities : > >* implement everything from scratch > >* embed the existing GutenMark [1] filter inside an obBookWithCache > >subclass > >* somehow detect whether he user has GutenMark already installed on the > >system and use it behind the curtain to provide conversion > > > > > >> I have some questions: > >> 1) do you have some model like OOA or OOD model which gives more infor= =20 > about > >> how each module interacts with one another and how their methods are=20 > called, > >> besides the outline diagram on the web? > > > >I'm afraid I don't. > > > >> 2) for the scenario for opening a book if the Gutenberg filter were to= be > >> implemented, I guess it might be like this: when a user opens a book, = if=20 > the > >> extension is "opf", its related methods would be called, which have be= en > >> implemented, if the extension is "txt", the Gutenberg filter would be=20 > called, > >> it then would analyze whether the file matches the Gutenberg format, i= f it > >> does, the filter would continue, otherwise it would show some err mess= ages.=20 > Am > >> I right? > > > >OpenBerg uses mime types to determine which filter to use for a book. > >That's done in obIBookLibrarian (for the instanciation) and openberg.cpp > >(for the registration of book filters). > > > >Let's call the filter obBookGutenberg for now. obBookGutenberg should be > >registered for "text/plain". Once instanciated with a "text/plain" URI, > >it should proceed as you say. > > > >In a future version, it might be interesting to add some kind of > >fallback mechanism, to allow it to use, say, obBookInADirectory if it > >turns out that this is actually a mityped xml file. > > > > > >> Thank you very much > >> > >> Yuefei > > > >Thank you, > > David > > > >[1] http://www.sandroid.org/GutenMark/ > > > >-- > >Read, Write, and Publish Standard eBooks > > Free, Open Software, Open Standards and multi-platform > > The OpenBerg project http://www.openberg.org > > > > > > > >------------------------------------------------------- > >SF.Net email is Sponsored by the Better Software Conference & EXPO Septe= mber > >19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & = QA > >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5s= f > >_______________________________________________ > >Openberg-devel mailing list > >Ope...@li... > >https://lists.sourceforge.net/lists/listinfo/openberg-devel >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > _______________________________________________ > Openberg-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openberg-devel --=20 Read, Write, and Publish Standard eBooks Free, Open Software, Open Standards and multi-platform The OpenBerg project http://www.openberg.org |