Downloading media from Avalon¶
Use if you are trying to download video/audio files or if you need to pull down metadata stored on Avalon.
First method¶
This method requires that you have an API key and access to the access.library.tamu.edu server. It is faster than the second method.
Use this code
Install ffmpeg, paramiko, and python. (Instructions for download are in the code.)
Enter AVALON_API_KEY (your API key) and AVALON_HOST_URL. If pulling from Avalon Prod, it should look like
AVALON_HOST_URL = r'https://avalon.library.tamu.edu'
Enter SSH_HOSTNAME and SSH_PORT:
SSH_HOSTNAME = 'access.library.tamu.edu'
andSSH_PORT = 22
.Enter SSH_USERNAME and SSH_PASSWORD.
Enter AVALON_MOUNT PATH:
AVALON_MOUNT_PATH = '/mnt/avalon_prod'
. This will be different if you are pulling from Avalon Pre.Go to the collection and copy the string after the AVALON_HOST_URL.
In a terminal, run the program followed by the string from the AVALON_HOST_URL. For example:
python fetch-avalon-assets-by-collection 123456abcdef
Second method¶
This method requires that you have an API key.
Open mark_get_avalon_files.py. Make sure your API key is connected on Line 14.
Go to the collection and copy the string after https://avalon.library.tamu.edu.
Scroll to the bottom of the code, to the last paragraph. Paste the string for the variable
collection
. Underexample
, specify whether it is prod or pre.Create a folder where you would like the files downloaded to. Enter the file path under
example.download_best_files
.If you only want a spreadsheet with metadata taken from Avalon, comment out the lines related to downloading files.
Run the program by typing
python mark_get_avalon_files.py
into the terminal.