Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Internet > HTTP (WWW)

    ApeSmit 0.01

    Download button

    No screenshots available
    Downloads: 533  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Florian Diesch | More programs
    GPL / FREE
    May 15th, 2008, 14:37 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    ApeSmit description

    ApeSmit is a very simple Python module to create XML sitemaps as defined at http://www.sitemaps.org.

    ApeSmit is a very simple Python module to create XML sitemaps as defined at http://www.sitemaps.org. It doesnt contain any web spider or something like that, it just writes the data you provide to a file using the proper syntax.

    apesmit is an anagram of sitemap.

    Usage

    First we create an instance of SiteMap:

    >>> sm=Sitemap(changefreq='weekly')

    The changefreq keyword sets a default value for that parameter.

    Now we add some URL's to our sitemap:

    >>> sm.add('http://www.example.com/')

    We may use some parameters:

    >>> sm.add('http://www.example.com/news/', changefreq='daily',
    ... priority=1.0,
    ... lastmod='1891-1-1')


    There's a shortcut for URL's that changed today:

    >>> sm.add('http://www.example.org/about.html', lastmod='today')

    That's all for now. Next we need a file to write the sitemap in:

    >>> out=open('sitemap.xml', 'w')

    Now we write our sitemap and then close the file:

    >>> sm.write(out)
    >>> out.close()


    And that's the content of our shiny new sitemap:

    < ?xml version='1.0' encoding='UTF-8'? >
    < urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
    http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
    xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" >
    < url >
    < loc >http://www.example.com/< /loc >
    < changefreq >weekly< /changefreq >
    < /url >
    < url >
    < loc >http://www.example.com/news/< /loc >
    < lastmod >1891-1-1< /lastmod >
    < changefreq >daily< /changefreq >
    < priorit >1.0< /priority >
    < /url >
    < url >
    < loc >http://www.example.org/about.html< /loc >
    < lastmod >2008-04-03< /lastmod >
    < changefreq >weekly< /changefreq >
    < /url >
    < /urlset >


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    XML sitemaps | sitemaps genearator | Python library | Python | XML | sitemap

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM