03-05-2014, 02:59 PM | #16 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You are wanting a Word document displayed in a web page, the way Sigil displays cut and pasted text out of a Word Document in its bookview window.
A quite tall order as I understand it unless you just want the actual words and no styling. Any browser will display plain text. But the styling of Word and web pages is about 180 degrees out, as I understand it. If you could do with an image, I can think of a general idea of how that might be possible, but without any details to back it up. Printing to PDF is very easy, then displaying the pdf is not hard. Maybe that is a direction to consider. This is tending toward that holy grail of no-fuss conversion of Word to epub, a subject which has the ceaseless attention of Hitch and many others. Like the holy grail, the actual finding of it is difficult, especially if you want a fixed format so it looks just like it does in Word or on the printed page. It is rather like taking a puzzle that fits in a box (Word) and expecting it to keep the same shape if you dump it into a bag (epub). And epub is a highly flexible bag, really like a balloon, that the reader can make bigger at their whim. |
03-05-2014, 03:06 PM | #17 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Other people can speak to this better than I, but Word isn't pure HTML. It uses XML and other tools that provide the GUI interface for the CSS (and other coding that isn't CSS) that makes it function (like start-and-stop lists). I don't see how any user "copy and paste" is going to carry all that information with it. You, yourself, said that you know that copy-and-pasting from Word to BookView doesn't work, right? So: how can it work in a webform? If you cannot do it, yourself, from GUI to GUI, how can you start to replicate it in a webform? You already have the answer. There may well be programmatic methods that would extract all that information, (n.b.: I don't actually see how, not going GUI->GUI) but it's certainly outside of the scope of normal ePUB creation or this forum. Hitch |
|
03-05-2014, 03:18 PM | #18 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
And thus the need to either use Toxaaris' addon or calibre as an intermediate step, or else to duplicate all that work yourself by creating Yet Another Conversion Tool, with a great deal of backend programming to handle it. If you truly wish to write that program, don't let us stop you, but if you just wish to take Word documents and put the contents into Sigil, why not go with the already existing tools? What is the problem with "bounce(ing) it through calibre or sigil first", and why is using a web-based program going to be any better? For that matter, I am sure you can whip up a php script to upload a word document and have the server run calibre to convert it, then offer up the results to you. Why that would be any better, I do not know. |
|
03-05-2014, 03:27 PM | #19 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
He's already told us. He's trying to create some type of auto-convert website, so that users can paste a Word file into a box, and out pops an ePUB. Something like...NookPress, essentially. He doesn't want human intervention on his part, as near as I can discern, or he'd just have them UPLOAD the files, extract the html and then feed them to Sigil/Calibre/whatever. {shrug}. Yes, wouldn't THAT be nice. Of course, the nearly hilarious part of this (no offense to Mr. Pointy) is that this is exactly how good books go badly wrong; the operating assumption that the bloody file is clean to begin with. I may just be remarkably unlucky, but let me be perfectly clear about this: I do not see ONE clean or remotely formatted Word file out of 100. Seriously. Possibly not one out of 200. This idea suffers from the same as many of the "auto-magic converters" out there; once someone has DONE all the work of cleaning and formatting their manuscript, following someone's instructions, there's no reason on God's green earth why they wouldn't just upload the result to NookPress or Amazon in the FIRST PLACE. 'Tis ever the conundrum. If someone can clean their Word file to the point that automagic conversion works--that the styles, etc., transfer over to an ePUB, all spit-and-shine-y, they don't need a bloody conversion house. At that point, using a conversion house is silliness, unless they're married to a font that requires embedding, or the book has other formatting elements that can't realistically be done with Word. Actually, this discussion comes dangerously close to pissing me off, as if everything formatters DO is simply replaced with a cut-and-paste. I'm assuming that this isn't Mr.Pointy's intent, but....it is starting to IRK me. Hitch |
|
03-13-2014, 03:34 PM | #20 |
Junior Member
Posts: 6
Karma: 10
Join Date: Mar 2013
Device: none
|
Hi All,
apologies for being irksome - and I know that other programs are available - perhaps i should ask this instead, what language is sigil written in? if i want to replicate a sigil type screen in a website that I paste a word doc into and it gives me the exact output that sigil does behind the scenes what could I do to achieve this? I suspect me asking the question has led (very kind) people down rabbit holes, I have a way of cleaning word docs, and storing information like covers etc... in a database, what I need is an easy way to drop the word text into a text(comments) box in a website that can show the code in the same way as sigil... thanks for your efforts in steering me in the right direction Mr P |
03-13-2014, 03:43 PM | #21 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
I believe it is written in C++, so you can get the source code and have someone bang it into your project.
You might look at the source code (hopefully it is commented) and see what steps are followed. I don't think you are actually pasting a Word document into it, but rather what the clipboard is putting out when you copy to it and paste from it. This may be relatively plain text, which Sigil is guessing how to convert into html. It may be guessing that two end of lines is a paragraph for instance. But I suspect that not all operating systems work the same, so you might need to use a hex editor (which you can download for free, PS Pad is one, but there innumerable others) to see just what is actually being pasted. But as this may not be the same from the various operating systems you could have a task on your hands. There doesn't seem a pre-cooked solution for this, only hard work looking at what Sigil does. Nobody is going to do it for you, I am afraid. |
03-13-2014, 04:02 PM | #22 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Last edited by eschwartz; 03-13-2014 at 04:07 PM. |
03-13-2014, 04:40 PM | #23 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You might think of using TinyMCE on your website. I believe that has an option to convert pasted Word into HTML.
|
03-14-2014, 02:58 PM | #24 |
Lector minore
Posts: 649
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Samsung Galaxy Tab S5e, Google Pixel Slate
|
Maybe you could try looking at what Google Docs does when you paste in something from a Word document?
|
03-21-2014, 02:55 PM | #25 |
Junior Member
Posts: 6
Karma: 10
Join Date: Mar 2013
Device: none
|
Hi All,
thanks so much for the feedback... much appreciated Kind regards Mr P |
Tags |
paste preserved word code |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Preserving Layout with epub | internolivia | Calibre | 9 | 06-04-2014 03:15 PM |
Conversion from MOBI to ePub and preserving footnote links | bloodfyr | Conversion | 0 | 01-31-2012 09:35 PM |
Creation of Complex Script E-Book Using Images for Every Word? | sungkhum | Conversion | 8 | 10-26-2011 04:20 PM |
Preserving format from ePub (Sigil) to Mobi | jeff47 | Calibre | 9 | 10-22-2010 10:17 PM |
Preserving <br /> on epub -> txt conversion | billingd | Calibre | 1 | 08-11-2010 06:24 AM |