Labelmaker
Code for generating herbarium voucher specimen labels from a specially-formatted CSV file.
Install / Use
/learn @wundalous/LabelmakerREADME
labelmaker
This repository contains code for generating herbarium voucher specimen labels from a specially-formatted CSV file. Especially useful if you need to write a bunch of labels for your plant collections, but don't have access to an existing herbarium database, or to the tools your local herbarium uses to generate labels. This solution is simple and easy to use, but is a work in progress, so bug reports are appreciated.
TO USE:
- Ensure Python (version 3.0 or higher) is installed on your computer. If not, install it. A convenient way to install Python is installing Anaconda, which includes the most recent Python distribution, and has versions available for use on Windows, MacOS, or Linux. You will also need to install the pystache Python package, which can be installed by typing the following command into the terminal (after installing Python): pip install pystache
- Download the whole Labelmaker repository, ensuring you save all of its contents in the same folder.
- Create a CSV (comma-separated value) file containing your label data. Use any spreadsheet software (such as MS Excel, Google Sheets, and OpenOffice Calc) to do this. Ensure that all field names (column headings) are the same as in the sample CSV file provided in the repository (sample_input_file.csv). Note: Labelmaker will automatically italicize the contents of the fields genus, specificEpithet, and infraspecificEpithet. If you want to include italicized text in other fields, the current version requires you to put the HTML italics tags
<i></i>around the text to be italicized. For example, an entry for ecology might read "Growing in loamy soil in shady spruce-fir forest with<i>Aconitum columbianum</i>." - Save the CSV file in the same folder as the repository files. (Let's say you name it 'MyLabels.csv'.)
- Once you've written the content of your labels, run Labelmaker by opening a terminal window, navigating to the folder in which you've saved the repository files and your CSV file, and typing the following: python v3labelmaker.py -i MyLabels. Make sure to type in just the name of the CSV file, without the '.csv' file extension, otherwise the program will look for a file called MyLabels.csv.csv. Hit 'Enter' to run the program.
- If run successfully, Labelmaker will give you no feedback. To verify that the program worked, check the contents of the directory you've been working in. There should now be files called MyLabels.json and MyLabels.html.
- Open MyLabels.html in a browser. Each label will appear to be the whole width of the page on your screen. When you print the page or view it in print preview, however, the labels will be resized so that six will fit on one page, in two columns of three.
- Print the page from the browser.
Related Skills
pestel-analysis
Analyze political, economic, social, technological, environmental, and legal forces
orbit-planning
O.R.B.I.T. - strategic project planning before you build. Objective, Requirements, Blueprint, Implementation Roadmap, Track.
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
31PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
