![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 260
Karma: 4256
Join Date: Feb 2006
Device: SHARP Zaurus C1000
|
Is there a port of Sunrise to php?
Is there a port of Sunrise to php? If there is, then those with their own site can convert an ebook using their webserver.
This has the advantage of: 1. It can be a cron job so one's own pc is not occupied 2. It may be faster especially if grabbing html files is concerned 3. No messy installation on pc. Granted, the php file(s) had better be clean. So is there any existing port of sunrise to php already? ![]() |
![]() |
![]() |
#2 |
Evangelist
![]() ![]() ![]() Posts: 418
Karma: 281
Join Date: Jul 2004
Location: Canada
Device: Assorted older devices
|
I'm pretty certain it would be almost impossible to port Sunrise to PHP... Original Sunrise is Java based, and new Sunrise is... C/C++/C# I think (one of the three, I believe)? Also Sunrise XP is, according to what I've seen Laurens post, very dependant on XP's features.
I think your best bet is looking at either the Perl or Python Plucker parsers, and using those as a starting point for a CGI script. |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 260
Karma: 4256
Join Date: Feb 2006
Device: SHARP Zaurus C1000
|
ic ... thanks for the tip!
![]() |
![]() |
![]() |
#4 |
Fully Converged
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,175
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
I agree though it'd be nice if there was a Linux binary of a command line version of Sunrise. This could then be used with PHP to write some pretty impressive Sunrise-related Web applications. ;=)
|
![]() |
![]() |
#5 |
Jah Blessed
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
|
Funny, you should ask that. I am actually designing a web application right now for fetching news remotely. It's targeted at the new e-ink devices, as it supports PDF as its output format. Not sure if I'm going to put much effort into it. This is mainly an excercise for me to catch up with the latest Java Enterprise APIs, since it's been some time since I last worked with those.
|
![]() |
Advert | |
|
![]() |
#6 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 260
Karma: 4256
Join Date: Feb 2006
Device: SHARP Zaurus C1000
|
Yeap, having it in linux could make things pretty interesting and can be further expanded to grab sites and convert to plucker format or even pdf directly.
Laurens, you prob know and are using it already, php has some built-in libraries for pdf support http://www.php.net/manual/en/ref.pdf.php Alexander Turcic, I code in C/C++ natively but picked up php three years back and with the flexibility of php, it should port over nicely. Granted, if the current sunrise uses specific windows apis, then it may not be a simple port but may require other apis to be written. Maybe its time to take a look at porting sunrise to php ... or maybe just get perl based plucker ported to php? |
![]() |
![]() |
#7 |
Fully Converged
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,175
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
@Snappy: I think it'd be sufficient to offer a Linux C binary of Sunrise, which you could then call via any Web application such as Perl or PHP. iSilo already offers such as a command-line tool.
@Laurens: You rock! But are you sure you want to work in Java again? |
![]() |
![]() |
#8 |
Jah Blessed
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
|
Sunrise XP cannot be easily ported to cross-platform code. I already knew the Windows API, so that was the logical choice for this project. Cross-platform programming is not that easy in C++ and definitely more time-consuming. I think there is a cross-platform C++ parser in the Plucker CVS, you might want to look at that instead. I've never used it, though.
I've used PHP briefly, but didn't like it much. If you already know Java server-side programming (Servlets + JSP and related libs like Spring, Hibernate, etc.), then PHP is a huge step backwards. OTOH, PHP is a better choice if you don't know Java yet. |
![]() |
![]() |
#9 |
Fully Converged
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,175
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
Grin
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 10
Karma: 90
Join Date: Sep 2005
Device: Sony Clié SJ22
|
The Plucker C++ parser is here. Plucker CVS access is documented here.
It "works", but don't expect perfect conversions, and XHTML is not supported (shouldn't be that difficult to implement, at least for (very?) basic support, using the current HTML parsing code. I tried, but couldn't get the encoded characters to show up correctly. Note that I don't know C++, though ![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Which PHP version do you have? | erayd | Workshop | 2 | 10-04-2010 08:02 PM |
Calibre Command Line usage with PHP | artoros | Related Tools | 13 | 07-01-2010 09:57 AM |
Running ebook-convert from php | conryf | Calibre | 7 | 05-24-2010 05:24 AM |
Using PHP to convert PDFs | joedevon | 5 | 07-05-2009 10:50 PM | |
PHP 5 programming e-book available for free | Colin Dunstan | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 05-13-2005 11:43 AM |