View Single Post
Old 08-01-2012, 02:19 PM   #49
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,388
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, using the vast majority of options in the conversion can lead to loss of formatting or even data (s&r being a case in point). Look at it this way. You can use filter-css as a global setting, say to remove document specified colors for all your books if you like using night mode in a viewer. You can do this without having to know anything about the actual css in your book. The same applies to --base-font-size etc. Whereas to use search and replace on css you have to know what the css in the individual book you are converting is.

Now obviously, this is not a clear partitioning. Various tasks fall somewhere in between editing and not editing. And there are parts of the conversion pipeline, like s&r, that I would say are more editing than not. Nonetheless, it is my judgement that adding CSS s&r is not appropriate for calibre. CSS by its very nature is hard to run s&r on without fully understanding how it applies to the html, since it is not easy to predict what change will have what visual effect, without understanding both the css and the html to which it is applied. The proper place to do this is in a book editor.
kovidgoyal is offline   Reply With Quote