website/zcc.html in zcc-0.1.0 vs website/zcc.html in zcc-0.2.0

- old
+ new

@@ -31,188 +31,239 @@ <div id="main"> <h1>zcc</h1> <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/zcc"; return false'> <p>Get Version</p> - <a href="http://rubyforge.org/projects/zcc" class="numbers">0.1.0</a> + <a href="http://rubyforge.org/projects/zcc" class="numbers">0.2.0</a> </div> <h1>&#x2192; &#8216;zcc&#8217;</h1> + <h2>What</h2> - <p>Z Copy Cataloging is a command line tool written in Ruby to make your <span class="caps">MARC</span> record copy cataloging faster and more accurate. The &#8216;Z&#8217; may stand for Zippy if you really want it to.</p> + <p>Z Copy Cataloging is a command line tool written in Ruby to make your <span class="caps">MARC</span> record copy cataloging faster and more accurate. The &#8216;Z&#8217; may stand for zippy if you really want it to.</p> - <h1><strong>THIS IS <em>alpha</em> SOFTWARE. <span class="caps">IT MIGHT MANGLE YOUR MARC AND CORRUPT YOUR CATALOG</span>.</strong></h1> + <h1><strong><span class="caps">THIS IS</span> beta <span class="caps">SOFTWARE</span>. IT <span class="caps">MIGHT MANGLE YOUR MARC AND CORRUPT YOUR CATALOG</span>.</strong> +I call it beta because I care about your data.</h1> + + <h2>Requirements</h2> + <p><a href="http://ruby-lang.org/">Ruby</a> 1.8</p> - <p><a href="http://www.indexdata.dk/yaz/">YAZ</a> I suggest adding the indexdata repositories for your distro (Debian or Redhat) and installing that way. <del>From a footnote to ruby-zoom: If you build from source, make sure you pass the&#8212;enable-shared option to the configure script before building <span class="caps">YAZ</span>, by default it does not build shared libraries required by Ruby/ZOOM.</del></p> + <p><a href="http://www.indexdata.dk/yaz/"><span class="caps">YAZ</span></a> I suggest adding the indexdata repositories for your distro (Debian or Redhat) and installing that way. <del>From a footnote to ruby-zoom: If you build from source, make sure you pass the&#8212;enable-shared option to the configure script before building <span class="caps">YAZ</span>, by default it does not build shared libraries required by Ruby/ZOOM.</del></p> <h3>Gems</h3> + <pre syntax="ruby">sudo gem install zcc marc zoom unicode highline term-ansicolor</pre> - <p><a href="http://www.textualize.com/ruby_marc">ruby-marc</a></p> - <p>Linux? <span class="caps">ZCC</span> has only been tested on Linux (Debian Etch). It probably won&#8217;t work under other operating systems, but hopefully works with different distros. Feedback is appreciated on how it functions under other operating systems. I&#8217;m willing to try to make it work if there is enough interest.</p> - <p>The gems bin folder must be added to your <span class="caps">PATH</span>. For me it is /var/lib/gems/1.8/bin</p> + <p>The gems bin folder must be added to your <span class="caps">PATH</span>. For me it is /var/lib/gems/1.8/bin or /usr/bin</p> <h2>Repository</h2> + <p>A new gem is super easy to release to rubyforge, so expect that the gem on rubyforge is up-to-date for working features, though not necessarily for small changes. If you want to build the gem yourself, it will also be super easy once you set things up.</p> <p>To make sure you have all the dependencies needed to build the gem:</p> <pre syntax="ruby">$ sudo gem install newgem --include-dependencies</pre> + <p>Grab the latest from the svn repository:</p> -<pre syntax="ruby">$ svn co svn://208.78.97.122/zcc</pre> +<pre syntax="ruby">$ svn checkout svn://rubyforge.org/var/svn/zcc/zcc/trunk</pre> + <p>To build and install the gem as a user most easily, the user must be added to the sudoers list. On my system I do this by running visudo as root. For more information on sudoers and possible settings that may be more secure consult: <a href="http://www.gratisoft.us/sudo/man/sudoers.html">Sudoers Manual</a></p> <p>You can add the following lines using visudo:</p> <pre syntax="ruby">Cmnd_Alias GEM=/usr/bin/gem user ALL=GEM</pre> + <p>Now as a user you can build and install the gem on your own system:</p> <pre syntax="ruby">$ cd zcc $ rake local_deploy</pre> + + <p>or just</p> + + +<pre syntax="ruby"> $ rake install_gem</pre> + <p>For more tasks take a look at the output of:</p> <pre syntax="ruby">$ rake -T </pre> + <h2>Features</h2> - <p><strong>Z39.50 search for records.</strong> Configure <span class="caps">ZCC</span> for as many targets as you like grouped in order of preference. A relatively current list of targets is provided based on the targettest list (examples/zservers.yaml). If you find the perfect record with the first target other targets do not have to be searched.</p> + <p><strong><span class="caps">Z39</span>.50 search for records.</strong> Configure <span class="caps">ZCC</span> for as many targets as you like grouped in order of preference. A relatively current list of targets is provided in proper yaml format based on the <a href="http://targettest.indexdata.com/">targettest list</a> (see examples/zservers.yaml). Searches are grouped so if you find the perfect record with the first batch of targets other targets do not have to be searched. Include your preferred zservers in a lower group to get better quality records faster.</p> - <p><strong>Search by Title, <span class="caps">ISBN</span> or <span class="caps">LCCN</span></strong> Currently three searches are supported. From the same prompt you may search either by Title, <span class="caps">ISBN</span> or <span class="caps">LCCN</span> (with dash).</p> + <p><strong>Search by Title, <span class="caps">ISBN</span> or <span class="caps">LCCN</span></strong> Currently three searches are supported. From the same prompt you may search either by Title, <span class="caps">ISBN</span> (no dashes) or <span class="caps">LCCN</span> (with dash).</p> - <p><strong>Sort your result sets by relevancy (title search only), date, content (AACR, <span class="caps">ISBD</span>), or any chosen subfield (first instance only).</p> + <p><strong>Sort your result sets by relevancy (title search only and on by default), date, content (AACR, <span class="caps">ISBD</span>), or any chosen subfield (first instance only).</p> - <p></strong>See the most important fields for copy cataloging when choosing correct records.* In the initial list view <span class="caps">ZCC</span> presents the user with the full 245 (title and statement of responsibility) and 300 (extent, which includes page numbers). This gives you a quick way to determine potential records. The fields displayed is configurable as of the 0.1.0 release.</p> + <p></strong>See the most important fields for copy cataloging when choosing correct records.* In the initial list view <span class="caps">ZCC</span> presents the user with the full 245 (title and statement of responsibility) and 300 (extent, which includes page numbers). This gives you a quick way to determine potential records. The fields displayed is configurable as of the 0.1.0 release so you may include whatever</p> - <p><strong>View the full <span class="caps">MARC</span> record before choosing.</strong> ZCC allows you to see the full <span class="caps">MARC</span> record in a pretty line format. <span class="caps">ZCC</span> does not hide <span class="caps">MARC</span> from you, even as ugly as it can be.</p> + <p><strong>View the full <span class="caps">MARC</span> record before choosing.</strong> ZCC allows you to see the full <span class="caps">MARC</span> record in a pretty line format. <span class="caps">ZCC</span> does not hide <span class="caps">MARC</span> from you, even as ugly as it can be. If there&#8217;s only one record in your result set then you see the full record.</p> - <p><strong>Compare two records and choose the best.</strong> ZCC compares field by field (ie line by line) for matched fields. You can quickly see what fields come from which record. The comparison is similar to the way diff works. Matches between records are denoted with an &#8216;m&#8217; while one record is denoted with a plus-sign and the other with a minus-sign. <span class="caps">TODO</span>: a curses interface may allow for color coding differences.</p> + <p><strong>Compare two records and choose the best.</strong> ZCC compares field by field (ie line by line) for matched fields. You can quickly see what fields come from which record. The comparison is similar to the way diff works. Matches between records are denoted with an &#8216;m&#8217; while one record is denoted with a plus-sign and the other with a minus-sign. <span class="caps">TODO</span>: improvements would allow for color coding differences.</p> + <p><strong>Optional: Check the record for common errors.</strong> If you have Perl&#8217;s <span class="caps">MARC</span>::Lint installed you can see if all your indicators have proper values and only repeatable fields repeat. An added feature is determining what encoding level (ISBD, <span class="caps">AACR2</span>) the record is in.</p> - <p><strong>Choose records from different targets and then choose among them to find the best record.</strong> In the end you may just want one record and you want the best one. All the same features available for each target are also available for all the records chosen from all targets, so users can pick the best record for their location. View the full records, compare two records, and optionally lint records. This allows you to choose possible records quickly from various targets and then make a final decision later on.</p> + <p><strong>Choose records from different targets and then choose among them to find the best record.</strong> In the end you may just want one record and you want the best one. All the same features available for each target are also available for all the records chosen from all targets, so users can pick the best record for their location. This is called the winnowing stage. View the full records, compare two records, and optionally lint records. This allows you to choose possible records quickly from various targets and then make a final decision later on. Choose all the records, none of them or just one for processing.</p> - <p><strong>Scripted changes to records.</strong> ZCC is highly configurable for making scripted changes to each record like macros. Want to delete all 852 or 9XX fields from a record before importing into your library system? <span class="caps">ZCC</span> can do that and more. Add fields and subfields with pre-determined information or prompt for information. The previous examples are easy to configure. With a little Ruby scripting you can make more complex changes. A few sample scripts are provided that do things like take the dewey call number from the 082a field and copy it to the fields Koha uses for call numbers, and if there is no 082a field it prompts for the proper call number parts. Don&#8217;t need the feature? Just turn it off.</p> + <p><strong>Scripted changes to records.</strong> ZCC is highly configurable for making scripted changes to each record like macros. Want to delete all 852 or 9XX fields from a record before importing into your library system? <span class="caps">ZCC</span> can do that and more. Add fields and subfields with pre-determined information or prompt for information. With version 0.2.0 you can now set up more than one scripting profile and choose which profile to use on a per record basis. The &#8216;start&#8217; and &#8216;end&#8217; scripts run before and after the script you choose. The previous examples are easy to configure. With a little Ruby scripting you can make more complex changes. A few sample scripts are provided that do things like take the dewey call number from the 082a field and copy it to the fields Koha uses for call numbers, and if there is no 082a field it prompts for the proper call number parts. Don&#8217;t need scripting? Just turn it off. Need a script that isn&#8217;t available and you don&#8217;t know any Ruby&#8212;let know and we&#8217;ll see if we can work something out. <span class="caps">TODO</span>: Put each script in a separate file in a &#8216;scripts&#8217; directory under the <span class="caps">ZCC</span> root directory. Make writing plugins in Ruby easier.</p> - <p><strong>Output to <span class="caps">CSV</span> file.</strong> Want to print labels or keep statistics? <span class="caps">ZCC</span> allows you to choose which subfields you would like to export into a <span class="caps">CSV</span> file. Programs like glabels can accept <span class="caps">CSV</span> files for custom labelmaking. <span class="caps">CSV</span> files can also be imported into spreadsheet programs like OpenOffice Calc or Excel. If a value is not found for a particular field <span class="caps">ZCC</span> will prompt the user for input, which can be blank.</p> + <p><strong>Output to <span class="caps">CSV</span> file.</strong> Want to print labels or keep statistics? <span class="caps">ZCC</span> allows you to choose which subfields you would like to export into a <span class="caps">CSV</span> file. Programs like glabels can accept <span class="caps">CSV</span> files for custom labelmaking. <span class="caps">CSV</span> files can also be imported into spreadsheet programs like OpenOffice Calc or Excel. (If a value is not found for a particular field <span class="caps">ZCC</span> will prompt the user for input, which can be blank. I&#8217;m considering turning off this feature.)</p> - <p><strong>Light editing of subfields</strong> Since version 0.0.3 there is a facility for editing subfields. Have you found a good record but one or two subfields are different than the item you have in hand? You can still accept the record and make small edits of existing subfields. It allows you to pick the subfield you want to edit when there are repeatable fields and subfields. Not a replacement for a <span class="caps">MARC</span> editor, but for copy cataloging probably good enough in many cases. Still lacking some features like timestamp change.</p> + <p><strong>Subfield editing</strong> Since version 0.0.3 there is a facility for editing subfields. Have you found a good record but one or two subfields are different than the item you have in hand? You can still accept the record and make small edits of existing subfields. It allows you to pick the subfield you want to edit when there are repeatable fields and subfields. Not a replacement for a <span class="caps">MARC</span> editor, but for copy cataloging probably good enough in many cases. Still lacking some features like timestamp change.</p> + <p><strong>Full record editing</strong> Version 0.2.0 now has a full <span class="caps">MARC</span> editor. Well, sort of. <span class="caps">ZCC</span> uses yaz-marcdump to turn the file into line format. It then opens up this line formatted record in your favorite editor (vim by default). Once you edit the record and save it, yaz-marcdump translates the record from line format back into <span class="caps">MARC</span> format.</p> + + + <p><strong>Independent features</strong> You may turn on or off particular features. Don&#8217;t want your copy catalogers to do more than minimal editing? Turn off the full record editing and only allow subfield editing.</p> + + + <p><strong>Update zebra records</strong> You can now use <span class="caps">ZCC</span> to update records that are already in your database. The 901$a field is a reserved field for <span class="caps">ZCC</span> so selecting a record from your own database, editing it and saving it again will match on that field and update the record with the edited version. You&#8217;ll probably want to select &#8216;none&#8217; if you have scripting turned on, or you may want to have a yaml config file just for editing records that are already in your zebra database. <span class="caps">TODO</span>: Allow the recordID field to be configurable.</p> + + <p>Sample simple <strong>zebra</strong> set up to enable a localhost. See: <a href="http://zcc.rubyforge.org/zebra.html">Very simple setup of local zebra server</a></p> <h2>Configuration</h2> - <p>Because of all the scripting and csv features zcc requires a lot of configuration. Currently the configuration files are my own. I use them and they work for my purposes, but they will not work for yours. Once you have configured zcc, though, you should be copy cataloging much faster.</p> + <p>Because of all the scripting and csv features zcc requires a lot of configuration to get exactly what you want out of it. Currently the configuration files are my own. I use them and they work for my purposes, but they will not work for yours. Once you have configured zcc, though, you should be copy cataloging much faster.</p> - <p>All of the configuration (as of 0.0.2) is looked for in the user&#8217;s home directory in ~/.zcc/zcc.yaml. An example zcc.yaml config file can be found in the examples directory of the gem.</p> + <p>An example zcc.yaml config file can be found in the examples directory of the gem. For instance if in your home directory you have a directory .zcc for all <span class="caps">ZCC</span> related configuration then:</p> + <pre syntax="ruby">cd ~/.zcc -cp -r /var/lib/gems/1.8/gems/zcc-0.0.4/examples/* .</pre> +cp -r /var/lib/gems/1.8/gems/zcc-0.2.0/examples/* .</pre> + +Or if use Debian and you&#8217;ve updated rubygems to use a version other than the one in apt you might find it here: +<pre syntax="ruby">cp -r /usr/lib/ruby/gems/1.8/gems/zcc-0.2.0/examples/* .</pre> + + <p>Edit the file zcc.yaml to your liking. <span class="caps">YOU MUST AT LEAST CHANGE THE ROOT DIRECTORY</span>. Detailed instructions are given in this file to aid in configuration. It refers you to some other configuration files for optional added configuration.</p> + + <p>Now if you want your retrieved records to be indexed and searchable over <span class="caps">Z39</span>.50 via zebra check out this quick start page: <a href="http://zcc.rubyforge.org/zebra.html">Very simple setup of local zebra server</a></p> <h2>Use</h2> - <p>$ zcc</p> + <p>If zcc.yaml is in the working directory: +$ zcc</p> -<ol> - <li>Configure both ~/.zcc/zcc.yaml.</li> + + <p>If your yaml configuration file is in a different directory do something like: +$ zcc &#8212;yaml ~/.zcc/zcc.yaml +or +$ zcc -y /path/to/zcc_config.yaml +So your <span class="caps">ZCC</span> yaml configuration file can have a different name if the &#8212;yaml (-y) switch is used. It may also be placed in a different directory from the rest of your <span class="caps">ZCC</span> configuration and working files. You may wish to have multiple configuration files for different needs.</p> + + + <ol> <li>From the command line run zcc</li> - <li>Next to each shown result is a number. Numbering starts with zero. </li> - <li><span class="caps">ZCC</span> command line: type &#8216;help&#8217; to see the possible help options.</li> -</ol> + <li>Next to each shown result is a number. Numbering starts with zero. </li> + <li><span class="caps">ZCC</span> command line: type &#8216;help&#8217; to see the possible help options.</li> + </ol> - <h2>TODO</h2> + <h2><span class="caps">TODO</span></h2> + + <p><del><strong>Smart character set conversion</strong> Currently incoming records are assumed to be marc8 and are converted to utf8. This is complex. Let me know what you need here.</del> v. 0.0.3+ checks leader byte 9 for character encoding and either keeps it as <span class="caps">UTF8</span> or convert from <span class="caps">MARC8</span> to <span class="caps">UTF8</span>. Uses ruby-zoom&#8217;s xml method for conversion.</p> - <p><strong>TUI</strong> <del>If there is interest in this script, I&#8217;m hoping to make a nice Text User Interface with curses or ncurses. Currently everything just scrolls up the terminal. Since v. 0.0.3 there are some nicer <span class="caps">TUI</span> elements like highlighting</del> With version 0.1.0, there&#8217;s a much nicer configurable <span class="caps">TUI</span>.</p> + <p><strong><span class="caps">TUI</span></strong> <del>If there is interest in this script, I&#8217;m hoping to make a nice Text User Interface with curses or ncurses. Currently everything just scrolls up the terminal. Since v. 0.0.3 there are some nicer <span class="caps">TUI</span> elements like highlighting</del> With version 0.1.0, there&#8217;s a much nicer configurable <span class="caps">TUI</span> which uses highline and ansicolor gems.</p> <p><strong>Automatic retrieval of authority records.</strong> I already have a separate script in the works that can retrieve authority records for names (not subjects). I&#8217;d like to work that as an option into the main script.</p> <p><strong>Unit Testing.</strong> While I&#8217;ve tested the script in my own work, I need to do more formal testing of the methods.</p> - <p><strong>Exception handling.</strong> Currently there&#8217;s not great exception handling in the script. This needs to change, but hasn&#8217;t caused problems for me yet.</p> + <p><strong>Exception handling.</strong> Currently there&#8217;s not great exception handling for all potential errors that may arise in the script. This needs to change, but hasn&#8217;t caused problems for me yet.</p> - <p><strong>Internationalize</strong> <del>This can start by not hardcoding any fields and allowing them to be configurable. The initial display of fields on search of a target should show the relevant fields in the user&#8217;s prefered <span class="caps">MARC</span> flavor.</del> If there is interest, I&#8217;d be willing to try making other text translatable.</p> + <p><strong>Internationalize</strong> <del>This can start by not hardcoding any fields and allowing them to be configurable. The initial display of fields on search of a target should show the relevant fields in the user&#8217;s prefered <span class="caps">MARC</span> flavor.</del> You now have the choice of which fields display by default. If there is interest, I&#8217;d be willing to try making other text translatable.</p> - <p><del>Move all configuration to <span class="caps">YAML</span> file. Currently some configuration is made in the main script and some in the <span class="caps">YAML</span> file.</del> v. 0.0.2</p> + <p><strong>Turn off/on displayed fields/subfields</strong></p> + <p><del>Move all configuration to <span class="caps">YAML</span> file. Currently some configuration is made in the main script and some in the <span class="caps">YAML</span> file.</del> As of version 0.2.0, the yaml file is getting quite long so I&#8217;m looking at ways to break out long configuration files like zservers.yaml and scripts while still allowing everything to be self-contained in one file if that is the desire.</p> + + <p>Create full <strong>rdoc documentation</strong>.</p> - <p><strong>Subfield Editing</strong> <del>Allow subfield editing to take place in vim buffer?</del> As of 0.0.3 subfield editing is available though not well tested. Readline allows for nice editing. Still to do: Change the timestamp automatically and allow for adding subfields like 040d upon modification.</p> + <p><strong>Editing</strong> has been added now as two modules: simple subfield editing or full record editing. Still to do: Change the timestamp automatically and allow for adding subfields like 040d upon modification.</p> <h2>Suggestions</h2> + <p>Perl and <span class="caps">MARC</span>::Lint To have error checking of records turned on you must also have Perl and <span class="caps">MARC</span>::Lint installed.</p> <h2>Using Koha with zcc</h2> - <p>There is no integration yet between Koha and zcc, but I use both so am working towards that end. For now you can find some help on this page: <a href="http://zcc.rubyforge.org/koha.html">using Koha with zcc</a></p> + <p><span class="caps">ZCC</span> can now use Koha2&#8217;s bulkmarcimport script to insert records directly into the Koha database. For more information see this page: <a href="http://zcc.rubyforge.org/koha.html">using Koha with zcc</a></p> + <h2>Help/paches</h2> + <p>email: <a href="mailto:jronallo+zcc@gmail.com">Jason Ronallo</a></p> <p>For bug reports: If relevant, please include z-target, search term and error messages.</p> <h2>Will work for Ruby books</h2> + <p>If you&#8217;d like to sponsor the addition of a feature to <span class="caps">ZCC</span> or need a change to better meet your workflow, I will work for Ruby books. Up to now I&#8217;ve, requested Programming Ruby, Ruby Cookbook, Agile Web Development with Rails and others from libraries via Inter-Library Loan. I never get to keep them as long as I&#8217;d like. I&#8217;d like to have my own copies of these invaluable resources.</p> <h2>License</h2> + <p>Copyright&#169; 2007 Jason Ronallo</p> <p>This program is free software; you can redistribute it and/or modify it under the terms of the <span class="caps">GNU</span> General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p> @@ -222,9 +273,10 @@ <p>You should have received a copy of the <span class="caps">GNU</span> General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, <span class="caps">MA 02110</span>-1301, <span class="caps">USA</span></p> <h2>Contact</h2> + <p>Comments are welcome. Send an email to <a href="mailto:jronallo+zcc@gmail.com">Jason Ronallo</a>.</p> </div>