The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
OF iPhone HTML Export Script Thread Tools Search this Thread Display Modes
Hello,

just uploaded a new version that fixed some bugs find by people here on the forum (thanks granin). The solution right now is not as nice and elegant as before but works and I guess that's more important. :)

I also embedded some of the iUI-background images directly in the stylesheet wich makes the output a bit nicer.

@MacSparky: the commands starting with "sudo" are supposed to ask for your password. sudo = SuperUser DO since you have to have access to system files to install the gems and developer tools.

@bernietheone: Thanks!

@jet14: Is your OmniFocus.app located in /Applications? Is it possible to e-mail me a sample document that triggers the bug? martin (at) burnfield (dot) com
 
Quote:
Originally Posted by haraldmartin View Post
@jet14: Is your OmniFocus.app located in /Applications?
Yes.

Quote:
Originally Posted by haraldmartin View Post
Is it possible to e-mail me a sample document that triggers the bug? martin (at) burnfield (dot) com
Sent. As I said in that message, it does seem to be something about my DB, as the script ran fine when I dumped my DB and just loaded the "sample" info OF starts with.

Thanks again,

J
 
Well I'm trying to get the script to work and I'm pulling an error with this section of code in OFfline.rb:

li.task :style => 'display: none;' do |l|

(it's line 36 in the script)
I ran it through Komodo and it's showing a syntax error and the next line gives me an error of "useless use of | in void context" (again Komodo is reporting this).
The ruby gems installed fine. I'm assuming the OFfline folder doesn't need to be in a particular location (I just got the new updates of OmniFocus tonight).
I'm running 10.4.11 and OmniFocus 46.0.94800.

Thanks....
 
Quote:
Originally Posted by CdtDelta View Post
Well I'm trying to get the script to work and I'm pulling an error with this section of code in OFfline.rb:

li.task :style => 'display: none;' do |l|

(it's line 36 in the script)
I ran it through Komodo and it's showing a syntax error and the next line gives me an error of "useless use of | in void context" (again Komodo is reporting this).
Thanks....
If you're running Tiger and haven't upgraded your local copy of Ruby there might be a problem with this style. What version of Ruby are you running? Just type this into Terminal.app:

ruby -v

Can you try and change the line causing the error to

li.task(:style => 'display: none;') do |l|

and let me know if it works?
 
Well I did a port install ruby to get me up to date (I also updated rubygems just in case). So here's what I'm running now:

ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]

I made the change in the line and that seemed to make Komodo's error checking happy.
However now the error I'm getting is:

OFfline.rb:17:in 'require': No such file to load -- rubygems
(LoadError)

Which I suspect means it doesn't see my rubygems install?
 
Quote:
Originally Posted by CdtDelta View Post
Well I did a port install ruby to get me up to date (I also updated rubygems just in case). So here's what I'm running now:

ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]

I made the change in the line and that seemed to make Komodo's error checking happy.
However now the error I'm getting is:

OFfline.rb:17:in 'require': No such file to load -- rubygems
(LoadError)

Which I suspect means it doesn't see my rubygems install?
Did you symlink /usr/bin/ruby to the new, updated version (in /opt/local if you installed via mac ports)?

try this:
which version?
/usr/bin/ruby -v
/opt/local/bin/ruby -v


If the version living in /usr isn't the newest but the version built into Tiger (1.8.2 I believe) you should be able to fix this by linking the version in /usr/bin to the mac ports version:

sudo mv /usr/bin/ruby /usr/bin/ruby~
sudo ln -nfs /opt/local/bin/ruby /usr/bin/ruby


This should fix Rubygems as well if you installed them via Mac Ports.

You can try to run the from the ruby living in /opt:
/opt/local/bin/ruby ~/Desktop/OFfline/OFfline.rb

(change to match your real path of course). Does it work?

Please backup everything before etc so nothing is damaged.
 
Well I checked the version of Ruby again and you were right, it moved. So I linked it like you said and ran the command line version you gave and got this output:

/Users/username/Downloads/OFfline/OFfline.rb:36: warning: don't put space before argument parentheses
/opt/local/lib/ruby/gems/1.8/gems/rb-appscript-0.4.0/lib/appscript.rb:505:in `_send_command': CommandError (Appscript::CommandError)
OSERROR: 1
MESSAGE: NSReceiverEvaluationScriptError: 3 (The object or objects specified by the direct parameter to a command could not be found.)
COMMAND: app("/Applications/OmniFocus.app").documents.ID("lwsmxzYTdmG").projec ts.ID("k2Yu0hmELKd").root_task.parent_task.name.ge t()
from /opt/local/lib/ruby/gems/1.8/gems/rb-appscript-0.4.0/lib/appscript.rb:585:in `method_missing'
from /Users/username/Downloads/OFfline/OFfline.rb:22:in `markup_for_task'
from /Users/username/Downloads/OFfline/OFfline.rb:40:in `each_context'
from /opt/local/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:123:in `instance_eval'
from /opt/local/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:123:in `capture'
from /opt/local/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:155:in `tag!'
from /opt/local/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:211:in `html_tag'
from /opt/local/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/cssproxy.rb:43:in `call'
... 26 levels...
from /opt/local/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:155:in `tag!'
from /opt/local/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:217:in `html_tag'
from (eval):3:in `html'
from /Users/username/Downloads/OFfline/OFfline.rb:71
 
Quote:
Originally Posted by haraldmartin View Post
Did you symlink /usr/bin/ruby to the new, updated version (in /opt/local if you installed via mac ports)?

try this:
which version?
/usr/bin/ruby -v
/opt/local/bin/ruby -v


If the version living in /usr isn't the newest but the version built into Tiger (1.8.2 I believe) you should be able to fix this by linking the version in /usr/bin to the mac ports version:

sudo mv /usr/bin/ruby /usr/bin/ruby~
sudo ln -nfs /opt/local/bin/ruby /usr/bin/ruby


This should fix Rubygems as well if you installed them via Mac Ports.

You can try to run the from the ruby living in /opt:
/opt/local/bin/ruby ~/Desktop/OFfline/OFfline.rb

(change to match your real path of course). Does it work?

Please backup everything before etc so nothing is damaged.
I may have ruined my ruby installation. In terminal I ran the command:

Ruby -v

and it returned a version number. But it still would not install the applescript Gem.

Then, as suggested above I ran the commands:

sudo mv /usr/bin/ruby /usr/bin/ruby~
sudo ln -nfs /opt/local/bin/ruby /usr/bin/ruby

Now when I run the version command I get:

ruby: command not found.

I'm a complete novice at this kind of hacking. Can anyone please help restore my ruby install? I already have the developer tools installed.

Thank you in advance for your help.
 
@Jet: as I said in the email; there's a new version uploaded that works with your db so update your script to the latest version.

http://burnfield.com/martin/wordpres...ds/OFfline.zip
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
.html extension on dynamic html export pairustwo OmniOutliner 3 for Mac 3 2011-09-10 01:53 PM
script to export OOO to html and place on iDisk rhythmone OmniOutliner 3 for Mac 1 2008-08-27 06:32 AM
Export to HTML - What am I doing wrong? lsamberg OmniPlan General 3 2008-05-21 06:15 AM
OF iPhone HTML Export Script wkoffel OmniFocus 1 for Mac 0 2007-10-11 08:22 PM


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


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