|
|
View Full Version : Java RSS2Book?
sammykrupa 10-14-2006, 08:14 AM The RSS2Book thing looks great, but it's Windows only :(
I can hack a program out of Java, and I know a lot of other people here can too (if not better). So how about making a Java-based RSS2Book?
Before I start anything I am wondering what backends should be used for RSS parsing and PDF generating?
Here is what I found for PDF generating:
http://www.lowagie.com/iText/
And RSS parsing:
http://jakarta.apache.org/commons/sandbox/feedparser/
The jakarta RSS parser looks to be way overkill for what I'm looking for, though. Any other suggestions for something lighter weight?
Any thoughts on the PDF generator?
Anyone want to work on the Java RSS2Book another than me?
Thanks!
Sam Krupa
griffbrad 10-14-2006, 09:41 AM Earlier this week, I hacked up a tool that lets me download RSS feeds and the related articles, tweak various aspects of them (header, footer, logo, cover page, etc.), and uses HTMLDoc to convert the result HTML to a PDF sized for the sony reader.
I did this in Python with the goal of being able to manage news on my Linux box.
I'm considering extending these tools further and writing a PyGTK frontend to this tool and perhaps adding in Music/Photo management and a Project Gutenberg/Creative Commons book browser as well. Essentially, a cross-platform, open source Connect alternative.
The biggest problem, however, is the actual USB syncing to the Reader. I don't have much experience with USB hacking, so I'd need help on that part of the project.
Currently, I have to pop an SD card into my reader, sync up and then put it back in the reader.
Anyway, in short, I'm very interested in working on any project aimed at making cross platform use of these devices more practical, and while I don't work in Java uch, I'll certainly keep an eye on any project that pops up and hopefully will be contributing some Python-based projects in the near future.
Laurens 10-14-2006, 09:43 AM The iText library is excellent for generating PDF. I've written RSS/Atom parsing logic using the NekoHTML library, the code of which is available in the Sunrise project (http://sf.net/projects/sunrisexp). Contrary to what its name suggests, you can adapt NekoHTML to parse any tag-based format. The problem with RSS is that many feeds are ill-formed, so any strict XML parser will choke on them.
geekraver 10-14-2006, 04:56 PM Igor has already written Python code for much of the necessary USB plumbing. I'm willing to post my C# code for rss2book soon which may help kickstart Java apps; right now its a bit busted as I'm trying to incorporate USB access too.
sammykrupa 10-14-2006, 06:23 PM Hmm, thanks for the feedback. I will start an RSS2Book project in Java if I ever have some free time!
Sam Krpa
sammykrupa 10-16-2006, 06:16 AM Okay,
I have the basic RSS parser code setup, now I need an interface and I need to connect it to HTMLDoc.
I was wondering about comics on the Reader, anyone want to write a comics downloader?
Sam Krupa
Shake 12-13-2006, 03:16 PM Hi,
I am also very interested in such a nice piece of software. And maybe I can help you.
Do you have a public SVN/CVS server anywhere? A sourceforge project?
sammykrupa 12-13-2006, 04:03 PM Nothing like that is setup, but I can post the latest version of the code here if you want.
It is coming along nicely, almost caught up with geekraver's development of his RSS2Book, but some the code is very buggy (-:
Want to take a look?
kovidgoyal 12-13-2006, 09:31 PM @griffbrad http://libprs500.kovidgoyal.net
Shake 12-14-2006, 02:00 PM Hi,
yes - I would definitly like to take a look at the code.
sammykrupa 12-14-2006, 03:28 PM I am a beginner coder, so don't hurt my little spaghetti code!
The file included is a Java source (java 5) file that needs to be compiled. It is in a compressed zip file and the images used in the program are included.
It requires as a dependency:
http://informa.sourceforge.net/
and HTMLDoc must be installed. Only tested on Mac OS X 10.4 so far.
Any feedback from Java coders would be welcome (including new code!).
The code is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.
Have fun! :happy2: :happy2: :happy2:
UPDATE: Actually included file this time.
Shake 12-15-2006, 04:28 AM Thanks for posting. I have taken a short look at it. I hope I will find some time soon to make some improvements.
Just one comment to the license: I think Creative Commons licences should preferably used for documents or other data like pictures or music.
For programs I would prefer the GPL...
Any feedback from Java coders would be welcome (including new code!).
You might wish to think about seperating out the gui from the logic... Currently everything is one class which might be confusing when it becomes more complex...! :D
sammykrupa 12-15-2006, 01:47 PM Thanks for the info jaed and Shake! Question, does Java RSS2Book "work" fine for you guys on your systems? What OSs are you guys using?
Thanks!
Sam Krupa
Shake 12-15-2006, 05:29 PM I have set up a project a java.net. I selected GPL as license. May I use your work and release it under the GPL?
sammykrupa 12-15-2006, 05:34 PM If you would like, but I eventually want to start my own sourceforge-type project. When I do, would you be able to move the project to sourceforge?
Thanks!
Sam Krupa
Shake 12-16-2006, 06:39 AM It is not possible to switch a project from java.net to sourceforge. Of course the code can be copied without problems. But I think it is not very usefull to create two projects with the same idea at two different locations.
I started the project because you said there is no SVN server available but I think it is very usefull to synchronize the work. Of course I will add you as project administrator to the newly created on java.net.
If you prefer Sourceforge, I will be happy to join your project there. So it is your decision ;).
sammykrupa 12-16-2006, 08:56 AM Java.net is fine, I didn't realize that you had actually set the project uo!
What's the URL?
Thanks!
Sam Krupa
Thanks for the info jaed and Shake! Question, does Java RSS2Book "work" fine for you guys on your systems? What OSs are you guys using?
Will run it when I have minute... Big xmas shopping this w/e... I was mainly looking at it because I was interested in how you were glue-ing the pdf pages together when you weren't using a pdf library...
(And seeing how you did it with htmldoc gave me a handy idea of how to do glue linked pdfs together in a perl project or two...! :D )
sammykrupa 12-16-2006, 09:27 AM Well, I got the idea from geekraver's original RSS2Book, I just had to figure out how to re-implement it.
Sam Krupa
sammykrupa 12-16-2006, 11:27 AM STOP THE PRESSES!
I am running off the adrenaline of having just squashed every known bug in the Java RSS2Book source code! The content reformatter works, the absoluteing of links works, everything just works!
It just needs some final testing.
Just the source code included in this post, for everything else download the previously-posted zip file with everything else needed for running Java RSS2Book.
I think the next logical step is to build something like a library interface that can store all kinds of books for the Reader.
Sam Krupa
kovidgoyal 12-16-2006, 11:37 AM I'm already working on a GUI for the reader that includes a library.
http://libprs500.kovidgoyal.net
Shake 12-16-2006, 01:08 PM The url is:
https://rss2book.dev.java.net/
But the project has not been aproved yet. So I think it is not visible for everyone at the moment. Could you tell me your java.net username? Then I may add you to the project.
I will add your code to the SVN repository, so everybody may get it from there.
sammykrupa 12-16-2006, 01:18 PM My java.net username is the same as my mobileread username, sammykrupa.
Shake 12-16-2006, 01:33 PM sammy: I have added your version to the trunk. I will do my work in the branch called "mavenbased".
Shake 12-16-2006, 01:40 PM I don't know how I can add you to the project. Can you request that I join you?
sammykrupa 12-16-2006, 01:41 PM Shake, when I login to my java.net account and try to access the RSS2Book project, it tells me that I don't have permissions.
Also, I really think a site should be started just devoted towards RSS2Book! I really think that the current idea of RSS2Book has really already been reached and a complete Connect replacement should be made, like what kovidgoyal is doing.
Sam Krupa
EDIT: Posted before I saw your last post, shake.
sammykrupa 12-16-2006, 01:47 PM Shake, the page I get when trying to access the project simply says:
Your account does not have the "Project Page - View" permission needed for you to access the page you requested in the rss2book project (view your permissions). Either ask the project administrator for more permission, or log in using a different account.
Not sure what to do after that (-:
Thanks for setting all of this up so far!
Sam Krupa
Shake 12-16-2006, 04:21 PM Yes of course, I would like a complete Connect replacement.
But it is important to keep everything as modular as possible. So I suggest we should try to create several small modules that are as independent as possible.
I think a Connect replacement might use then several modules an provide one GUI for them.
The work kovidgoyal is doing might be extended to use those modules...
sammykrupa 12-16-2006, 04:27 PM Shake, yes, that seems like the way to go about it.
I am quite horrible with GUIs unfortunately, you?
Regarding a project site, should I setup a sf.net project and invite you as an administrator?
Sam Krupa
Shake 12-17-2006, 06:36 AM Just wait a few days until the java-net-project has been approved. Then it will be possible to join it.
Shake 12-18-2006, 03:41 AM .....
sammykrupa 12-18-2006, 06:16 AM Something I need to say, shake? (-:
Shake 12-18-2006, 08:32 AM Sorry, I have made a mistake and was not able to delete my post :)
Shake 01-03-2007, 01:12 PM finally they approved the project. So I will add you as project manager (think you must request it first).
sammykrupa 01-03-2007, 01:15 PM Okay shake (-:
|