Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorgoetz
    • CommentTimeJun 24th 2010
     
    Maggot: More Adventures

    "6) An bug/ feature/ item of interest! If you comment out stuff that doesn't work in the template files, it may still fail U's validation, presumably because the validation doesn't have any understanding of the structure of the document but knows it's going have to swap {{invalid expression}}, and can't find anything to swap it with. Boy - it took me over an hour to get that one!"

    Yes, the validator just scans all placeholders in the template files regardless of whether it's inside a comment or not.That is because the template engine has no notion of comments. Nothing is skipped during validation, even though the placeholder might not be replaced during export at all.

    "As a workaround, Götz has proposed accessing the notes programmatically, and putting my image there; but I couldn't get that to work. "document.notes" seems to be valid - it will display something like (,,,) where the number of commas equals the number of notes, but it seems that document.notes can't be taken over a FOR loop. So for now we'll just have to put the image in from the U document in the normal way."

    I will have a look into that. You should definitely be able to access your Notes in a convenient way when writing your own Templates.

    "11) \n in localised.strings doesn't work... just replaced by one white space, presumably because HTML is getting its hands on it as well. It's not really important, I guess."

    I just realized that \n just inserts a line break in the text file, which doesn't mean a line break is inserted in the formatted HTML. Instead, you can use <br /> in the strings file and you should get a line break.

    "12) I've been trying to get the navigation bar to list the h1 headings in the current page. I used storeAs in the .plist file, and I thought all would be well, but the validation failed, saying it didn't recognise "headings". I used:
    storeAs headings in the plist
    {{FOR heading IN headings}} in the template.
    Any idea?"

    Currently, you can use the storeAs attributed only for Reference Actions (footnotes, references, etc.) and not for Paragraph Styles (I'm assuming the Style for h1 headings is a Paragraph Style). storeAs attributes for Paragraph Styles is definitely on our TODO list for the Web Export.

    Götz
    •  
      CommentAuthorMaggot
    • CommentTimeJun 24th 2010 edited
     
    >>> Currently, you can use the storeAs attributed only for Reference Actions (footnotes, references, etc.) and not for Paragraph Styles....

    That might be better. I'm not using references, so I might be able to co-opt them as "anchors" in my file, and use them for the purposes of listing particular items over several documents...

    Incidentally, does any HTML maven here know how some web pages seem to remember where you are on them, so that if you follow a link and then click the back arrow, it takes you back to the same position on the page you were at?

    M
    •  
      CommentAuthoraef110
    • CommentTimeJun 25th 2010
     
    It appears that project notes are ignored by the current HTML exporter. Since links are encoded in notes, it would be ideal to create project notes for frequently used links on a site, such as internal links, rather than having to duplicate them for each document within the project.

    Could this little feature be incorporated into the next update?
    •  
      CommentAuthorMaggot
    • CommentTimeJun 25th 2010
     
    Yeh!
    •  
      CommentAuthorgoetz
    • CommentTimeJun 26th 2010
     
    aef110:

    "1. Option to replace smart quotes with straight quotes. It's great to use smart quotes when writing, and there's an option to replace straight quotes with smart quotes. However, HTML often needs the reverse and it would be great to have this capability."

    Good idea, I think this will be included in the next beta!

    "2. Replace all nonstandard characters (i.e., those not in ASCII 0-127) with official HTML entity codes. Thus, è would be replaced by &egrave; and ü by &uuml;, etc. This would eliminate much post-export editing and allow all characters to work in all browsers."

    We did not include this capability because we set the encoding of the exported XHTML files to Unicode, thus eliminating the need for replacing characters with their HTML entities (except &, <, >). We will think about such an option.

    Goetz
    •  
      CommentAuthorgoetz
    • CommentTimeJun 28th 2010
     
    Currently, the exporters cannot access the Project Notes. However, we'll think about adding this capability in the next release.
    •  
      CommentAuthorfehnman
    • CommentTimeJun 29th 2010
     

    Incidentally, does any HTML maven here know how some web pages seem to remember where you are on them, so that if you follow a link and then click the back arrow, it takes you back to the same position on the page you were at?

    That's a browser feature, I think.

    •  
      CommentAuthorBen W.
    • CommentTimeJul 11th 2010 edited
     
    Thanks for the exporter! Three things I noticed:

    * creating a (snippet) template is too complicated (or it's just too hot outside). I can only imagine how much work it is I'm asking for, but it would be so much easier if I just could use a drop down / form field / any other convenient tool to define my own tags or expand the existing ones (like the one from MarsEdit).

    * when exporting as a snippet, foot notes won't be exported as such. (Think “Daring Fireball”.)

    * you do know that with all the work of the Web Exporter you have almost done an "export to ePub"? That would *so* rock! (In fact, it would be just another web template as it's a zipped container with some XHTML and CSS files in it.)

    Oh, talking about MarsEdit – do you happen to have a "pro tip" on how to push the exports easily to MarsEdit? Just by chance? If you should ever happen to make a crossover of Ulysses and MarsEdit (“Ulysses Web Edition” ;)), I'd completely go bananas anyway and buy it two times again. That would probably the best web writing and publishing tool in the world! Nah, back to reality:

    Thanks for Ulysses and the ongoing work now with the Web Exporter!
    •  
      CommentAuthormadox
    • CommentTimeJul 12th 2010
     
    From what i read in this tread the exporter seems to me like a latin dictonary, i dont even dare to press the export button..
    •  
      CommentAuthorgoetz
    • CommentTimeJul 12th 2010
     

    creating a (snippet) template is too complicated (or it's just too hot outside). I can only imagine how much work it is I'm asking for, but it would be so much easier if I just could use a drop down / form field / any other convenient tool to define my own tags or expand the existing ones (like the one from MarsEdit).

    A user interface for editing/creating Templates is one of the top items on our list for the WebExport, so stay tuned :)

    when exporting as a snippet, foot notes won't be exported as such. (Think “Daring Fireball”.)

    I can't find footnotes as an Action for the Snippets Presets (XHTML, Markdown, WordPress). However, the Modern Template includes footnotes, which are quite similar to the ones from Daring Fireball (they are in square brackets and not in superscript). We can think about adding this footnote action to the Snippets.

    you do know that with all the work of the Web Exporter you have almost done an "export to ePub"? That would so rock! (In fact, it would be just another web template as it's a zipped container with some XHTML and CSS files in it.)

    Yea, we think we should be able to export to ePub pretty easily (I just had a glance at the spec, so no promises yet). We'd make a separate exporter for ePub, but the code is already there.

    Oh, talking about MarsEdit – do you happen to have a "pro tip" on how to push the exports easily to MarsEdit? Just by chance?

    I haven't worked with MarsEdit, and the software doesn't seem to have a public API that we could use to push the exports to MarsEdit, but I might investigate a bit further.

    •  
      CommentAuthoraef110
    • CommentTimeJul 12th 2010
     
    I modified XHTML.plist in the Snippet template folder as follows:

    I changed the "floating" key under "inline" -> "Item 5" (Image) from:

    <div><img src="{{image.path}}" alt="{{description}}" /><p class="imgTitle">{{LOC image}} {{@index}}: {{description}}</p></div>

    ... to:

    <img src="{{image.path}}" alt="{{description}}" class="center">

    At this point, my edit worked as planned.

    When I then changed the "image.path" variable from:

    images/{{document.name}}/{{key}}

    ... to:

    image-files/{{key}}

    ... in order to conform to my website, the exporter reverted back to the original.

    Can anyone explain why? Is this a feature designed to prevent users from modifying the default templates too much? Do I need to create my own template in another folder?


    Many thanks,

    Albert
    •  
      CommentAuthorgoetz
    • CommentTimeJul 12th 2010
     

    Can anyone explain why? Is this a feature designed to prevent users from modifying the default templates too much? Do I need to create my own template in another folder?

    Unfortunately, I can't. I just tried the same thing and it worked for me. Maybe you forgot to save the XHTML.plist file? Did you restart Ulysses?
    The Exporter only parses the image.path property and inserts the path (with the replaced placeholders) into the floating property. We don't prevent you from changing any properties in the Property Lists except when the validator complains about it :)

    •  
      CommentAuthoraef110
    • CommentTimeJul 12th 2010
     
    Hi Goetz,

    Thanks very much. I just closed and restarted Ulysses and it now works as expected.

    Only one issue: How can I get rid of the "<p>Image 1</p>" tags before each image? Also, is there a way to remove the extra new line (\n) after each image?


    Many thanks,

    Albert
    •  
      CommentAuthorBen W.
    • CommentTimeJul 12th 2010
     
    Thanks for the answers, goetz!
    •  
      CommentAuthorgoetz
    • CommentTimeJul 12th 2010 edited
     

    Only one issue: How can I get rid of the <p>Image 1</p> tags before each image?

    Simply remove <p class="imgTitle">{{LOC image}} {{@index}}: {{description}}</p> in the property "floating" and you should be fine. This way, only <div><img ... /></div> is inserted.

    Also, is there a way to remove the extra new line (\n) after each image?

    Do you mean the newline after the closing </div>? This newline is inserted automatically after each paragraph (and the floating element, i.e. the image and the description enlocsed by the <div> is part of the paragraph). The WebExport inserts a newline after each paragraph to make the source code more readable.