Ignore:
Timestamp:
Jun 21, 2015, 4:33:54 AM (4 years ago)
Author:
larryv@…
Message:

pypi.tcl: New livecheck type for PyPI

Uses PyPI's DOAP records. What's XML/RDF good for, if not parsing?

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/livecheck/pypi.tcl

    r137818 r137833  
    11# $Id$
    22#
    3 # This file contains the defaults for gnome.
     3# This file contains the livecheck defaults for PyPI.
    44
    55if {${livecheck.name} eq "default"} {
    6     set livecheck.name ${name}
     6    if {[exists python.rootname]} {
     7        livecheck.name [option python.rootname]
     8    } else {
     9        livecheck.name ${name}
     10    }
    711}
    812if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
    9     set livecheck.url "http://ftp.gnome.org/pub/GNOME/sources/${livecheck.name}/cache.json"
     13    livecheck.url \
     14            https://pypi.python.org/pypi?:action=doap&name=${livecheck.name}
    1015}
    1116if {${livecheck.regex} eq ""} {
    12     set livecheck.regex {LATEST-IS-(\\d+\\.\\d*[02468](?:\\.\\d+)*)}
     17    livecheck.regex {<revision>(.+)</revision>}
    1318}
    1419set livecheck.type "regex"
Note: See TracChangeset for help on using the changeset viewer.