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 Search Today's Posts Mark Forums Read

 
Importing OPML (Outline Processor Markup Language) files Thread Tools Search this Thread Display Modes
Quote:
Originally Posted by Ilajn View Post
Code:
<?xml version="1.0" encoding="UTF-8"?>
That looks fine, and I'm getting a problem with Chinese too, when I import OPML generated by OmniOutliner into OF.

My first guess that it has something to do with XML Tools, but the bottom line is that I haven't understood it yet. I know rather less about text encoding than I should.

I'll give it some thought ...
 
I worked around the loss of umlauts when importing an UTF-8 encoded OPML file into OF. Here is the way although I don't understand why it works:

I open the original OPML file which comes from my phone in TextEdit. I don't change anything in the file except that I save it with western european Mac-Roman encoding. Importing this OPML file using OPML2OF I get all my umlauts. But this will surely not work for chinese:-(

I checked what happens if I try some other text encoding options in TextEdit:

Using
  • UTF-16 OPML2OF ends up in saying that I have to install the XML Tools first.
  • UTF-8 doesn't change anything.
  • Western European Mac-Roman see above
  • Western European Windows Latin 1 I get other symbols than using UTF-8, but I don't get umlauts
 
The culprit seems to be Applescript's built-in read function, which still appears to be reading text as MacRoman.

I have now rewritten ReadTextFile(), dropping read in favour of a very simple use of cat in the shell:

Code:
on ReadTextFile(fFile)
	do shell script "cat " & quoted form of (POSIX path of fFile)
end ReadTextFile
On my system this fixes the output for the umlaut (and for Chinese characters too).

I have updated the file for download.

Last edited by RobTrew; 2012-07-17 at 08:01 PM..
 
Dear Rob,

thank you so much. It finally works and I'm happy :-)

Just one more request for improvement: Would it be possible that your script asks the user wether to make the "filename" a project or the first level entries of the file?
 
Quote:
Originally Posted by Ilajn View Post
Would it be possible that your script asks the user whether to make the "filename" a project or the first level entries of the file?
Well, yes,

天下无难事 有志者成之
天下无易事 有恒者得之

I think it would be possible.
 
i.e. most things will yield, in the end, to the force of will, but it helps to be persistent ...

I probably won't get to that for a while, I'm afraid, but the source code is there, so anyone is welcome to experiment ...
 
Note: OSX Lion hides the user's library folder. In order to install the the XML Tools.osax file you will need to make the library folder visible again.

Run this in terminal. One way to get to terminal is to click the spotlight icon in the top right hand corner of the screen and then type terminal.

Quote:
chflags nohidden ~/Library/
if you are worried about damaging the folder if it stays visible (Apple must have hidden it for a purpose - right) then you can hide it again by typing this into terminal.

Quote:
chflags hidden ~/Library
Great script, very useful, worked first time for me. It will be very helpful in planning projects in iThoughtsHD for import into OF.

Thanks you for creating and sharing the script.

Last edited by philrob; 2012-02-12 at 02:58 AM..
 
Thanks philrob for that terminal command. I know you can turn on system files in the view menu to show the Library file but then you also see all the other system files (which I do not want to see). This makes things much cleaner.
 
Thanks a lot RobTrew for your work on this.
In my case it makes it really easy to use OmniFocus and MindNode together.

I knew about your Web site yet and this one seems not to be featured there. It really should IMO !

Regards
 
Quote:
Originally Posted by bzhgeek View Post
I knew about your Web site yet and this one seems not to be featured there. It really should IMO
Thanks ! Very good to know that it is proving useful.

As for that web-site, you have reminded me that I will need to decide what to do with its contents ...

(Apple, in its new guise as a $400bn concentration of capital, a sort of vacuum cleaner in the sky, to adapt an image used more generally by Andrew Hacker in the NYRB, seems to have decided that web-hosting is inconsistent with the maximisation of share-holder value ...

They will pull the plug in June, I think).

--

Last edited by RobTrew; 2012-02-24 at 04:59 AM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion: Have OF Import OPML files as a new Project gattaca OmniFocus 1 for Mac 5 2013-01-29 09:17 PM
view options for OPML files twelfth OmniOutliner 3 for Mac 4 2013-01-28 10:14 PM
Import OPML files into Omnifocus ?? alexlot OmniFocus for iPad 0 2012-01-02 03:43 AM
Importing an MS outline for auto-diagramming? zeeebus OmniGraffle General 2 2009-06-28 11:21 AM


All times are GMT -8. The time now is 12:34 PM.


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