Carriage Return/Line Feed in Export Scripts

Discussion in 'Weather Watcher - Suggestions' started by Garth Fitzgerald, Jan 11, 2014.

  1. Garth Fitzgerald

    Joined:
    Jan 30, 2013
    Messages:
    5
    Likes Received:
    0
    Could you allow the data export process to export carriage return/line feeds? I am exporting to a .txt file without HTML headers. A daily/hourly/moon loop puts every piece of information on a single line -- even when I use separate [TEMPLATE]...[/TEMPLATE] structures for each piece. This single line is difficult to parse by any program using the .txt file.

    I have version 7.1.129 of Weather Watcher Live which, by the way, is an excellent program.

    Have a great new year.
     
  2. msinger

    msinger Administrator
    Staff Member

    Joined:
    Nov 6, 2002
    Messages:
    4,660
    Likes Received:
    0
    Please post the export template that you're using now. And, below that, show an example of the output you'd like to see.
     
  3. Garth Fitzgerald

    Joined:
    Jan 30, 2013
    Messages:
    5
    Likes Received:
    0
    Thanks, Mike. I'm impressed by your prompt answer.

    The export script is:

    [DAILY LOOP COUNT=1]
    [TEMPLATE]
    [DAILY DAY], [DOWNLOADED DATETIME]
    Today Daytime: [DAILY CONDITION DAY]
    Today Evening: [DAILY CONDITION NIGHT]
    [/TEMPLATE]
    [/DAILY LOOP]

    The actual exported data are:

    Saturday, 1/11/2014 9:22:36 PM Today Daytime: Rain Today Evening: Rain

    I would like the exported data to be:

    Saturday, 1/11/2014 9:22:36 PM
    Today Daytime: Rain
    Today Evening: Rain

    I appreciate your help.

    Regards,

    Garth
     
  4. msinger

    msinger Administrator
    Staff Member

    Joined:
    Nov 6, 2002
    Messages:
    4,660
    Likes Received:
    0
    If your plan is to parse the output with a program, then why not just make it easy like this?

    [DAILY LOOP COUNT=1]
    [TEMPLATE]
    [DAILY DAY], [DOWNLOADED DATETIME]|Today Daytime: [DAILY CONDITION DAY]|Today Evening: [DAILY CONDITION NIGHT]
    [/TEMPLATE]
    [/DAILY LOOP]

    That way you'd easily be able to parse the output on "|".
     
  5. Garth Fitzgerald

    Joined:
    Jan 30, 2013
    Messages:
    5
    Likes Received:
    0
    Thanks, Mike.

    I tried a special character to mark the parsing breaks in a text line: it worked! No problem remains :icon_smile:

    I am using a parser written by another person (the TXT plugin for the LCDC program by Matthew Augier, which displays text on a vacuum fluorescent display). Fortunately the parser recognized special characters to delineate parts of a line.

    Not all parsers do, though. In the long term, allowing [CRLF] and [TAB] to format parts of a data export might be of general use. I'm OK now, though, thanks to your suggestion.

    Regards