Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
pip install -r requirements.txt

9. Create a collection

In Mandala, create a collection or subcollection to house the images you're importing. As you do this, check the URL in the collections editor. This lets you find the collection id, which you'll need to direct the import to that collection. For example, for the Chuma Laptse collection, I can go into the editor and see the URL is https://images.shanti.virginia.edu/node/1419391/edit, so the collection id is 1419391. 

Info
iconfalse
titleSave for later:

The collection id.

10. Run the importer

Use the following code, with some substitutions: 

  • XML_FILE_NAME is the name of the file you downloaded in step 6. Please make sure you've moved this file to the mandala-bii folder, or the importation will fail!
  • KEY and VALUE are codes you obtained in step 2. 
  • YOUR_BOX_USER is your box username, which should be your UVa email address
  • YOUR_BOX_PASS is the password you created in step 1. 
  • Bhutan Year X needs /IMAGE/FILE/PATH needs to be replaced with the year the path to the files in UVaBox. 
  • COLLECTION_ID is the id of the collection where you're importing (ex: Bhutan Year 4). This should match the xml file. The folder structure needs to be identical to what's on Box, so refer back to the original folder to check this.  the images. 

Code Block
languagetext
python import.py -s MediaPro -x "XML_FILE_NAME.xml" -c KEY=VALUE -i "/Image UploadsIMAGE/Bhutan/Bhutan Year X/XML_FILE_NAMEFILE/PATH" -u https://images.shanti.virginia.edu/admin/content/bulk_image_import/api -v -cid 619101COLLECTION_ID -cv -cw ImageMagick --ftp --ftp_user YOUR_BOX_USER --ftp_pass YOUR_BOX_PASS

...