Thread: Export problems
View Single Post
Old 07-28-2021, 05:12 AM
Spliff Spliff is online now
Registered User
Join Date: 04-07-2021
Posts: 72
Thank you so much, Kyle, your xml hint here is spot-on: Problem resolved!

Some details though:

Mandatory double quotes in CSV export are a nightmare, as soon as you also use ample double quotes within the text, so - this would not be "core csv" anymore, but it's largely used by lots of applications, as well as by all dedicated csv editors in import and export - the use of a "dedicated", i.e. special = non-used otherwise, character as field delimiter is more and more applied today, since it all resolves, but this very simple means, all double-quotes problems.

I repeat what I said above: UR does the export without fail, since my specialized (paid) software (Ron's CSV Editor; EmEditor in CSV mode) both imported it correctly, but my - quite elaborate - script tries did not, and from web info, it appears you need special libraries - or need the know-how to write them yourself - in order to make "core csv" import faultless in all circonstances, so the usage of a special character (the choice between "|" and tab would probably sufficient for most users) would be of big help indeed.

Thus my "trick" above, inserting unused - and thus left empty in all cases - fields, in order to get distinct field indicators, e.g. for a bulk regexfind for every "line" / "record" (i.e. regexcode which treats every "record" just once, writing the different field contents into export variables which then are processed by script; as I said above, in UR csv, the flags are exported as names (i.e. not as numbers as in xml), and if you rename them to just-1-char abbreviations, thus they are just 1-char each in the csv (but 0 char if there is none)). This works indeed, and faultless again, but processing the XML output instead is much easier indeed:

I had got the XML export very wrong, albeit trying lots of things for hours, so here again, THANK YOU VERY MUCH for your kind clarification!

I had done some, unsuccessful, tries with partial xml export (for whatever reason), and so I had developed the faulty expectation that any successful xml export from UR had to include ALL (!) "attributes" (i.e. all record fields), and I had wrongly read your "Exporting to XML" help entry which says (my indications):

"Steps to export ALL (!) Ultra Recall data to XML (OPML): (...) Leave ALL (!!!) attributes/data selected (or click Check ALL (!) to reselect them ALL (!) on the Select Attributes page".

Thus, I had obviously overlooked the fact that the "ALL" further down in the help just applies IF the user wants to export ALL UR data, and that partial xml export is totally possible, and WITHOUT creating the html subfolders (i.e. incredible indeed overhead IF and when the user does not need the RTF data as well, i.e. the bold/italics/underlined or similar formatting; as I said above, even the plain-text export (i.e. the "Item text" attribute) preserves tabs and newlines / blanklines without fault).

So I had "selected all" attributes and then just (successfully) scripted the filtering-out of the unwanted ones, but was unhappy about the html bulk, which is not needed, but not even created by properly selecting the attributes, and when you say, above,

"For XML export, to prevent exporting of secondary files, uncheck these attributes:
Item Details (RTF)
Item Notes
Item Text",

this might mislead some users as well, since in fact,
- even the "Icon" inclusion will just create a folder exportname_Icons, with just one file for every icon, and to which then the exportname.xml file will just link again and again,
- the "Notes" inclusion will just create a folder exportname_Notes, and then with files IDnumber_Note.rtf, just for those items which have some (even just plain text) content within their "Notes" attribute,
- it's just the rtf need which will create that folder exportname_StoredContent, with one subfolder for every item, and
- of course, the "Item text" attribute does NOT create anything unwanted, but, as said, is perfectly retrieved within the .xml file.

So this works absolutely fine if you do:
- Export - XML/OPML
- Select Attributes: Uncheck All, then select those which are needed (in my case: just "Item Text" and "Flag" since, as said, even the indent level is retrieved by the respective tabs numbers)
- Destination: exportname.xml (i.e. a FILE name, even if you include the RTF), with Export child items recursive yes, Html no, and then "Finish"...

Whilst in all those aforementioned dialogues, there is some "Save settings as: ..." indeed, so everything I wanted is already there - oh well!!!; with all the problems I got with the export, I then simply and permanently overlooked this, as inexplicable as that may appear, and thus not getting the idea either to look it up within the help file:


THANK YOU VERY MUCH AGAIN for your very kind guidance! Thus:

UR's XML export is to be considered PERFECT as it is!

( And since this is so, users who use double quotes within some data will probably not be in need of the csv export for that data anyway. Oh, and since export presets have already been implemented, it should not be too complicated to introduce print presets, too? ;-) )
Reply With Quote