The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   Amending simple HTML export template (http://forums.omnigroup.com/showthread.php?t=20354)

smarsh 2011-03-08 01:04 PM

Amending simple HTML export template
 
Hi all,

Any pointers for customising the simple HTML template for exporting?

Thanks

whpalmer4 2011-03-08 02:44 PM

It's the OmniFocus export template you want to amend, and not the OmniPlan one? What do you have in mind? I think OmniFocus just blurts out the same stuff, with no provision for customization other than editing the HTMLExportHeader.html file buried inside the application, and that appears to handle the formatting, not the content.

smarsh 2011-03-09 10:13 AM

Yes it's the Omnifocus one - I'm happy to amend only the formatting and not the content per se.

What I'm looking to do is trigger an applescript by sending an email to my Mail.App which exports a ('work') perspective from Omnifocus and emails it back to me (using a bit of Hazel jiggerypokery)...

I can get this workflow satisfactorily but would like to amend the formatting to enable some 'show/hide' javascript for the notes section and to add checkboxes for each action which strikethrough the text once complete....

Editing the HTMLExportHeader.html file is a bit of a hassle given that this will get overwritten every time an OmniFocus update comes out. Anyone had any success with this?

whpalmer4 2011-03-09 11:04 AM

Do you run the sneaky peek builds? If you're running the production images, it seems like it shouldn't be too much of a headache, as the file in the latest build is identical to the one shipped in OmniFocus 1.0.1, and new production images don't come out all that often. Even if you do run the sneaky peeks, which would require reinstalling your changes more frequently, you probably could automate the process. Another approach would be to simply strip off the fixed Omni header and apply your own during your workflow processing....

smarsh 2011-03-09 12:35 PM

No I stick with the standard builds.

Amending HTMLExportHeader.html works ok, but do you know where the id 'omnifocus-report' is being imported from? I'd like to be able to add a span round each of the tasks. E.g.:

<input type="checkbox" onclick="strikeText('s1', this.checked);">
<span id="s1">Sample Task</span><a href="javascript:ReverseDisplay('uniquename1')">
<img src="notes.png" /></a>

All I've got at the moment is:
<table class="basic" id="omnifocus-report">

Presumably the rest of the page (e.g. the footer) is being imported from somewhere?

whpalmer4 2011-03-09 01:57 PM

Well, the id="omnifocus-report" bit doesn't do anything except establish an id for the table.

The footer is pretty trivial:

<p class="footer">Exported 3/8/11</p>
<!-- OmniFocus&nbsp;1.0 -->
</body>
</html>

You know, I wonder if it wouldn't be easier to write an Applescript that spits out the rows surrounded by the HTML and Javascript code you want.

smarsh 2011-03-10 10:35 AM

Any pointers on how to do this? (my applescript knowledge is pretty poor)...

whpalmer4 2011-03-10 11:00 AM

I sent you a private message...


All times are GMT -8. The time now is 10:37 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.