Re: [sugar] eBook ideas



On Fri, 2007-03-30 at 21:24 -0700, Don Hopkins wrote:
> I didn't realize evince was usable as a library integrated with Python 
> -- that's great!

Well, that's pretty much of hack right now. (custom patches over evince
svn). The plan was to merge it back upstream, which does not look too
difficult.

> I wasn't able to find the evince module in the sugar source tree, but 
> I'm not completely up to date.

http://dev.laptop.org/git.do?p=projects/evince-olpc;a=summary

It's in the "embedding" branch.

> I'm using SWIG because I'm familiar with it, but I haven't figured out 
> the glib python wrapping stuff yet.
> If glib wrappers would "just work" without much more work, then it 
> sounds like that would be worth doing.
> Is there a simple project that uses glib python bindings, that I can use 
> as an example?

http://dev.laptop.org/git.do?p=projects/poppler-python;a=summary

I had setup a basic poppler-python module for you at some point... The
build stuff should work, if it doesn't let me know. poppler.defs and
poppler.override is what would need to work to properly wrap the glib
API.

> Where's can I find some more documentation about glib python wrappers?
> 

Unfortunately I don't think there is recent documentation. Still this is
probably useful to get an idea (parts of it are probably obsolete):

http://www-128.ibm.com/developerworks/linux/library/l-wrap/

Usually I just figure out stuff looking at pygtk.

> I haven't packaged it up and put it into a repository yet, but that's 
> high on my todo list.
> I have my own svn server that I can publish the code on, but I'd be glad 
> to check them into the official repository, once they projects configure 
> nicely and don't break anything.

I think it would be good to host these on dev.laptop.org, I'm not sure
you want to be inflicted the git learning pain though ;)

> It's factored into two projects: the python poppler module and the sugar 
> ebook activity.
> The poppler module shouldn't effect xbook, but we should figure out 
> whether it's best for me to integrate the work I'm doing for the 
> Internet Archive with the existing xbook activity, or make a separate 
> activity for now (based on xbook), and merge them later (or not).
> 

I'm a little confused about what you mean with "ebook" here. Are you
talking about a specific format or about the ebook activity which is
planned to be shipped by default on the laptop, and that should be able
to handle multiple formats (pdf, crossmark etc)?

xbook is now Read which is also the user visible name of what we used to
call ebook activity.

> I'm going to be adding some Internet Archive library browsing, searching 
> and ebook downloading functionality, using RSS feeds.
> Since search results are returned as RSS: Do you think I should I try to 
> use penguintv to browse RSS feeds of book search results? Run it as a 
> separate activity that switches back to the ebook reader when you click 
> on a link to a pdf file? Or would it be easier (and better integrated) 
> to embed the rss reader in the ebook interface? Is there a way to 
> register the ebook reader activity as the handler of the pdf content 
> type, so both the web browser and rss reader will switch to it to read 
> PDF files?
> 

I'm going to send a separate mail about this to involve design and
content people.

> Now that we can read SVG as well as PDF (and PNG of course) and render 
> it with Cairo, it would be nice to have a generic high-level 
> media-type-independent interface, like a resource manager, that knows 
> how to load, measure and render icons (or pages), and deal with caching.
> 
> I ran across something like that, IconCache in sugar.graphics.canvasicon 
> module, but currently it only knows about svg files.
> 
> IconCache could be refactored and extended into a resource manager that 
> supports any kind of image, and optionally support caching scaled 
> bitmaps as well as direct Cairo rendering. It could support icons with 
> multiple frames (for pdf document pages, animated gif frames, etc), and 
> application could tell it how aggressively to cache bitmaps and data 
> structures in memory (or turn off caching so it always reads the file 
> from disk). The operating system should notify applications when memory 
> or disk space is low, and the resource manager can flush its caches as 
> appropriate.

Yep, I think this is a pretty good idea.

Marco




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]