Creating a vCal-interpreter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • daGnutt

    Creating a vCal-interpreter

    I'm currently trying to write a vCal-interpreter, so that I can use a
    google-calendar to show upcoming, and recently performed events.

    The issue that I have now, is that I wish to split up the vCal-info
    into blocks with data.
    What I'm after right now is a way to fetch the row-nums from a string
    where the rows are

    First Occurence of
    BEGIN:VEVENT
    and then the first occurence of
    END:VEVENT

    (So I can divide it into blocks)

  • daGnutt

    #2
    Re: Creating a vCal-interpreter

    It never fails!
    Just after posting the message I found a way to do this!

    On 5 Juli, 10:51, daGnutt <gnutt.halvords ...@gmail.comwr ote:
    I'm currently trying to write a vCal-interpreter, so that I can use a
    google-calendar to show upcoming, and recently performed events.
    >
    The issue that I have now, is that I wish to split up the vCal-info
    into blocks with data.
    What I'm after right now is a way to fetch the row-nums from a string
    where the rows are
    >
    First Occurence of
    BEGIN:VEVENT
    and then the first occurence of
    END:VEVENT
    >
    (So I can divide it into blocks)

    Comment

    • daGnutt

      #3
      Re: Creating a vCal-interpreter

      New problem (I'm sure this one is really easy)
      In a string i have many rows, I want to extract some data from one of
      those rows

      Example:
      >From the row "DTSTART;TZID=E urope/Stockholm:20070 603T190000"
      I wish to extract the value "20070603T19000 0" into an variable

      Example 2
      >From the row "DTSTART;VALUE= DATE:20070616"
      I wish to extract the value "20070616"

      These two examples are the only two variants of which I wish to
      extract the information (at this point)

      Can anyone give me a quick fix?

      On 5 Juli, 10:56, daGnutt <gnutt.halvords ...@gmail.comwr ote:
      It never fails!
      Just after posting the message I found a way to do this!
      >
      On 5 Juli, 10:51, daGnutt <gnutt.halvords ...@gmail.comwr ote:
      >
      I'm currently trying to write a vCal-interpreter, so that I can use a
      google-calendar to show upcoming, and recently performed events.
      >
      The issue that I have now, is that I wish to split up the vCal-info
      into blocks with data.
      What I'm after right now is a way to fetch the row-nums from a string
      where the rows are
      >
      First Occurence of
      BEGIN:VEVENT
      and then the first occurence of
      END:VEVENT
      >
      (So I can divide it into blocks)

      Comment

      • Richard

        #4
        Re: Creating a vCal-interpreter

        And?
        Did you find the answer already? ;-)

        Else try "explode".

        R.

        "daGnutt" <gnutt.halvords son@gmail.comwr ote in message
        news:1183636630 .140438.104700@ 57g2000hsv.goog legroups.com...
        New problem (I'm sure this one is really easy)
        In a string i have many rows, I want to extract some data from one of
        those rows
        >
        Example:
        >>From the row "DTSTART;TZID=E urope/Stockholm:20070 603T190000"
        I wish to extract the value "20070603T19000 0" into an variable
        >
        Example 2
        >>From the row "DTSTART;VALUE= DATE:20070616"
        I wish to extract the value "20070616"
        >
        These two examples are the only two variants of which I wish to
        extract the information (at this point)
        >
        Can anyone give me a quick fix?
        >
        On 5 Juli, 10:56, daGnutt <gnutt.halvords ...@gmail.comwr ote:
        >It never fails!
        >Just after posting the message I found a way to do this!
        >>
        >On 5 Juli, 10:51, daGnutt <gnutt.halvords ...@gmail.comwr ote:
        >>
        I'm currently trying to write a vCal-interpreter, so that I can use a
        google-calendar to show upcoming, and recently performed events.
        >>
        The issue that I have now, is that I wish to split up the vCal-info
        into blocks with data.
        What I'm after right now is a way to fetch the row-nums from a string
        where the rows are
        >>
        First Occurence of
        BEGIN:VEVENT
        and then the first occurence of
        END:VEVENT
        >>
        (So I can divide it into blocks)
        >
        >

        Comment

        • daGnutt

          #5
          Re: Creating a vCal-interpreter

          I have tought about that, however the row that I want to extract this
          data from is among alot of other rows. Therefore I'm thinking in the
          rows of this

          Perhaps writing up a reg-exp searchstuff (my head is tired right now)
          that searches for a row ex

          (not sure that my regexp are right for five cents, so I'm mixing
          regexp with pseudo-code)
          ^DTSTART;[possibly "TZID=Europ e/Stockholm" OR "TZVALUE=DA TE"][data-to-
          be-extracted]$

          can anyone help me?

          On 5 Juli, 16:24, "Richard" <root@localhost wrote:
          And?
          Did you find the answer already? ;-)
          >
          Else try "explode".
          >
          R.
          >
          "daGnutt" <gnutt.halvords ...@gmail.comwr ote in message
          >
          news:1183636630 .140438.104700@ 57g2000hsv.goog legroups.com...
          >
          New problem (I'm sure this one is really easy)
          In a string i have many rows, I want to extract some data from one of
          those rows
          >
          Example:
          >From the row "DTSTART;TZID=E urope/Stockholm:20070 603T190000"
          I wish to extract the value "20070603T19000 0" into an variable
          >
          Example 2
          >From the row "DTSTART;VALUE= DATE:20070616"
          I wish to extract the value "20070616"
          >
          These two examples are the only two variants of which I wish to
          extract the information (at this point)
          >
          Can anyone give me a quick fix?
          >
          On 5 Juli, 10:56, daGnutt <gnutt.halvords ...@gmail.comwr ote:
          It never fails!
          Just after posting the message I found a way to do this!
          >
          On 5 Juli, 10:51, daGnutt <gnutt.halvords ...@gmail.comwr ote:
          >
          I'm currently trying to write a vCal-interpreter, so that I can use a
          google-calendar to show upcoming, and recently performed events.
          >
          The issue that I have now, is that I wish to split up the vCal-info
          into blocks with data.
          What I'm after right now is a way to fetch the row-nums from a string
          where the rows are
          >
          First Occurence of
          BEGIN:VEVENT
          and then the first occurence of
          END:VEVENT
          >
          (So I can divide it into blocks)

          Comment

          • Richard

            #6
            Re: Creating a vCal-interpreter

            Why not "explode" at the ":" ?
            The date part will be the first chars in the second item of the array.
            Or is that too simple?

            If ($suggestion==" too_simple") then {
            give("more_deta ils");
            }

            R.

            ;)

            "daGnutt" <gnutt.halvords son@gmail.comwr ote in message
            news:1183647815 .934355.148770@ o61g2000hsh.goo glegroups.com.. .
            >I have tought about that, however the row that I want to extract this
            data from is among alot of other rows. Therefore I'm thinking in the
            rows of this
            >
            Perhaps writing up a reg-exp searchstuff (my head is tired right now)
            that searches for a row ex
            >
            (not sure that my regexp are right for five cents, so I'm mixing
            regexp with pseudo-code)
            ^DTSTART;[possibly "TZID=Europ e/Stockholm" OR "TZVALUE=DA TE"][data-to-
            be-extracted]$
            >
            can anyone help me?
            >
            On 5 Juli, 16:24, "Richard" <root@localhost wrote:
            >And?
            >Did you find the answer already? ;-)
            >>
            >Else try "explode".
            >>
            >R.
            >>
            >"daGnutt" <gnutt.halvords ...@gmail.comwr ote in message
            >>
            >news:118363663 0.140438.104700 @57g2000hsv.goo glegroups.com.. .
            >>
            New problem (I'm sure this one is really easy)
            In a string i have many rows, I want to extract some data from one of
            those rows
            >>
            Example:
            >>From the row "DTSTART;TZID=E urope/Stockholm:20070 603T190000"
            I wish to extract the value "20070603T19000 0" into an variable
            >>
            Example 2
            >>From the row "DTSTART;VALUE= DATE:20070616"
            I wish to extract the value "20070616"
            >>
            These two examples are the only two variants of which I wish to
            extract the information (at this point)
            >>
            Can anyone give me a quick fix?
            >>
            On 5 Juli, 10:56, daGnutt <gnutt.halvords ...@gmail.comwr ote:
            >It never fails!
            >Just after posting the message I found a way to do this!
            >>
            >On 5 Juli, 10:51, daGnutt <gnutt.halvords ...@gmail.comwr ote:
            >>
            I'm currently trying to write a vCal-interpreter, so that I can use
            a
            google-calendar to show upcoming, and recently performed events.
            >>
            The issue that I have now, is that I wish to split up the vCal-info
            into blocks with data.
            What I'm after right now is a way to fetch the row-nums from a
            string
            where the rows are
            >>
            First Occurence of
            BEGIN:VEVENT
            and then the first occurence of
            END:VEVENT
            >>
            (So I can divide it into blocks)
            >
            >

            Comment

            • daGnutt

              #7
              Re: Creating a vCal-interpreter

              I would then need to explode it at "\n" so that I would change the
              rows as well... And afaik (haven't tried yet) I don't think that
              explode would like regexps for delimiter.

              But I would be out sailing on the black sea here...

              On 5 Juli, 22:07, "Richard" <root@localhost wrote:
              Why not "explode" at the ":" ?
              The date part will be the first chars in the second item of the array.
              Or is that too simple?
              >
              If ($suggestion==" too_simple") then {
              give("more_deta ils");
              >
              }
              >
              R.
              >
              ;)
              >
              "daGnutt" <gnutt.halvords ...@gmail.comwr ote in message
              >
              news:1183647815 .934355.148770@ o61g2000hsh.goo glegroups.com.. .
              >
              I have tought about that, however the row that I want to extract this
              data from is among alot of other rows. Therefore I'm thinking in the
              rows of this
              >
              Perhaps writing up a reg-exp searchstuff (my head is tired right now)
              that searches for a row ex
              >
              (not sure that my regexp are right for five cents, so I'm mixing
              regexp with pseudo-code)
              ^DTSTART;[possibly "TZID=Europ e/Stockholm" OR "TZVALUE=DA TE"][data-to-
              be-extracted]$
              >
              can anyone help me?
              >
              On 5 Juli, 16:24, "Richard" <root@localhost wrote:
              And?
              Did you find the answer already? ;-)
              >
              Else try "explode".
              >
              R.
              >
              "daGnutt" <gnutt.halvords ...@gmail.comwr ote in message
              >
              >news:118363663 0.140438.104700 @57g2000hsv.goo glegroups.com.. .
              >
              New problem (I'm sure this one is really easy)
              In a string i have many rows, I want to extract some data from one of
              those rows
              >
              Example:
              >From the row "DTSTART;TZID=E urope/Stockholm:20070 603T190000"
              I wish to extract the value "20070603T19000 0" into an variable
              >
              Example 2
              >From the row "DTSTART;VALUE= DATE:20070616"
              I wish to extract the value "20070616"
              >
              These two examples are the only two variants of which I wish to
              extract the information (at this point)
              >
              Can anyone give me a quick fix?
              >
              On 5 Juli, 10:56, daGnutt <gnutt.halvords ...@gmail.comwr ote:
              It never fails!
              Just after posting the message I found a way to do this!
              >
              On 5 Juli, 10:51, daGnutt <gnutt.halvords ...@gmail.comwr ote:
              >
              I'm currently trying to write a vCal-interpreter, so that I can use
              a
              google-calendar to show upcoming, and recently performed events.
              >
              The issue that I have now, is that I wish to split up the vCal-info
              into blocks with data.
              What I'm after right now is a way to fetch the row-nums from a
              string
              where the rows are
              >
              First Occurence of
              BEGIN:VEVENT
              and then the first occurence of
              END:VEVENT
              >
              (So I can divide it into blocks)

              Comment

              Working...