Transcript
  • PythonDownloadScriptInstructions–usewith.csvor.metalinkfiles, v.1

    Purpose:Usersoftenliketodownloadthemetadataformultipleproductsfromasearchthensortandeliminatesomeoftheproductsbeforedownloading.Thisscriptallowsyoutodownloadonlythedatayoudecidetokeep.

    Ifyouwanttodownloadallitemsinyourqueue,usethebuttoninthe lower left of the download queuewindow. Using this option automatically loads the scriptwithallitemsinthequeue.InstructionsforusingthisbulkdownloadoptioncanbeviewedHERE.

    Requirementsforuse:•Earthdatalogincredentials•Mac,Windows,orLinux•Python2.6.5,2.7.5,or3.0o

    PythoncomesinstalledwithMacOSX§ToupgradeonMac•

    https://www.python.org/downloads/oSeeinstallationtipsbelowo

    Windowsuserswillhavetodownloadandinstallit.§https://www.python.org/downloads/windows/•

    Seeinstallationtipsbelow

    Steps:1. CreateacsvormetalinkfileConductasearchinVertexandaddproductsfromthesearchresultsintoyourdownloadqueue.Createacsvormetalinkfilebyclickingeithertheorthebuttonlocatedatthebottomofthedownloadqueuewindow.

    1

    https://bulk-download.asf.alaska.edu/helphttps://bulk-download.asf.alaska.edu/helphttps://bulk-download.asf.alaska.edu/help

  • 2. Sorttheproducts(optional)Youcanopenthe.csv(spreadsheet)or.metalink(texteditor)fileandsortthedata,deleting productrowsthatyoudon’twanttodownload.However,donotdeleteanycolumns–all columnsmustberetainedforthescripttowork.

    3. GetthescriptDownloadthebulk_download.pyscript tothesamedirectoryasthe csvor metalinkfile.

    https://bulk-download.asf.alaska.edu/

    4. Runthescripta. OpenaCommandwindow(Windows)oraTerminalwindow(Mac).

    ForWindows7• ClicktheStartMenubuttoninthebottomleftcornerofthescreen

    • Typecmdinthe“Searchprogramsandfiles”boxand

    • CommandlinewindowandpromptForWindows10• ClickontheStartmenubutton(Windowsicon)andtypecmd

    2

  • ForMacOSX•• Highlight“Applications”intheFavoriteslist• TypeTerminalintheSearchbox• Double-clicktoopen

    b. Atthepromptenteroneofthesecommands,dependingonwhetheryoudownloadeda.csvor.metalinkfile:Substituteyourfile nameforfilename

    python bulk_download.py filename.csv python bulk_download.py filename.metalink

    c. Ifyouarenotalreadyloggedin,youwillbepromptedtologinwithyourEarthdata Logincredentials.

    d. Downloadwillbegin.

    AppendixInstructionsforInstalling Python

    InstallingPythonforMacOSX

    1. Gotohttps://www.python.org/downloads/andclickonthe button

    3

    ClickontheFindericoninthetoolbar

  • 2. Openthedownloadedfile(*.pkg)

    3. ThePythonInstallerwindowopens.Click

    4. Click

    4

  • 5. Click

    6. Clicktoagreetothelicenseagreement

    7. Click

    8. Click

    9. Ifprompted,enteryourusernameandpasswordtoallowtheinstallationtoproceed

    10. Installationbegins

    11. Installationiscomplete

    5

  • InstallingPythonforWindows

    1. Gotohttps://www.python.org/downloads/release/python-352/

    2. DownloadtheappropriateWindowsexecutableinstallerfilea. Windowsx86-64fora64-bitoperatingsystemb. Windowsx86fora32-bitoperatingsystem

    6

  • 3. Openthedownloadedfile4. IntheInstallPython2.5.2window,makesurethe“Installlauncherforallusers”and

    “AddPython3.5toPATH”boxesarechecked.Clickon“InstallNow”

    5. Ifprompted,allowchangestobemadetothecomputer6. Installationbegins

    7

  • 7. Installationiscomplete

    8

    UntitledUntitled


Recommended