Wednesday, October 15, 2008

Dynamic FeedFlare using AppJet server side Javascript

Dynamic FeedFlares using AppJet server side Javascript


In this example, if the item category is "Music" then return a custom link, else show nothing.

AppJet

http://appjet.com/app/3454754/source

/* appjet:version 0.1 */

page.setMode("plain")

print(html("""<FeedFlare>
"""));

if (request.params.category) {

if (request.params.url) {

if (request.params.category=="Music") {

print(html("""<Text>Stream with BitLet</Text>
<Link href="http://www.bitlet.org/music/play?torrent="""
+request.params.url
+"""" />
"""));
}
}
}


print(html("""</FeedFlare>"""));


FeedFlare

http://pastebin.ca/raw/1227586

<FeedFlareUnit>
<Catalog>
<Title>BitLet Stream Music</Title>
<Description>Stream using BitLet.org if category is Music</Description>
</Catalog>
<DynamicFlare href="http://bitletfeedflarestreamif.appjet.net/?category=${a:category[1]/@term}&amp;url=${a:link[(@rel='enclosure')]/@href}"/>
</FeedFlareUnit>

Tuesday, October 14, 2008

FeedBurner and FeedFlare enclosure custom links

  1. Feed with embedded custom links

    1. FeedBurner

      Allows feeds to be displayed in HTML or compatible format.

    2. FeedFlare

      Adds custom links based on feed item information.

      Learn more about the FeedFlare API.

      FeedFlare testing scratchpad.
  2. Feed with BitTorrent enclosures

    1. Original

      http://friendfeed.com/rooms/opensciinfo-bittorrent?format=atom

    2. Output

      http://feeds.feedburner.com/opensciinfo/bittorrent

    3. Example display

       http://wiki.opensci.info/bittorrent

  3. Add and configure feed

    Enable from optimize menu

    1. SmartCast

      1. Increases compatibility with various podcast or multimedia enclosures. Use default options.
    2. SmartFeed

      1. Some feed readers prefer certain versions of RSS and Atom.
  4. FeedFlare

    An XML snippet that uses feed item values to create custom links in the description.

    FeedFlares can be added directly from a URL and applied to any feed.

      1. BitLet

        BitLet Download

        Browser based Java applet to download torrent files

        http://pastebin.ca/raw/1226774

        <FeedFlareUnit>
        <Catalog>
        <Title>BitLet Download</Title>
        <Description>A link to download enclosure BitTorrent file using BitLet.org</Description>
        </Catalog>
        <FeedFlare>
        <Text>BitLet Download</Text>

        <Link href="http://www.bitlet.org/download?torrent=${a:link[(@rel='enclosure')]/@href}"/>
        </FeedFlare>
        </FeedFlareUnit>

      2. BitLet stream

        BitLet Stream

        Browser based Java applet to stream mp3 and ogg music files

        http://pastebin.ca/raw/1226829

        <FeedFlareUnit>
        <Catalog>
        <Title>BitLet Stream</Title>
        <Description>Stream music from BitTorrent file using BitLet.org</Description>
        </Catalog>
        <FeedFlare>
        <Text>BitLet Stream</Text>
        <Link href="http://www.bitlet.org/music/play?torrent=${a:link[(@rel='enclosure')]/@href}"/>
        </FeedFlare>
        </FeedFlareUnit>

      3. BitLet stream dynamic

        More about dynamic FeedFlare

        BitLet Stream
        Browser based Java applet to stream mp3 and ogg music files, link appears for posts in the category "Music

        http://pastebin.ca/raw/1227586

        <FeedFlareUnit>
        <Catalog>
        <Title>BitLet Stream Music</Title>
        <Description>Stream using BitLet.org if category is Music</Description>
        </Catalog>
        <DynamicFlare href="http://bitletfeedflarestreamif.appjet.net/?category=${a:category[1]/@term}&amp;url=${a:link[(@rel='enclosure')]/@href}"/>
        </FeedFlareUnit>

      4. TorrentRelay

        TorrentRelay Download
        Server processes the torrent and lets the user download the files like regular web downloads

        http://pastebin.ca/raw/1226765

        <FeedFlareUnit>
        <Catalog>
        <Title>TorrentRelay Download</Title>
        <Description>A link to download the BitTorrent enclosure files using TorrentRelay.com</Description>
        </Catalog>
        <FeedFlare>
        <Text>TorrentRelay Download</Text>
        <Link href="http://www3.torrelay.com/fresh/online.pl?url=${a:link[(@rel='enclosure')]/@href}" />
        </FeedFlare>
        </FeedFlareUnit>

      5. TorrentRelay mobile

        TorrentRelay Mobile Download
        Provides a slimmer web page format for downloading the torrent on mobile device browsers

        http://pastebin.ca/raw/1226785

        <FeedFlareUnit>
        <Catalog>
        <Title>TorrentRelay Mobile Download</Title>
        <Description>A link to download an enclosure BitTorrent file using TorrentRelay.com mobile download.</Description>
        </Catalog>
        <FeedFlare>
        <Text>TorrentRelay Mobile Download</Text>
        <Link href="http://www3.torrelay.com/fresh/online.pl?url=${a:link[(@rel='enclosure')]/@href}&amp;ajax_uploader=yes"/>
        </FeedFlare>
        </FeedFlareUnit>
      6. ImageShack

        ImageShack Download
        Provides a web page to download the torrent files, requires free registration.

        http://pastebin.ca/raw/1227565
        <FeedFlareUnit>
        <Catalog>
        <Title>ImageShack Download</Title>
        <Description>A link to download an enclosure BitTorrent file using ImageShack.com torrent download.</Description>
        </Catalog>
        <FeedFlare>
        <Text>ImageShack Download</Text>
        <Link href="http://tor.imageshack.us/tor/?andthen=1&amp;url=${a:link[(@rel='enclosure')]/@href}&amp;submit=GO&amp;action=geturl"/>
        </FeedFlare>
        </FeedFlareUnit>