Aussie John Posted January 11, 2007 Posted January 11, 2007 Im exporting a single calc field which has info needed for an .ics ical file. Unfortunately I cant work out how to keep the returns so the resulting file info is on its own line. as below BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT DTSTART;VALUE=DATE:20070109 DTEND;VALUE=DATE:20070111 SUMMARY:event two2 END:VEVENT BEGIN:VEVENT DTSTART;VALUE=DATE:20070108 DTEND;VALUE=DATE:20070109 SUMMARY:event day END:VEVENT END:VCALENDAR I end up with the resulting lines running together. The calc export field has all the returns. thanks in advance
Søren Dyhr Posted January 11, 2007 Posted January 11, 2007 Perhaps you should investigate this: http://www.jonathanstark.com/downloads/FMPtoiCal.fp7.zip --sd
Aussie John Posted January 11, 2007 Author Posted January 11, 2007 Thanks Søren. I did look at that but it is only for version 8
Søren Dyhr Posted January 11, 2007 Posted January 11, 2007 No just rewrite the scripts using a global field instead for the storage of errors - Like the attached snappies! --sd
Aussie John Posted January 12, 2007 Author Posted January 12, 2007 Thanks I found that option after posting. Unfortunately it does something to the file so ical wont read it. Interestingly if I copy the field and paste into a text file it does work.
Fenton Posted January 12, 2007 Posted January 12, 2007 (edited) It's probably the fact that FileMaker Export Field Contents outputs UTF-16 encoding, which some apps have trouble reading. Since you're on a Mac you could use AppleScript and shell script to write the field to a file instead; the default encoding is utf-8, which apps are happy with. Without getting too fancy as to the file location, this will write the field to a file on the Desktop. Run it in a Perform AppleScript step. The fields need to be on the current layout for this simple form: copy cell "filename" of current record to fileName copy cell "Text_" of current record to exportMe do shell script "echo -n " & quoted form of exportMe & " > ~/desktop/" & quoted form of fileName -- -n prevents a final line feed from being added Alternatively you could use an XML export, with an XSL stylesheet. You'd need a found set of 1 for this, as it's a regular Export. <?xml version="1.0" encoding="utf-8"?> xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" > Edited January 12, 2007 by Guest xsl added
Aussie John Posted January 14, 2007 Author Posted January 14, 2007 thanks Fenton - that works can you tell me what "quoted form of" means?
Fenton Posted January 15, 2007 Posted January 15, 2007 In Unix command line things (commands, parameters, etc.) are typically separated only by a space. So data, which often contains spaces, needs to be protected, enclosed with single quotes, and any special characters escaped. That's what "quoted form of" does.
comment Posted January 15, 2007 Posted January 15, 2007 Alternatively you could use an XML export, with an XSL stylesheet. You'd need a found set of 1 for this, as it's a regular Export. I am missing a piece here: if you have a found set of 1, couldn't you export it as tab-separated text, and specify UTF-8? I mean why bother with the XSLT?
Recommended Posts
This topic is 6522 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now