Terminal Code for Naming Facsimiles

This documentation is intended for experienced encoders. It presupposes that you have the basic skills and knowledge required to work in the command line. If you do not yet have this experience, please email lemdo@uvic.ca for guidance.

Rationale

In the process of naming and storing your facsimile images, you can use terminal code in place of some repetitive tasks. Terminal code is executed from the command line.
This documentation contains two important commands: one for converting unusable file formats into .jpg format, and one for naming a set of images according to LEMDO standards. These commands work by treating your images as a set, eliminating the need to modify each one individually.

Prepare Your Images

Complete the following tasks before running terminal codes in the command line:
Download each of your facsimile images individually.
Place your images in one folder.
Ensure that your images appear in the correct order within the folder.
Name your folder according to LEMDO’s facsimile naming convention, which is Work_Sigla_Library_Copy. For more detailed information on our naming protocol, see Name and Store Facsimiles.
Always create a backup of your folder before running any commands to account for potential errors.

Step-by-Step: Use Terminal Code to Convert Images

In the command line, navigate to the folder containing your facsimiles using the cd command. You can also drag and drop your folder into the command line to insert its path automatically.
Copy and paste this command: for f in *.file; do sips -s format jpeg "$f" --out "${f%.file}.jpg" && rm "$f"; done.
Replace both instances of the phrase .file with your current image format (e.g. .tif, .jp2, .png, etc.).
Press enter.
You should see the conversion happen within Terminal. Once the files have finished processing, double check that they have been converted correctly by refreshing your folder.

Step-by-Step: Use Terminal Code to Batch Rename Images

In the command line, navigate to the folder containing your facsimiles using the cd command. You can also drag and drop your folder into the command line to insert its path automatically.
Ensure your images are saved in .jpg format. The command will not work otherwise.
Copy and paste this command: i=1 for f in *.jpg; do printf -v num "%03d" "$i" mv "$f" "filename_$num.jpg" ((i++)) done .
Replace the phrase filename_ with your folder name (e.g., Ham_Q1_BL). Do not delete the final underscore.
Replace the number “3” in %03d with the maximum number of digits you will need to number all of your images. To figure out how many digits you need, find the total number of images in your folder and then add one. For example, if you have 100 images in total, you will need 4 digits, so you will replace the “3” in %03d with “4”.
Press enter.
You will not be able to see this transformation happen within Terminal. Refresh your folder to make sure your images have been named correctly. Ensure each image has at least one preceding zero and is not missing any underscores.

Prosopography

Janelle Jenstad

Janelle Jenstad is a Professor of English at the University of Victoria, Director of The Map of Early Modern London, and Director of Linked Early Modern Drama Online. With Jennifer Roberts-Smith and Mark Beatrice Kaethler, she co-edited Shakespeare’s Language in Digital Media: Old Words, New Tools (Routledge). She has edited John Stow’s A Survey of London (1598 text) for MoEML and is currently editing The Merchant of Venice (with Stephen Wittek) and Heywood’s 2 If You Know Not Me You Know Nobody for DRE. Her articles have appeared in Digital Humanities Quarterly, Elizabethan Theatre, Early Modern Literary Studies, Shakespeare Bulletin, Renaissance and Reformation, and The Journal of Medieval and Early Modern Studies. She contributed chapters to Approaches to Teaching Othello (MLA); Teaching Early Modern Literature from the Archives (MLA); Institutional Culture in Early Modern England (Brill); Shakespeare, Language, and the Stage (Arden); Performing Maternity in Early Modern England (Ashgate); New Directions in the Geohumanities (Routledge); Early Modern Studies and the Digital Turn (Iter); Placing Names: Enriching and Integrating Gazetteers (Indiana); Making Things and Drawing Boundaries (Minnesota); Rethinking Shakespeare Source Study: Audiences, Authors, and Digital Technologies (Routledge); and Civic Performance: Pageantry and Entertainments in Early Modern London (Routledge). For more details, see janellejenstad.com.

Joey Takeda

Joey Takeda is LEMDO’s Consulting Programmer and Designer, a role he assumed in 2020 after three years as the Lead Developer on LEMDO.

Mahayla Galliford

Project manager, 2025-present; research assistant, 2021-present. Mahayla Galliford (she/her) graduated with a BA (Hons with distinction) from the University of Victoria in 2024. Mahayla’s undergraduate research explored early modern stage directions and civic water pageantry. Mahayla continues her studies through UVic’s English MA program and her SSHRC-funded thesis project focuses on editing and encoding girls’ manuscripts, specifically Lady Rachel Fane’s dramatic entertainments, in collaboration with LEMDO.

Martin Holmes

Martin Holmes has worked as a developer in the UVic’s Humanities Computing and Media Centre for over two decades, and has been involved with dozens of Digital Humanities projects. He has served on the TEI Technical Council and as Managing Editor of the Journal of the TEI. He took over from Joey Takeda as lead developer on LEMDO in 2020. He is a collaborator on the SSHRC Partnership Grant led by Janelle Jenstad.

Navarra Houldin

Training and Documentation Lead 2025–present. LEMDO project manager 2022–2025. Textual remediator 2021–present. Navarra Houldin (they/them) completed their BA with a major in history and minor in Spanish at the University of Victoria in 2022. Their primary research was on gender and sexuality in early modern Europe and Latin America. They are continuing their education through an MA program in Gender and Social Justice Studies at the University of Alberta where they will specialize in Digital Humanities.

Sofia Spiteri

Sofia Spiteri is currently completing her Bachelor of Arts in History at the University of Victoria. During the summer of 2023, she had the opportunity to work with LEMDO as a recipient of the Valerie Kuehne Undergraduate Research Award (VKURA). Her work with LEMDO primarily includes semi-diplomatic transcriptions for The Winter’s Tale and Mucedorus.

Tracey El Hajj

Junior Programmer 2019–2020. Research Associate 2020–2021. Tracey received her PhD from the Department of English at the University of Victoria in the field of Science and Technology Studies. Her research focuses on the algorhythmics of networked communications. She was a 2019–2020 President’s Fellow in Research-Enriched Teaching at UVic, where she taught an advanced course on Artificial Intelligence and Everyday Life. Tracey was also a member of the Map of Early Modern London team, between 2018 and 2021. Between 2020 and 2021, she was a fellow in residence at the Praxis Studio for Comparative Media Studies, where she investigated the relationships between artificial intelligence, creativity, health, and justice. As of July 2021, Tracey has moved into the alt-ac world for a term position, while also teaching in the English Department at the University of Victoria.

Orgography

LEMDO Team (LEMD1)

The LEMDO Team is based at the University of Victoria and normally comprises the project director, the lead developer, project manager, junior developers(s), remediators, encoders, and remediating editors.

Metadata