====== Overview ====== All the scripts used in the Du Bois digitization project are available in: ''r:/credo/utilities'' All the scripts are in [[http://www.python.org/|Python]] and available as standalone Windows executables that can run on any Windows system with minimal steps to install or as source python files, which require the Python interpreter and several libraries. ''r:/credo/utilities'' contains a folder for each script. In that folder is a ''README.txt'' that describes the usage of the script, though each script is also described on the Wiki. There is also a ''scriptname.exe'' file that is the standalone executable of the script and a ''src'' folder for all the original Python source. Currently, there are seven utilities available: * [[quality_control#mods|mods]] (checking and manipulating MODS records) * [[quality_control#checkimages|checkimages]] (checking scanned images) * [[quality_control#image_view|image_view]] (spot-checking MODS and scans in a Web interface) * [[benchmarking#countfiles|countfiles]] (counting files for benchmarking) * [[misc_tools#stripids|stripids]] (creating a list of IDs from search results) * [[misc_tools#extract|extract]] (extracting an converting images and MODS records) * [[mods_search#ingest|ingest]] (adding and updating MODS records in the mods-search database) Information about installing and running both the executables and the source is below... ====== Installation & Use ====== ===== Install Script Executables ===== All the executables live in ''r:/credo/metadata/utilities/scriptname.''// To install...// *Copy the ''scriptname.exe'' file to your c:\Temp directory. Make sure you copy only and keep the original version in the ''r:/credo/metadata/utilities'' directory. *Put in a ticket with the Systems department to move the .exe file to the c:\Windows folder. ===== Use Script Executables ===== To use the scripts do the following... *Open the command prompt. You can use the standard Windows one, or a nice alternative is [[http://sourceforge.net/projects/console/files/|Console2]] *Once in the command prompt navigate to the drive where the files you want to manipulate live (e.g. //y: cd \scans\dubois_scanning\staging\box112//) *Use the script by typing the name of the script at the command prompt followed by the appropriate options and/or arguments: e.g. Y:\scans\dubois_scanning\staging\box112> mods -h . **note:** The period at the end is the argument that tells it to apply the script to that directory. ===== Source ===== To run the source python files, it's necessary to install the Python interpreter. I prefer [[http://www.activestate.com/activepython/downloads|Active Python]] for Windows. The following libraries will also need to be installed: * [[http://lxml.de/|LXML]] (XML library for Python) Installation could be as simple as typing ''>pypm install lxml'' assuming you have Active Python installed. * [[http://www.pythonware.com/products/pil/|Python Imaging Library (PIL)]] (Manipulating images and converting formats) * [[http://code.google.com/p/apsw/|ASPW]] (Library for interacting with SQLite databases). This is necessary to run the mods-search and image_view scripts from source. Other smaller libraries are included with the source files of the scripts that depend on them. To run python scripts, first enter the command line and navigate into the source directory, type ''python'' and the script name: >python /path/to/mods.py -h If you've made changes to the original source and feel compelled to compile new executables, I use the [[http://www.py2exe.org/|py2exe]] library. The ''setup.py'' files used to create the executables are in the ''src'' folder for each script. Install py2exe and run ''python setup.py py2exe'' and away you go.