Menu

#4977 Get the latest english-only realses's URL

4.4.11
open
None
Normal
2015-07-09
2015-07-07
No

Up to now it was possible to parse SF's RSS feed and get the latest english ZIP.
Could you please advise how to get that URL now?

Discussion

  • Szépe Viktor

    Szépe Viktor - 2015-07-07
    wget -qO- "https://www.phpmyadmin.net/downloads/"|grep -m1 -o 'href="https://files.phpmyadmin.net/phpMyAdmin/.*/phpMyAdmin-.*-english.tar.xz"'|cut -d'"' -f2
    

    It is not the most beautiful piece of code.

     
  • Michal Čihař

    Michal Čihař - 2015-07-09
    • assigned_to: Michal Čihař
     
  • Szépe Viktor

    Szépe Viktor - 2015-07-09

    Thank you Michal!

    I am sorry to report that https://www.phpmyadmin.net/files/feed/ contains no URL-s.
    One would end up parsing a HTML page again: https://www.phpmyadmin.net/files/*/

    As for the JSON file: Do you mean that https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-english.tar.xz will be available in every upcoming release?

     

    Last edit: Szépe Viktor 2015-07-09
  • Michal Čihař

    Michal Čihař - 2015-07-09

    I can add the file URLs as well, are you aware of some standard way to do that?

    For shell parsing, the .txt format is probably better than JSON: https://www.phpmyadmin.net/home_page/version.txt

     
  • Szépe Viktor

    Szépe Viktor - 2015-07-09

    My second choice is the GitHub API in JSON also. But it contains no English-only release file.
    https://api.github.com/repos/phpmyadmin/phpmyadmin/tags

    Thank you very much for the text version.
    Would it be possible to list all release files in it? E.g. the English-only one.

     
  • Michal Čihař

    Michal Čihař - 2015-07-09

    We can not add other files there as it's consumed by script which does not handle anything else than this one. But I think DOAP is probably best, it has everything you need.

     
  • Szépe Viktor

    Szépe Viktor - 2015-07-09

    Thank you.
    Only the namespace should be altered, then:

    sed '0,/xmlns=/s//xmlns:doap=/' phpmyadmin-doap.xml \
    | xmlstarlet sel -t -v '(/Project/release/Version/file-release[contains(@rdf:resource,"-english.tar.xz")]/@rdf:resource)[1]'
    
     

    Last edit: Szépe Viktor 2015-07-09
  • Szépe Viktor

    Szépe Viktor - 2015-07-09

    Or

    sed -n '0,/^.*<file-release rdf:resource="\(\S\+-english.zip\)" \/>.*$/s//\1/p' phpmyadmin-doap.xml
    
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.