Mellel2HTMLstructure: Export HTML from Mellel
Mellel2HTMLstructure is a droplet that extracts the structure of Mellel files and transforms it to html.
Before you try it, you might want to check the Philosophy of Mellel2HTMLstructure and the supported features and limits below.
This is work in progress, developed for my own needs. Some feature support is lacking or very basic at the moment.
Feedback is welcome. Speed of further development depends on my time off course and on the »motivation« coming from the community.
New in Version 1.1b
- Numbering schemes for Auto-titles
(only Arabic, Latin and Roman for now)
- Keywords and Comments
- Revised handling and styling of footnotes
- Revised Styles.css
New in Version 1.02b
- Direction of document and paragraphs is now transferred.
- Default stylesheet now contains selectors for all character style versions and sets the attributes according to the Mellel defaults.
- The Droplet no longer gets confused if slashes are part of the document’s name.
Installation and usage
- Download Mellel2HTMLstructure and copy the Droplet from the disk image to your Application folder.
- Drop Mellel documents onto it (or start it and choose a Mellel document from the Open dialog).
- That’s it. Mellel2HTMLstructure will create a folder at the original’s location, place the html extract in it along with an image folder (if images are used) and a basic stylesheet to get you going. And it opens the newly created html file for you.
Important note: if you run Mellel2HTMLstructure again on the same file, it will update the html and the image folder. So if you have edited the html or the images, your manual changes will be lost! The Styles.css will not be replaced.
- If you use Mellel2HTMLstructure regularly or for profit, support the development by making a donation (Contact me. PayPal Button might come some day).
Yes. Most Probably.
Due to the nature of XML-transformation it is most likely that sooner or later strange results will occur with someone’s documents. Drop me a note if it happens. I’ll try what I can do to improve things.
Mellel (and for that matter any other word processor or publishing application) and html start from opposite layout assumptions: a static page vs a flexible flow. Therefor it makes not much sense to carry over the original formatting to html. Instead Mellel2HTMLstructure will focus on the structure of the text and leave the formatting of the html file to its own stylesheet.
Mellel2HTMLstructure depends on consequent use of auto-titles, proper nested lists and styles. So if your are more the manual formatting type of writer you’ll be out of luck with this Droplet (you might want to try Stephen Still's mellel2html.xsl instead). Mellel2HTMLstructure will not bring over any styling details (with a few exceptions).
I prefer a clean html code. Therefor Mellel2HTMLstructure tries to avoid any unnecessary elements. I hope I met the sweet spot ;-)
class will be the style name; the most used paragraph style omits the class attribute
- character marker-up
- Charkter styles go to the class attribute of <span>. If the character style matches the associated character style of the parent paragraph there will be no extra <span>.
- Variations will resolve in extra <b> and <i> for Variation b and c, Variation d to f up will be <em> with class-attribute (the Standard Styles.css will render them bold-italic, underline, underline-italic) and Variation g will become <sub> und h will become <super> and rendered accordingly
- Marker will be transferred to <mark> (yes this is html 5)
Structure-flows will transform to <h1>,<h2>,<h3> … Numbering schemes with all its elements are translated including number-reset, and numbering types (only arabic, roman and latin for now). Mellel2HTMLstructure assumes that you use one paragraph for each auto-title.
Tag-flows are not yet supported.
are transformed to unordered lists. Level will be the class-attribute of <ul>. Nested lists will be forced into a strict hierarchy. (Mellel allows you to skip levels. This is not possible in html.)
Mellel2HTMLstructure can deal with several note streams. It will list all note text at the end of the file. Each note stream is enclosed in a <div> with the stream name as class. Note symbol and text are linked. Class of the reference is the note stream. Numbering scheme is simply arabic numbers for now. You have to use css to distinguish references from different note streams from each other.
Unfortunately Mellel has no Image-Styles. So Mellel2HTMLstructure has to make an exception here and carry over some styling attributes.
- width and hight as mentioned in the image dialog window
- text wrap
Mellel2HTMLstructure uses css to emulate those options that make sense in html (flow left/right; skip left/right/center).
- Title as alt-attribute
This is very basic for now. You’ll get just rows and cells with your text. I honestly don’t know what happens if you have joined cells in your Mellel document.
- Cross-references and bookmarks
These simply become links and anchors (<a>). Reference-schemes are not yet supported. So all you get displayed is the plain text.
- auto-title elements and images work as targets
- when you use a URL starting with »http://« or »mailto:« as Virtual target Mellel2HTMLstructure will convert it to a proper link.
- Variables are resolved in text and auto-titles
- Keywords and Comments go to meta-tags ins html (keywords and description)
The documents default direction (the binding direction set in the Document Setup) and paragraph direction is transferred.
- Numbering/schemes for lists, notes and cross-references
- Auto-titles tag-flows
- Style sheet adapting
At present Styles.css is static and gives only some basic selectors. Without sacrificing Mellel2HTMLstructure’s Philosophy it seems useful to populate Styles.css with selectors for all used classes and some (!) applicable attributes.
- Direction on character style level
- Tracking (switch it of before dropping your file onto Mellel2HTMLstructure)
- probably some more things that I am not yet aware of
Those things will improve over time.
What’s not intended to work
- manual formatting (style overrides)
- sections, page range, header, footer
none of these makes sense in html
For the curious
Mellel2HTMLstructure is basically an AppleScript droplet that performs some Terminal magic. Heart of the transformation is an xsl stylesheet.
An yes. This page was created with Mellel and Mellel2HTMLstructure.
- Improved feature support
- Tweaking the style sheet based on the style attributes in Mellel
- Split the html into several pages, create an index.html and navigation stuff.
As Epub is basically html it shouldn’t be too hard to convert Mellel documents to Epub.