OPML import question

I would like to preserve hard line endings in imported OPML. However, 0xa characters are getting stripped out and the the text reflowed. I’m importing to the synopsis cards. Is there a way to include a hard line ending in an import? Maybe a character other than 0xa?
Word wrapping is welcome. I want to import paragraph breaks.

How are you creating your OPML? I have an Applescript[1] that takes references in Bookends and converts them to OPML, and it uses standard XML character encoding for line feed that correctly import in Scrivener: (&#nnnn; is the character encoding format and 10 is the decimal codepoint for LF), try the example OPML attached to see if it works for you:

BE-Selection.opml.zip (2.83 KB)


[1] github.com/iandol/bookends-tool … pplescript

Well, gag me with an octothorp, you hit the nail on the head.

It’s interesting, though, this nutty world of unicode. In your opml, line endings embedded in the payload (the data in the xml tags like body) are and work perfectly. The line endings outside the payload are 0xd (carriage returns) in the Macintosh style.

Many thanks for the time you took on this.

What I’m doing is a little preprocessing in Python. Currently, I’m exporting to OPML, reformatting it there, and then importing back into Scrivener.

I’m studying up on Swift and plan to take my command line Python a little farther once I’m up on Swift and Cocoa. It’s a somewhat new world. I’ve written a lot of C/C++, tons of Python, tk/tcl based GUIs, but Mac GUI coding is new.

Thanks again for your help!

Each format has a different encoding convention, and it is hard to keep track of them all!

I’ve test created a command line script in Swift, and it was very nice in that you can use cocoa frameworks directly from the command line without needing to compile, very cool. I was very disappointed when I tried it last year though that you can’t just use the command line tools or a custom install if you do want to compile and debug, you are forced to install XCode. Obviously the resources and libraries available surrounding Python or Ruby are still much greater than Swift. Gem or Pip are miles ahead of the swift package manager (or whatever it is called).

Back on topic, I wish Scrivener had a smarter importer for OPML…