...
4. Install other stuff you need
Final result: These packages installed onto your computer
- virtualenv
- virtualenwrapper
- imagemagick
- dcraw
Virtualenv
Run the following :
...
Code Block |
---|
brew install dcraw |
5. Create a directory for the importation code
Using the Terminal, you can create and move into 'directories'. This is just creating and moving into folders on your computer using the command line. For simplicity's sake, we're going to create a folder directly in your documents called bhutan-import.
First, navigate into your Documents folder by running the following command in the Terminal:
Code Block |
---|
cd Documents |
Now make your new directory, bhutan-import, by running:
Code Block |
---|
mkdir bhutan-import |
Now navigate into the new directory:
Code Block |
---|
cd bhutan-import |
If you open up Finder, you'll see there's a folder called 'bhutan-import' in your Documents.
6. Get the importation code and XML files
Run this code to clone the importation code into bhutan-import.
Code Block |
---|
git clone https://github.com/samchrisinger/mandala-bii.git |
A file mandala-bii will show up in bhutan-import once the code is cloned.
Contact Sam Chrisinger, who will link you to an .xml file from Box. Download the file, then put it inside the mandala-bii file that you created in the previous step. You can use the good ol' click and drag method, no need to use the Terminal!
Save the file name for later.
7. Set up the virtual environments
Back in the Terminal, run:
Code Block |
---|
virtualenv venv |
Then run:
Code Block |
---|
source venv/bin/activate |
8. Set up the importation code
Enter the mandala-bii directory by running the following:
Code Block |
---|
cd mandala-bii |
Then run:
Code Block |
---|
pip install -r requirements.txt |
9. Run the importer
Code Block |
---|
python import.py -s MediaPro -x "XML File Name.xml" -c KEY=VALUE -i "/Image Uploads/Bhutan/Bhutan Year 5/XML File Name" -u https://images.shanti.virginia.edu/admin/content/bulk_image_import/api -v -cid 619101 -cv -cw ImageMagick --ftp --ftp_user YOUR_BOX_USER --ftp_pass YOUR_BOX_PASS |