Latest Houdini builds on FTP

   11125   8   2
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
Hi. I'm wonder, why there is no latest houdini builds on SideFx FTP server?

I'd like to automate downloading/installing new builds.As far as i know, there is no direct links to houdini builds?


Thx :roll:
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
181 posts
Joined: Feb. 2013
Offline
Here's a thought - SESI's xml feed contains links for recent daily builds:

http://www.sidefx.com/download/buildfeed.php?release=daily_stable [sidefx.com]

Maybe you could parse that feed for the latest build number and download address.



Then retrieve the link for the newest build on your target platform:



Links seem to follow a pattern like this:

http://www.sidefx.com/index.php?&Itemid=208&page=license&version=13.0&build=310&platform=linux_x86_64_gcc4.4&format=tar.gz [sidefx.com]

This isn't a full solution, but might be of some use in developing your automation system.
User Avatar
Member
7733 posts
Joined: July 2005
Offline
I second parsing the RSS.
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
Thanks guys for reply. Yes, i can parse RSS no problem, but there is no direct link to build. That's the problem.

Chronon, with webbrowser.open() it's working, but requires running xserver and browser.

:?
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
7733 posts
Joined: July 2005
Offline
Stalkerx777
Thanks guys for reply. Yes, i can parse RSS no problem, but there is no direct link to build. That's the problem.

I don't understand. The direct link is exactly the URL posted in the RSS entries, eg. the second URL that Chronon posted.

To download a file using python, use urllib2, eg.
http://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http-using-python [stackoverflow.com]
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
Edward, i have tried this first. But this it's not working, it's just getting PHP page…
I think this is because of authentication. Need to login first. Need to find a way of doing that properly within python….
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
181 posts
Joined: Feb. 2013
Offline
Another route might be to try standalone utilities like Curl or Wget. They can help reveal the steps necessary to authenticate and transfer data.

This sample shell script shows how curl can submit form data, store cookies, and initiate downloads.

#!/bin/sh
#
# This sample script demonstrates how the cURL utility can download Side Effects
# software. It requires a valid sidefx.com username and password, and creates
# a temporary web cookie called “cookie.txt”.
#
# 2014-02-04

# Provide a valid Side Effects name and password:

sidefx_name=MrMasamitsuNiitani
sidefx_pass=FancySalami

# Compile application build details; build number changes frequently.
# For the latest build number, query the RSS feed at:
# http://www.sidefx.com/download/buildfeed.php?release=daily_stable [sidefx.com]

version=13.0
build=288
platform=linux_x86_64_gcc4.6
format=tar.gz
saved_file=“houdini_$version_$build.$format”

# Save some shortcuts to common sidefx.com addresses:

login_page="http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=login [sidefx.com]“
license_terms=”http://www.sidefx.com/components/com_download/accept_terms.php [sidefx.com]“
dailies=”http://www.sidefx.com/index.php?option=com_download&Itemid=208 [sidefx.com]“

# Navigate to download destination. Disposable cookie will also appear here:

cd ~/Desktop

# Provide login credentials, save resulting cookie to text file:

echo ”Attempting to log in as ‘$sidefx_name…’\n“
curl -b cookies.txt -c cookies.txt -s -d ”login=Login In&autologin=on&username=$sidefx_name&password=$sidefx_pass“ $login_page
curl -b cookies.txt -c cookies.txt -s $dailies

# Almost ready to download. Must accept license terms at least once.
# Assemble all the variables and submit as a form.
# If everything is complete, the download will begin immediately:

echo ”\n\nAttempting to fetch Houdini version $version, build $build…\n“

curl -b cookies.txt -c cookies.txt -d ”terms_menu=Accept&submit=Continue&always_accept=on&version=$version&build=$build&platform=$platform&format=$format" $license_terms -o $saved_file

If successful, the file transfer should begin promptly:


http://curl.haxx.se [curl.haxx.se]
https://www.gnu.org/software/wget/ [gnu.org]
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
Thanks Chronon! Very nice solution with curl. I'l keep an eye on it. Now i'm trying to login within python. I'l post a link to my solution, when i'm done! 8)

P.S.
But i still don't understand why not to put latest production(at least) build on FTP? Is it so hard, sesi?
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
1 posts
Joined: Dec. 2017
Offline
Hi,
here is an updated version:

#!/bin/sh

# SideFx login credentialsd:
sidefx_name="<USERNAME>"
sidefx_pass="<PASSWORD>"

#-------------------------------------
sidefx_url="https://www.sidefx.com"
login_page="${sidefx_url}/login/"
download_page="${sidefx_url}/download/houdini-for-linux/get/"

# get csrf token and csrf cookie:
echo "getting middleware token..."
csrf=`curl -s -b cookies -c cookies -s $sidefx_url | grep csrfmiddlewaretoken | sed -n "s/^.*value='\(.*\)'.*$/\1/p" | head -n1`

# Provide login credentials, save resulting cookies to text file:
echo "Logging in..."
curl -s -b cookies -c cookies --data-urlencode "password=$sidefx_pass" --data-urlencode "username=$sidefx_name" -d "submit=Login%20In&csrfmiddlewaretoken=$csrf&next=%2F" -H "Origin: ${sidefx_url}" -H "Referer: ${sidefx_url}/" $login_page

# open download page and follow redirect to CDN
echo "downloading..."
curl -b cookies -c cookies -O -J -L $download_page

# clean up
rm cookies
echo "Done"
  • Quick Links