stefan pushed a commit to branch master.

http://git.enlightenment.org/admin/release-management.git/commit/?id=4a7f65ef4873d70abc28607df0e3a4965103e1a7

commit 4a7f65ef4873d70abc28607df0e3a4965103e1a7
Author: Stefan Schmidt <s.schm...@samsung.com>
Date:   Tue Apr 21 18:41:43 2015 +0200

    distro_version_fetching: Allow for fetching versions for all parts we want 
tracked
    
    Still work in progress but at least we can now define different urls, etc 
for all
    the parts we want to keep track of. We also output markdown syntax for the 
table
    now.
    
    Next step is to fill more distros for the automated fetched and bring the 
table in
    shape for putting the generated output into the wiki.
---
 distributions_versions_fetch_script.py | 123 ++++++++++++++++++++++-----------
 1 file changed, 84 insertions(+), 39 deletions(-)

diff --git a/distributions_versions_fetch_script.py 
b/distributions_versions_fetch_script.py
index 2ebef53..985d00e 100755
--- a/distributions_versions_fetch_script.py
+++ b/distributions_versions_fetch_script.py
@@ -18,6 +18,8 @@ def grep_version_string(repo_listing, pkg_name_prefix):
        return None
 
 def scrap_page(url, xpath, pkg_name_prefix):
+       if url is "":
+               return "-"
        html_page = requests.get(url)
        tree = html.fromstring(html_page.text)
        html_text = tree.xpath(xpath)[0] # use first node
@@ -28,47 +30,90 @@ def main():
        print "**Last Updated: " + str(datetime.date.today()) + "**"
 
        distributions_data  = [
-                                                       #("Debian 6.0.10", 
"https://tracker.debian.org/pkg/efl";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""),
-                                                       #("Debian 7.8", 
"https://tracker.debian.org/pkg/efl";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""),
-                                                       ("Debian in 
development", "https://tracker.debian.org/pkg/efl";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""),
-                                                       #("Ubuntu 14.04 (LTS)", 
"https://launchpad.net/ubuntu/vivid/amd64/libecore-con1/1.8.6-2.1ubuntu1";, 
"//*[@id=\"portlet-details\"]/div/dl[1]/dd/text()", ""),
-                                                       #("Ubuntu 14.10", 
"https://launchpad.net/ubuntu/vivid/amd64/libecore-con1/1.8.6-2.1ubuntu1";, 
"//*[@id=\"portlet-details\"]/div/dl[1]/dd/text()", ""),
-                                                       ("Ubuntu in 
development", 
"https://launchpad.net/ubuntu/vivid/amd64/libecore-con1/1.8.6-2.1ubuntu1";, 
"//*[@id=\"portlet-details\"]/div/dl[1]/dd/text()", ""),
-                                                       #("Fedora 21", 
"https://apps.fedoraproject.org/packages/efl";, 
"//*[@id=\"package-info-bar\"]/div[1]/div[2]/text()", ""),
-                                                       #("Fedora 22", 
"https://apps.fedoraproject.org/packages/efl";, 
"//*[@id=\"package-info-bar\"]/div[1]/div[2]/text()", ""),
-                                                       ("Fedora in 
development", "https://apps.fedoraproject.org/packages/efl";, 
"//*[@id=\"package-info-bar\"]/div[1]/div[2]/text()", ""),
-                                                       #("Bodhi 3.0", "", "", 
""),
-                                                       #("Bodhi in 
development", "", "", ""),
-                                                       ("Elive", 
"http://repository.elivecd.org/pool/efl/libe/libefl/";, 
"/html/body/pre/a/text()[starts-with(.,'libefl1_')]", "libefl1_"),
-                                                       ("Arch", 
"https://www.archlinux.org/packages/extra/x86_64/efl/";, 
"/html/body/div[@id=\"content\"]/div[@id=\"pkgdetails\"]/h2/text()", "efl "),
-                                                       #("Arch AUR", 
"https://www.archlinux.org/packages/extra/x86_64/efl/";, 
"/html/body/div[@id=\"content\"]/div[@id=\"pkgdetails\"]/h2/text()", "efl "),
-                                                       #("openSUSE 13.1 
(LTS)", "http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       ("openSUSE 13.2", 
"http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       #("openSUSE 
Tumbleweed", "http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       #("openSUSE 
Development", "http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       #("openSUSE Weekly 
Build", "http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       ("Gentoo", 
"https://packages.gentoo.org/package/dev-libs/efl";, 
"//td[@class=\"ebuild\"][2]/text()", ""),
-                                                       #("Linux Mint", "", "", 
""),
-                                                       #("Mageia", "", "", ""),
-                                                       #("Cent OS", "", "", 
""),
-                                                       #("RHEL", "", "", ""),
-                                                       #("Windows / Win-builds 
1.5", "", "", ""),
-                                                       #("Mac OSX / 
homewbrew", "http://braumeister.org/formula/efl";, 
"//*[@id=\"basic\"]/h2[1]/div/strong/text()", ""),
-                                                       ("Tizen:Common", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ACommon&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       ("Tizen:Mobile", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3AMobile&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       ("Tizen:Wearable", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3AWearable&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       ("Tizen:TV", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ATV&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       #("Tizen:IVI", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3AIVI&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       #("OE/Yocto", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ACommon&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       #("FreeBSD", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ACommon&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
-                                                       #("Buildroot", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ACommon&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-")
-                                                       ]
+               ("Debian 6.0.10", "", "", "", "", "", "", "", "", "", "", "", 
"", "", "", "", "", "", ""),
+               ("Debian 7.8", "", "", "", "", "", "", "", "", "", "", "", "", 
"", "", "", "", "", ""),
+               ("Debian in development", "https://tracker.debian.org/pkg/efl";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""
+                                       , 
"https://tracker.debian.org/pkg/elementary";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""
+                                       , 
"https://tracker.debian.org/pkg//evas-loaders";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""
+                                       , "", "", ""
+                                       , "https://tracker.debian.org/pkg/e17";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""
+                                       , 
"https://tracker.debian.org/pkg/terminology";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""
+                                       ),
+               #("Ubuntu in development", 
"https://launchpad.net/ubuntu/vivid/amd64/libecore-con1/1.8.6-2.1ubuntu1";, 
"//*[@id=\"portlet-details\"]/div/dl[1]/dd/text()", ""),
+               #("Fedora in development", 
"https://apps.fedoraproject.org/packages/efl";, 
"//*[@id=\"package-info-bar\"]/div[1]/div[2]/text()", ""),
+               #("Elive", 
"http://repository.elivecd.org/pool/efl/libe/libefl/";, 
"/html/body/pre/a/text()[starts-with(.,'libefl1_')]", "libefl1_"),
+               #("Arch", 
"https://www.archlinux.org/packages/extra/x86_64/efl/";, 
"/html/body/div[@id=\"content\"]/div[@id=\"pkgdetails\"]/h2/text()", "efl "),
+               #("openSUSE 13.2", 
"http://download.opensuse.org/update/13.2/x86_64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
+               #("Gentoo", "https://packages.gentoo.org/package/dev-libs/efl";, 
"//td[@class=\"ebuild\"][2]/text()", ""),
+               #("Tizen:Common", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ACommon&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
+               #("Tizen:Mobile", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3AMobile&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
+               #("Tizen:Wearable", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3AWearable&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
+               #("Tizen:TV", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ATV&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ]
+
+       distributions_data_static  = [
+               ("Upstream", "https://www.enlightenment.org/download";, 
"//*[@id=\"dtracker-package-left\"]/div[1]/div[2]/ul/li[2]/div[2]/text()", ""),
+               ("Ubuntu 14.04 (LTS)", 
"https://launchpad.net/ubuntu/vivid/amd64/libecore-con1/1.8.6-2.1ubuntu1";, 
"//*[@id=\"portlet-details\"]/div/dl[1]/dd/text()", ""),
+               ("Ubuntu 14.10", 
"https://launchpad.net/ubuntu/vivid/amd64/libecore-con1/1.8.6-2.1ubuntu1";, 
"//*[@id=\"portlet-details\"]/div/dl[1]/dd/text()", ""),
+               ("Fedora 21", "https://apps.fedoraproject.org/packages/efl";, 
"//*[@id=\"package-info-bar\"]/div[1]/div[2]/text()", ""),
+               ("Fedora 22", "https://apps.fedoraproject.org/packages/efl";, 
"//*[@id=\"package-info-bar\"]/div[1]/div[2]/text()", ""),
+               ("Bodhi 3.0", "", "", ""),
+               ("Bodhi in development", "", "", ""),
+               ("Arch AUR", 
"https://www.archlinux.org/packages/extra/x86_64/efl/";, 
"/html/body/div[@id=\"content\"]/div[@id=\"pkgdetails\"]/h2/text()", "efl "),
+               ("openSUSE 13.1", 
"http://download.opensuse.org/update/13.1/x86_64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ("openSUSE Tumbleweed", 
"http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ("openSUSE Development", 
"http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ("openSUSE Weekly Build", 
"http://download.opensuse.org/ports/update/13.2/aarch64/";, 
"/html/body/pre/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ("Linux Mint", "", "", ""),
+               ("Mageia", "", "", ""),
+               ("Cent OS", "", "", ""),
+               ("RHEL", "", "", ""),
+               ("Windows / Win-builds 1.5", "", "", ""),
+               ("Mac OSX / homewbrew", "http://braumeister.org/formula/efl";, 
"//*[@id=\"basic\"]/h2[1]/div/strong/text()", ""),
+               ("Tizen:IVI", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3AIVI&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ("OE/Yocto", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ACommon&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ("FreeBSD", 
"https://build.tizen.org/package/binaries?package=efl&project=Tizen%3ACommon&repository=x86_64-x11";,
 "//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-"),
+               ("Buildroot", "//git.buildroot.org/buildroot/tree/package/efl", 
"//*[@id=\"content\"]/div/ul//li/a/text()[starts-with(., 'efl-')]", "efl-")
+               ]
+
+       print("Table with automatically fetched versions:\n")
+       print("| **Distro / Platform** | **EFL** | **Elementary** | **Evas 
Generic Loaders** | **Emotion Generic Players** | **Enlightenment** | 
**Terminology** |")
+       print("| **Latest Releases** | **1.13.2** | **1.13.2** | **1.13.2** | 
**1.13.0** | **0.19.4** | **0.8.0** |")
        for param_set in distributions_data:
                distri = param_set[0]
-               url = param_set[1]
-               xpath = param_set[2]
-               pkg_name_prefix = param_set[3]
-               print "%s: %s" % (distri, scrap_page(url, xpath, 
pkg_name_prefix))
+               efl_url = param_set[1]
+               efl_xpath = param_set[2]
+               efl_pkg_name_prefix = param_set[3]
+               elm_url = param_set[4]
+               elm_xpath = param_set[5]
+               elm_pkg_name_prefix = param_set[6]
+               evas_url = param_set[7]
+               evas_xpath = param_set[8]
+               evas_pkg_name_prefix = param_set[9]
+               emotion_url = param_set[10]
+               emotion_xpath = param_set[11]
+               emotion_pkg_name_prefix = param_set[12]
+               e_url = param_set[13]
+               e_xpath = param_set[14]
+               e_pkg_name_prefix = param_set[15]
+               term_url = param_set[16]
+               term_xpath = param_set[17]
+               term_pkg_name_prefix = param_set[18]
+               print ("| %s | [[%s | %s]] | [[%s | %s]] | [[%s | %s]] | [[%s | 
%s]] | [[%s | %s]] | [[%s | %s]]|") % (distri,
+                                                               efl_url, 
scrap_page(efl_url, efl_xpath, efl_pkg_name_prefix),
+                                                               elm_url, 
scrap_page(elm_url, elm_xpath, elm_pkg_name_prefix),
+                                                               evas_url, 
scrap_page(evas_url, evas_xpath, evas_pkg_name_prefix),
+                                                               emotion_url, 
scrap_page(emotion_url, emotion_xpath, emotion_pkg_name_prefix),
+                                                               e_url, 
scrap_page(e_url, e_xpath, e_pkg_name_prefix),
+                                                               term_url, 
scrap_page(term_url, term_xpath, term_pkg_name_prefix)
+                                                               )
+
+       print("\nTable with manually tracked versions:\n")
+       print("| **Distro / Platform** | **EFL** | **Elementary** | **Evas 
Generic Loaders** | **Emotion Generic Players** | **Enlightenment** | 
**Terminology** |")
+       print("| **Latest Releases** | **1.13.2** | **1.13.2** | **1.13.2** | 
**1.13.0** | **0.19.4** | **0.8.0** |")
+       for param_set in distributions_data_static:
+               distri = param_set[0]
+               print("| %s | - | - | - | - | - | - |") % (distri)
 
 if __name__ == '__main__':
        main()

-- 


Reply via email to