Loading ...
Sorry, an error occurred while loading the content.

Expand Messages
  • srkbuh
    All: I m working with Andrew Grumet (http://grumet.net/weblog/) on his RSS +BitTorrent tool (http://grumet.net/rssBitTorrentIntegration/radioClient.html) So
    Message 1 of 15 , Mar 16, 2004
    • 0 Attachment
      All:

      I'm working with Andrew Grumet (http://grumet.net/weblog/) on his RSS
      +BitTorrent tool
      (http://grumet.net/rssBitTorrentIntegration/radioClient.html) So
      far, much fun couched with much
      disappointment. I've discovered an unexplainable difference between
      OS versions in how Radio handles enclosures.

      Sample RSS file: http://legaltorrents.com/rss.xml

      Subscribe to sample in Radio for Windows and it downloads the
      enclosures without issue. Subscribe to sample in either Radio for
      MacOS Classic or MacOS X and horrible looping failure occurs. The
      Mac versions will loop *forever* trying to download the enclosure,
      failing somewhere after getting the enclosure filename and saving it
      to a local directory. The issue specifically seems to stem from one
      or two areas: multiple periods in a filename or HTTP server
      application type.

      I have been through the code at radio.aggregator.downloadEnclosures
      and understand how the filenames for downloading are gathered. It's
      at this point that Radio for the Mac chokes and spews the error
      message into the log.

      Can anyone with direct knowledge of the Radio internals for
      downloadEnclosures help? This is the lynchpin for BitTorrent
      integration for Mac users.

      Any takers?

      Steve Kirks


      http://houseofwarwick.com/stories/bitTorrentToolNotes.html
    • Marc Barrot
      ... Actually Steve, the issue is probably with the length of the file names provided in the bittorrent sample feed. [1]
      Message 2 of 15 , Mar 16, 2004
      • 0 Attachment
        --- In radio-dev@yahoogroups.com, "srkbuh" <srk@m...> wrote:
        > The issue specifically seems to stem from one
        > or two areas: multiple periods in a filename or HTTP server
        > application type.

        Actually Steve, the issue is probably with the length of the file
        names provided in the bittorrent sample feed. [1]

        'observatory-online-archives-vol-1.zip.torrent' is a pretty long file
        name. It gets even longer when you consider that the full path name
        including the enclosures download folder is in itself pretty long.

        I don't know if there is a name length limit as far as MacOS 9 or X
        are concerned, but I know that the kernalized version of 'file.new'
        which is called by the 'file.writeWholeFile' function inside
        'radio.aggregator.downloadEnclosures' chokes under MacOS X when passed
        the full path name to the bittorrent sample file, whereas it works
        fine when passed a shorter file name such as 'foo.zip.torrent' for
        instance.

        Since you should be working in the pre download callback anyway, the
        work around is to modify the downloaded file name so that its
        length becomes shorter than the OS limit, whatever that may be.

        HTH

        Marc

        1: http://www.legaltorrents.com/rss.xml
      • Matt Mower
        Hi, ... Just to echo what Marc says. We ve had to work around this problem in K-Collector where, even though MacOS X can handle the arbitrary file name
        Message 3 of 15 , Mar 17, 2004
        • 0 Attachment
          Hi,

          Marc Barrot wrote:

          > --- In radio-dev@yahoogroups.com, "srkbuh" <srk@m...> wrote:
          >
          >>The issue specifically seems to stem from one
          >>or two areas: multiple periods in a filename or HTTP server
          >>application type.
          >
          >
          > Actually Steve, the issue is probably with the length of the file
          > names provided in the bittorrent sample feed. [1]
          >

          Just to echo what Marc says. We've had to work around this problem in
          K-Collector where, even though MacOS X can handle the arbitrary file
          name lengths, Frontier chokes on them.

          Regards,

          Matt
          --
          Evectors Software
          Email:matt@... Web:http://www.evectors.com
          Tel:+44-(0)7977-076-709 Blog:http://matt.blogs.it/
        • Steve Kirks
          ... Matt and Marc: Thanks for the support--I knew it had to be something simple. A very nice person named Marcus Miller sent me some code to fix
          Message 4 of 15 , Mar 17, 2004
          • 0 Attachment
            On Mar 17, 2004, at 4:35 AM, Matt Mower wrote:

            > Just to echo what Marc says. We've had to work around this problem in
            > K-Collector where, even though MacOS X can handle the arbitrary file
            > name lengths, Frontier chokes on them.

            Matt and Marc:

            Thanks for the support--I knew it had to be something simple. A very
            nice person named Marcus Miller sent me some code to fix
            radio.aggregator.downloadEnclosures and a companion script that handles
            the filenames better. I'll implement them on my test Mac and report
            the results back to the group.

            Related question: does Frontier/Mac have any MacOS X native verbs list
            sys.unixShellCommand that can return the *Unix* path to a file or
            folder?

            Steve Kirks
            http://houseofwarwick.com/

            this email is: [ ] blogable [ x ] ask first [ ] private
          • Steve Kirks
            ... All: Does anyone on the list have direct experience with the callback for aggregator.downloadEnclosures? I m reading the code and it seems that the
            Message 5 of 15 , Mar 17, 2004
            • 0 Attachment
              > On Mar 17, 2004, at 4:35 AM, Matt Mower wrote:
              >
              >> Just to echo what Marc says. We've had to work around this problem in
              >> K-Collector where, even though MacOS X can handle the arbitrary file
              >> name lengths, Frontier chokes on them.

              All:

              Does anyone on the list have direct experience with the callback for
              aggregator.downloadEnclosures? I'm reading the code and it seems that
              the callback is really triggered *before* the download code instead of
              after. If this is the case, I can embed the code I recieved from
              Marcus Mauller in the tool and skip the inherent filename issue.

              Post an email if you can verify if the callback is a callforward or
              not....


              Steve Kirks
              http://houseofwarwick.com/

              this email is: [ ] blogable [ x ] ask first [ ] private
            • Steve Kirks
              semi-private --like hospital rooms, eh? For those who want to follow along with me on this project via something called the world wide web :
              Message 6 of 15 , Mar 17, 2004
              • 0 Attachment
                "semi-private"--like hospital rooms, eh?

                For those who want to follow along with me on this project via
                something called the "world wide web":

                http://houseofwarwick.com/stories/bitTorrentToolNotes.html

                Steve
                this email is: [ ] cool [ x ] kuul [ ] rad [ ] semi-private

                On Mar 17, 2004, at 8:56 AM, jt wrote:

                > I have no direct experience in this, but just wanted to post a Thanks!
                > to
                > all for all the Efforts. (Sometimes a "flame" like this is of a small
                > value, dunno in this case...)
                >
                > Happy St. Pat's, as well...:-D
                >
                > this email is: [ ] blogable [ ] ask first [ x ] semi-private [
                > ]
                > private
                >
                >
                > | -----Original Message-----
                > | From: Steve Kirks [mailto:srk@...]
                > | Sent: Wednesday, March 17, 2004 8:35 AM
                >
                > | All:
                > |
                > | Does anyone on the list have direct experience with the callback for
                > | aggregator.downloadEnclosures? I'm reading the code and it seems
                > that
                > | the callback is really triggered *before* the download code instead
                > of
                > | after. If this is the case, I can embed the code I recieved from
                > | Marcus Mauller in the tool and skip the inherent filename issue.
                > |
                > | Post an email if you can verify if the callback is a callforward or
                > | not....
                > |
                > |
                > | Steve Kirks
                > | http://houseofwarwick.com/
                > |
                > | this email is: [ ] blogable [ x ] ask first [ ] private
                >
                >
                >
                >
                >
                > ------------------------ Yahoo! Groups Sponsor
                > ---------------------~-->
                > Upgrade to 128-bit SSL Security!
                > http://us.click.yahoo.com/LPJzrA/yjVHAA/TtwFAA/nhFolB/TM
                > ---------------------------------------------------------------------
                > ~->
                >
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
                Steve Kirks
                http://houseofwarwick.com/

                this email is: [ ] blogable [ x ] ask first [ ] private
              • jt
                I have no direct experience in this, but just wanted to post a Thanks! to all for all the Efforts. (Sometimes a flame like this is of a small value, dunno
                Message 7 of 15 , Mar 17, 2004
                • 0 Attachment
                  I have no direct experience in this, but just wanted to post a Thanks! to
                  all for all the Efforts. (Sometimes a "flame" like this is of a small
                  value, dunno in this case...)

                  Happy St. Pat's, as well...:-D

                  this email is: [ ] blogable [ ] ask first [ x ] semi-private [ ]
                  private


                  | -----Original Message-----
                  | From: Steve Kirks [mailto:srk@...]
                  | Sent: Wednesday, March 17, 2004 8:35 AM

                  | All:
                  |
                  | Does anyone on the list have direct experience with the callback for
                  | aggregator.downloadEnclosures? I'm reading the code and it seems that
                  | the callback is really triggered *before* the download code instead of
                  | after. If this is the case, I can embed the code I recieved from
                  | Marcus Mauller in the tool and skip the inherent filename issue.
                  |
                  | Post an email if you can verify if the callback is a callforward or
                  | not....
                  |
                  |
                  | Steve Kirks
                  | http://houseofwarwick.com/
                  |
                  | this email is: [ ] blogable [ x ] ask first [ ] private
                • jt
                  Heh...;-D Google-cache owns my butt and yours, so how private can something to a listserve BE in actuality??? (I m not sure.. just a beginner on a lotta this
                  Message 8 of 15 , Mar 17, 2004
                  • 0 Attachment
                    Heh...;-D Google-cache owns my butt and yours, so how private can something
                    to a listserve BE in actuality??? (I'm not sure.. just a beginner on a
                    lotta this technology. I assume Yahoo has similar cache, and then there's
                    the Wayback Machine.)

                    And... Uhhhh.... I'm of the meme that it's spelt "kewl". To each their
                    own, 'course, as regional dialects differ...;-D Thx for Efforts AND Links,
                    which I saw Iirc, but may not.


                    | -----Original Message-----
                    | From: Steve Kirks [mailto:srk@...]
                    | Sent: Wednesday, March 17, 2004 9:11 AM
                    | To: radio-dev@yahoogroups.com
                    | Subject: Re: [radio-dev] MacOS X, long filenames and
                    | aggregator.downloadEnclosures
                    |
                    |
                    | "semi-private"--like hospital rooms, eh?
                    |
                    | For those who want to follow along with me on this project via
                    | something called the "world wide web":
                    |
                    | http://houseofwarwick.com/stories/bitTorrentToolNotes.html
                    |
                    | Steve
                    | this email is: [ ] cool [ x ] kuul [ ] rad [ ] semi-private
                    |
                  • Marc Barrot
                    Let s try to keep on topic in this thread :-) Steve: the scripts (or addresses of scripts) placed in user.radio.callbacks.downloadEnclosure are indeed called
                    Message 9 of 15 , Mar 17, 2004
                    • 0 Attachment
                      Let's try to keep on topic in this thread :-)

                      Steve: the scripts (or addresses of scripts) placed in
                      user.radio.callbacks.downloadEnclosure are indeed called before the
                      code in radio.aggregator.downloadEnclosures tries to download anything
                      by itself.

                      Remember your callback script may not be the only one in the
                      downloadEnclosure callback stack, so you should still test for the
                      prior existence of the file before attempting to download it.

                      Since you will have to work around the filename length limit, I would
                      recommend you try to place your script at the top of the stack, by
                      using an entry name starting with '__' for instance.

                      Lawrence and Jake: upon further investigation, file.new chokes under
                      MacOS X on *file names* with a length strictly greater than 32,
                      whatever the size of the whole pathname parameter.

                      I think the reason is there used to be a 32 characters length limit to
                      file names under MacOS before vs X. This limit is now history. I guess
                      this is worth another entry in the Userland bug database, in the
                      unlikely event it is not already there :-)

                      Cheers

                      Marc
                    • Marc Barrot
                      ... Can you rephrase your question, stating what your aim is exactly ? There are several possible answers to that one. Cheers Marc
                      Message 10 of 15 , Mar 17, 2004
                      • 0 Attachment
                        --- In radio-dev@yahoogroups.com, Steve Kirks <srk@m...> wrote:
                        > Related question: does Frontier/Mac have any MacOS X native verbs list
                        > sys.unixShellCommand that can return the *Unix* path to a file or
                        > folder?

                        Can you rephrase your question, stating what your aim is exactly ?
                        There are several possible answers to that one.

                        Cheers

                        Marc
                      • Eric Soroos
                        ... No, But I ve got some code for it around here somewhere. There are a couple of corner cases where it can t figure out if you re on the boot drive or not,
                        Message 11 of 15 , Mar 17, 2004
                        • 0 Attachment
                          On Mar 17, 2004, at 7:56 AM, Marc Barrot wrote:

                          > --- In radio-dev@yahoogroups.com, Steve Kirks <srk@m...> wrote:
                          >> Related question: does Frontier/Mac have any MacOS X native verbs
                          >> list
                          >> sys.unixShellCommand that can return the *Unix* path to a file or
                          >> folder?
                          >
                          > Can you rephrase your question, stating what your aim is exactly ?
                          > There are several possible answers to that one.

                          No, But I've got some code for it around here somewhere. There are a
                          couple of corner cases where it can't figure out if you're on the boot
                          drive or not, but other than that it's pretty good.

                          I'll see if I can dig it up.

                          eric
                        • Steve Kirks
                          ... First, a clarification: the phrase above should be native verbs like Second: I may have a way around this based on my last post. Sorry for the list
                          Message 12 of 15 , Mar 17, 2004
                          • 0 Attachment
                            On Mar 17, 2004, at 9:56 AM, Marc Barrot wrote:

                            > --- In radio-dev@yahoogroups.com, Steve Kirks <srk@m...> wrote:
                            >> Related question: does Frontier/Mac have any MacOS X native verbs
                            >> list
                            >> sys.unixShellCommand that can return the *Unix* path to a file or
                            >> folder?
                            >
                            > Can you rephrase your question, stating what your aim is exactly ?
                            > There are several possible answers to that one.
                            >

                            First, a clarification: the phrase above should be "native verbs like"

                            Second: I may have a way around this based on my last post.

                            Sorry for the list shotgunning...

                            Steve Kirks
                            http://houseofwarwick.com/

                            this email is: [ ] blogable [ x ] ask first [ ] private
                          • Eric Soroos
                            ... http://gems.wiredfool.com/M2Unix.fttb eric
                            Message 13 of 15 , Mar 17, 2004
                            • 0 Attachment
                              >> --- In radio-dev@yahoogroups.com, Steve Kirks <srk@m...> wrote:
                              >>> Related question: does Frontier/Mac have any MacOS X native verbs
                              >>> list
                              >>> sys.unixShellCommand that can return the *Unix* path to a file or
                              >>> folder?
                              >>
                              >> Can you rephrase your question, stating what your aim is exactly ?
                              >> There are several possible answers to that one.
                              >
                              > No, But I've got some code for it around here somewhere. There are a
                              > couple of corner cases where it can't figure out if you're on the boot
                              > drive or not, but other than that it's pretty good.
                              >
                              > I'll see if I can dig it up.

                              http://gems.wiredfool.com/M2Unix.fttb

                              eric
                            • Marc Barrot
                              ... Given the path variable, you can use file.fileToUrl with a twist: unixPath = /Volumes/ + file.fileToUrl (path) - file:/// Be careful when passing
                              Message 14 of 15 , Mar 17, 2004
                              • 0 Attachment
                                --- In radio-dev@yahoogroups.com, Steve Kirks <srk@m...> wrote:
                                > On Mar 17, 2004, at 9:56 AM, Marc Barrot wrote:
                                > does Frontier/Mac have any MacOS X native verbs like
                                > sys.unixShellCommand that can return the *Unix* path to a file or
                                > folder?

                                Given the path variable, you can use file.fileToUrl with a twist:

                                unixPath = "/Volumes/" + file.fileToUrl (path) - "file:///"

                                Be careful when passing unixPath to the shell, you need to either
                                include it within "double quotes" in your shell command, or escape all
                                spaces ' ' with backslashes first: '\ '.

                                The "/Volumes/" trick is MacOS X specific of course.

                                HTH

                                Marc
                              • steve harley
                                ... it might be simplest to just let AppleScript do it for you: get the Unix path form of a traditional Macintosh path, mac_path: conversion_script =
                                Message 15 of 15 , Mar 17, 2004
                                • 0 Attachment
                                  at 2004-03-17, 8:24 AM -0800, they whom i call Eric Soroos wrote:
                                  >On Mar 17, 2004, at 7:56 AM, Marc Barrot wrote:
                                  >
                                  >> --- In radio-dev@yahoogroups.com, Steve Kirks <srk@m...> wrote:
                                  >>> Related question: does Frontier/Mac have any MacOS X native verbs
                                  >>> list
                                  > >> sys.unixShellCommand that can return the *Unix* path to a file or
                                  >>> folder?
                                  > >
                                  > > Can you rephrase your question, stating what your aim is exactly ?
                                  > > There are several possible answers to that one.
                                  >
                                  >No, But I've got some code for it around here somewhere. There are a
                                  >couple of corner cases where it can't figure out if you're on the boot
                                  >drive or not, but other than that it's pretty good.

                                  it might be simplest to just let AppleScript do it for you:

                                  get the "Unix path" form of a traditional Macintosh path, mac_path:

                                  conversion_script = "osascript -e 'quoted form of posix path of
                                  alias \"" + mac_path +"\"'"
                                  unix_path = sys.unixShellCommand (conversion_script)

                                  get the traditional Macintosh form of a "Unix path", unix_path
                                  (should coerce to Unicode text instead of string, but Radio
                                  can't handle that):

                                  convert_script = "osascript -e 'posix file \"" + unix_path + "\" as string"
                                  mac_path = sys.unixShellCommand (convert_script)

                                  --
                                  steve harley
                                Your message has been successfully submitted and would be delivered to recipients shortly.