download script

Discussion in 'iOS Jailbreak & Cydia' started by midiman6, Nov 1, 2007.

  1. midiman6

    midiman6 New Member

    Joined:
    Sep 20, 2007
    Messages:
    103
    Likes Received:
    0
    is it possible to make a terminal script that will download a file off the web and put it in a directory on my ipod?
  2. JeffS

    JeffS Member

    Joined:
    Oct 19, 2007
    Messages:
    52
    Likes Received:
    0
    Device:
    4G iPod touch
    yes, but I think you would have to find a port of wget for the ipod. I've written a few small shell scripts in the vt100 emulator that's available, and they work just fine. Doing what you want isn't hard, if the right tools are installed. I know on mine, they are not.

    BTW, is there a way, hopefully easy, to make a script show up in the launcher, so it can be tapped on, and executed?

    -Jeff
  3. midiman6

    midiman6 New Member

    Joined:
    Sep 20, 2007
    Messages:
    103
    Likes Received:
    0
    ok, I was able to find a binkit and downloaded the "curl" tool. It will let you download things.

    My goal here is to save rss feeds for offline viewing. I want a script that will re-download the xml file when I have internet.

    How do I make a script, what's the file extension?
  4. bjheyes

    bjheyes New Member

    Joined:
    Dec 26, 2007
    Messages:
    1
    Likes Received:
    0
    curl coding

    greetings...

    saw the post and was walking a similar path... i have written a basic curl script to suck in two webpages... to answer your question (re file extension).. there are million options here (perl, shell etc), but to keep it simple, write a basic shell script, give the filename a .sh extension (this is the default shell that the root user is running, type "ps" in the terminal window to see/confirm) and make sure you make the file executable, you can do this by running "chmod u+x" add execute for the user.

    for example, my script: MyDownloads.sh

    curl -s -f -o Essendon.html http://www.fitnessfirst.com.au/clubs/timetable/print/index_html?club_id=75&venue_id=1

    has the following file permissions:

    -rwx-r-x-r-x (I actually ran chmod a+x, which gives execute to all users, not just the owner), you can see the file permissions by running ls -l again from the terminal window.

    Note the above is standard NIX.

Share This Page