migration-tools.git
11 years agoAdded --ignore-indexes option to grab more data, much of which will be junk to filter...
Ben Ostrowsky [Mon, 22 Nov 2010 19:26:45 +0000]
Added --ignore-indexes option to grab more data, much of which will be junk to filter out downstream

11 years agoA few adjustments
Ben Ostrowsky [Thu, 18 Nov 2010 21:09:03 +0000]
A few adjustments

11 years agoHandles items as well -- row length is a two-byte field
Ben Ostrowsky [Thu, 18 Nov 2010 20:33:38 +0000]
Handles items as well -- row length is a two-byte field

11 years agoWorks fine on TITLE.DB, but misses the boat on other files.
Ben Ostrowsky [Thu, 18 Nov 2010 19:29:55 +0000]
Works fine on TITLE.DB, but misses the boat on other files.

11 years ago(cosmetic) Adjust digits in column numbers to fit data
Ben Ostrowsky [Thu, 18 Nov 2010 16:10:20 +0000]
(cosmetic) Adjust digits in column numbers to fit data

11 years agoTools for handling Bibliofile *.DB/*.DBD files
Ben Ostrowsky [Thu, 18 Nov 2010 16:06:18 +0000]
Tools for handling Bibliofile *.DB/*.DBD files

11 years agodie if cannot open output or exception files
Galen Charlton [Fri, 12 Nov 2010 15:18:55 +0000]
die if cannot open output or exception files

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

11 years agoA few refinements
Ben Ostrowsky [Mon, 8 Nov 2010 21:16:32 +0000]
A few refinements

11 years agoA tool for generating Apache vhost configs from a table modeled after actor.org_unit_...
Ben Ostrowsky [Mon, 8 Nov 2010 16:51:27 +0000]
A tool for generating Apache vhost configs from a table modeled after actor.org_unit_setting.

USAGE: ./opac_settings.pl --bootstrap /openils/conf/opensrf_core.xml --schema m_sage

Input will look like this:

evergreen=# select * from m_sage.opac_settings where org_unit = 107;
 id  | org_unit |       name        |               value
-----+----------+-------------------+-----------------------------------
  36 |      107 | opac.server_name  | "conhs.sage.eou.edu"
  93 |      107 | opac.server_alias | "www.conhs.sage.eou.edu"
 147 |      107 | opac.directory    | "condonhs"
 251 |      107 | opac.ssl_cert     | "ssl/wildcard.sage.eou.edu.crt"
 301 |      107 | opac.ssl_key      | "ssl/wildcard.sage.eou.edu.key"

Multiple libraries may share an 'opac.directory' (branches of a system with the same OPAC look and feel).

Multiple 'opac.server_alias' rows may be defined.

11 years agomigration_tools.stage_not_applicable_asset_stat_cats
Ben Ostrowsky [Fri, 22 Oct 2010 16:28:37 +0000]
migration_tools.stage_not_applicable_asset_stat_cats

11 years agoBetter output-file renaming
Ben Ostrowsky [Sun, 19 Sep 2010 01:11:42 +0000]
Better output-file renaming

11 years agoGenerates a TSV with egid and MARCXML snippets to preserve for post-deduping reinsert...
Ben Ostrowsky [Fri, 10 Sep 2010 17:48:17 +0000]
Generates a TSV with egid and MARCXML snippets to preserve for post-deduping reinsertion (insert_tags).

11 years agoAdded feedback to remind the user where to find the results (since it doesn't go...
Ben Ostrowsky [Fri, 10 Sep 2010 14:56:56 +0000]
Added feedback to remind the user where to find the results (since it doesn't go to STDOUT).

11 years agoNew function: apply_circ_matrix('m_foo.action_circulation').
Ben Ostrowsky [Wed, 8 Sep 2010 16:07:48 +0000]
New function: apply_circ_matrix('m_foo.action_circulation').

Sets duration, fine, and max_fine names and values, and renewal_remaining,
based on a circ matrix (and patron profiles, and circ modifiers) already in place.

11 years agoMore precise deduping for insert_tags
Ben Ostrowsky [Fri, 20 Aug 2010 16:27:50 +0000]
More precise deduping for insert_tags

11 years agoAdded function: insert_tags (marc, '<datafield tag="999" ... </datafield>')
Ben Ostrowsky [Fri, 20 Aug 2010 16:25:32 +0000]
Added function: insert_tags (marc, '<datafield tag="999" ... </datafield>')

Inserts into the proper numerical order, ignoring fields that are duplicates of each other.

11 years agoattempt_phone can take '' as second argument to refrain from adding an area code...
Ben Ostrowsky [Thu, 10 Jun 2010 19:47:35 +0000]
attempt_phone can take '' as second argument to refrain from adding an area code; added is_blank(TEXT) for convenience

11 years agoNew function: migration_tools.is_staff_profile(actor.usr.profile), returns boolean
Ben Ostrowsky [Thu, 3 Jun 2010 15:44:09 +0000]
New function: migration_tools.is_staff_profile(actor.usr.profile), returns boolean

11 years agoBuilt-in manual gave wrong command-line arguments. Fixed.
Ben Ostrowsky [Thu, 27 May 2010 15:15:24 +0000]
Built-in manual gave wrong command-line arguments. Fixed.

11 years agoAdded two MARC-manipulating functions from Galen
Ben Ostrowsky [Thu, 6 May 2010 16:29:04 +0000]
Added two MARC-manipulating functions from Galen

11 years agoEliminating one line of Perl 5.10 dependency
Ben Ostrowsky [Fri, 20 May 2011 19:52:18 +0000]
Eliminating one line of Perl 5.10 dependency

11 years agoFixed typo
Ben Ostrowsky [Fri, 20 May 2011 16:16:41 +0000]
Fixed typo

11 years agoRewrote some regular expressions to make them compatible with Perl versions before...
Ben Ostrowsky [Fri, 20 May 2011 16:13:09 +0000]
Rewrote some regular expressions to make them compatible with Perl versions before 5.10

11 years agoTo be run immediately after normal EG installation
Ben Ostrowsky [Fri, 13 May 2011 15:54:46 +0000]
To be run immediately after normal EG installation

12 years agoadd license statement
Galen Charlton [Fri, 17 Jun 2011 03:10:16 +0000]
add license statement

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

12 years agoSCLENDS bibliographic dedupe routine
Galen Charlton [Fri, 17 Jun 2011 03:06:00 +0000]
SCLENDS bibliographic dedupe routine

This implements a bibliographic deduplication routine based
on criteria and an algorithm specified by the South Carolina
State Library on behalf of the SC LENDS consortium.  This work
was sponsored by SC LENDS, whose impetus is gratefully
acknowledged.  Portions of this script were subseqently expanded
based on the advice of the Indiana State Library on the behalf
of the Evergreen Indiana project.

This is meant to run in an Evergreen database.  Usage would
be something like:

psql -U evergreen < sclends_dedupe.sql

However, in practice it is highly recommend to edit the script
first; any bibliographic deduplication requires close attention
to the particular data found in the Evergreen database.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

12 years agoTwo new utilities that, together, can generate a zips.txt file customized for your...
Ben Ostrowsky [Wed, 11 May 2011 17:07:35 +0000]
Two new utilities that, together, can generate a zips.txt file customized for your patron database.

13 years agoupdate test case
Galen Charlton [Thu, 6 May 2010 18:12:35 +0000]
update test case

Thanks to Sue Hopkins for the catch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

14 years agoAdded note about non-ESI tools' licensing
Ben Ostrowsky [Thu, 22 Apr 2010 17:29:59 +0000]
Added note about non-ESI tools' licensing

Signed-off-by: Equinox Git Owner <koha@yeti.esilibrary.com>

14 years agoadded COPYING, LICENSE, and README for release
Galen Charlton [Thu, 22 Apr 2010 04:53:33 +0000]
added COPYING, LICENSE, and README for release

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

14 years agoskip over records that cannot be parsed
Galen Charlton [Tue, 13 Apr 2010 19:23:51 +0000]
skip over records that cannot be parsed

14 years agorevert previous commit (swept too much in)
Galen Charlton [Tue, 13 Apr 2010 19:22:01 +0000]
revert previous commit (swept too much in)

14 years agorecover gracefully after an XML parsing error
Galen Charlton [Tue, 13 Apr 2010 19:18:52 +0000]
recover gracefully after an XML parsing error

14 years agoNAME
Galen Charlton [Tue, 13 Apr 2010 00:19:06 +0000]
NAME
       xlsx2tab

SUMMARY
       Quick-and-dirty filter lifted from the Spreadsheet::XSLX POD to convert the first sheet of an Excel .xlsx file to TSV

USAGE
       xlsx2tab foo.xlsx > foo.tsv

14 years agoWill leave 'unlisted' alone
Ben Ostrowsky [Mon, 12 Apr 2010 22:08:34 +0000]
Will leave 'unlisted' alone

14 years agoHandling a few more exceptions...
Ben Ostrowsky [Mon, 12 Apr 2010 22:06:41 +0000]
Handling a few more exceptions...

14 years agoAdded logic to attempt_phone for handling a few more variants correctly
Ben Ostrowsky [Mon, 12 Apr 2010 21:54:27 +0000]
Added logic to attempt_phone for handling a few more variants correctly

14 years agoAdded function attempt_phone (TEXT,TEXT) RETURNS TEXT. First argument is legacy...
Ben Ostrowsky [Mon, 12 Apr 2010 21:47:43 +0000]
Added function attempt_phone (TEXT,TEXT) RETURNS TEXT.  First argument is legacy phone data, second is area code to prepend.

14 years agodebugged a comment ;)
Ben Ostrowsky [Tue, 6 Apr 2010 14:55:30 +0000]
debugged a comment ;)

14 years agoRenamed utility, added --help and perldoc documentation
Ben Ostrowsky [Tue, 6 Apr 2010 14:50:54 +0000]
Renamed utility, added --help and perldoc documentation

14 years agoMoving DBF-to-TSV utility (not Athena-specific)
Ben Ostrowsky [Tue, 6 Apr 2010 14:31:16 +0000]
Moving DBF-to-TSV utility (not Athena-specific)

14 years agoFirst version of a utility to convert Athena DBF to TSV suitable for \copy.
Ben Ostrowsky [Tue, 6 Apr 2010 14:23:16 +0000]
First version of a utility to convert Athena DBF to TSV suitable for \copy.
Suitable includes escaping backslash, tab, newline, and carriage return,
and converting output to UTF-8.

14 years agonormalize output by escaping backslashes
Galen Charlton [Wed, 17 Mar 2010 19:20:33 +0000]
normalize output by escaping backslashes

This allows psql to import the data correctly; use
the new --disable-pg-normalization option to disable
this behavior if the output is not meant to go
directly into a Pg database via copy or \copy

14 years agofix retrieval of correct column headers and data from non-holdings tags
Galen Charlton [Mon, 15 Mar 2010 16:34:57 +0000]
fix retrieval of correct column headers and data from non-holdings tags

This work was sponsored by the Indiana State Library.

14 years agoimproved handling for drawing data from fields other than the holdings tag
Galen Charlton [Fri, 12 Mar 2010 20:32:45 +0000]
improved handling for drawing data from fields other than the holdings tag

Suppose the 852 is the main holdings tag, but information is needed
from the 590$a (e.g., as an item note).  The extract_holdings configuration file
can now work as follows:

# to map the subfield contents to the item record
barcode 852 p
note    590 a

# to map, but have the 590$a information be associated
# only with the first item in the bib; if m:first is
# not supplied, the 590$a note will be supplied
# to all items associated with the bib
barcode 852 p
note    590 a m:first

# to put all occurrences of the 590$a into a separate
# file for linking with the appropriate items.  m:multi
# *must* be supplied if the 590 tag occurs more than once
# in the bib records
barcode 852 p
note    590 a m:multi

# to concatenate repeats of $a in the 590 together
barcode 852 p
note    590 a m:concatenate

# to concatenate with a custom separator
barcode 852 p
note    590 a m:concatenate c:' / '

Development sponsored by the Indiana State Library

14 years agofix error in Codabar checkdigit algorithm
Galen Charlton [Mon, 8 Mar 2010 21:14:08 +0000]
fix error in Codabar checkdigit algorithm

14 years agoasset.copy.price is NUMERIC(8,2),
Ben Ostrowsky [Tue, 2 Feb 2010 15:55:35 +0000]
asset.copy.price is NUMERIC(8,2),
                not NUMERIC(6,2).

14 years agonew function add_codabar_checkdigit
Galen Charlton [Fri, 29 Jan 2010 15:42:45 +0000]
new function add_codabar_checkdigit

-- add_codabar_checkdigit
--   $barcode      source barcode
--
-- If the source string is 13 or 14 characters long and contains only digits, adds or replaces the 14
-- character with a checkdigit computed according to the usual algorithm for library barcodes
-- using the Codabar symbology - see <http://www.makebarcode.com/specs/codabar.html>.  If the
-- input string does not meet those requirements, it is returned unchanged.

14 years agoAdded migration_tools.attempt_money, which returns NUMERIC(6,2)
Ben Ostrowsky [Thu, 28 Jan 2010 17:35:37 +0000]
Added migration_tools.attempt_money, which returns NUMERIC(6,2)

14 years agoLigonier (PA) is Polaris, yes, but Ligonier (IN) is Mandarin.
Ben Ostrowsky [Tue, 5 Jan 2010 20:17:38 +0000]
Ligonier (PA) is Polaris, yes, but Ligonier (IN) is Mandarin.

14 years agoPolaris patron extractor, first working version
Ben Ostrowsky [Tue, 5 Jan 2010 14:30:27 +0000]
Polaris patron extractor, first working version

14 years agoA tool I found online
Ben Ostrowsky [Tue, 29 Dec 2009 15:40:01 +0000]
A tool I found online

14 years agoScript now handles Jr and Sr without a trailing period, and the suffix IV.
Ben Ostrowsky [Mon, 28 Dec 2009 17:34:46 +0000]
Script now handles Jr and Sr without a trailing period, and the suffix IV.

14 years agoquell warning if no Koha bib ID found
Galen Charlton [Wed, 9 Dec 2009 13:52:47 +0000]
quell warning if no Koha bib ID found

14 years agoadded koha_bib_id fingerprint option (for Koha migrations for
Galen Charlton [Tue, 8 Dec 2009 20:43:43 +0000]
added koha_bib_id fingerprint option (for Koha migrations for
Indiana from INCOLSA)

14 years agofix regex for extracting bib ID from input
Galen Charlton [Wed, 25 Nov 2009 14:27:04 +0000]
fix regex for extracting bib ID from input

14 years agoFixed another inaccuracy in the inline documentation
Ben Ostrowsky [Tue, 10 Nov 2009 18:11:14 +0000]
Fixed another inaccuracy in the inline documentation

14 years agoMade inline-documentation references to Equinox::Migration modules more explicit
Ben Ostrowsky [Tue, 10 Nov 2009 15:12:24 +0000]
Made inline-documentation references to Equinox::Migration modules more explicit

14 years agoMigration schemas will now handle action.hold_notification
Ben Ostrowsky [Fri, 30 Oct 2009 14:43:58 +0000]
Migration schemas will now handle action.hold_notification

14 years agofixed minor errors in extract_loadset that prevent it from functioning
Galen Charlton [Mon, 12 Oct 2009 14:23:33 +0000]
fixed minor errors in extract_loadset that prevent it from functioning

14 years agoutility methods for best-effort datatype casting
Jason Etheridge [Tue, 8 Sep 2009 09:00:48 +0000]
utility methods for best-effort datatype casting

14 years agodeclare expand_barcode to be STABLE
Galen Charlton [Wed, 26 Aug 2009 19:00:28 +0000]
declare expand_barcode to be STABLE

As noticed by Jason, doing this gives a signficant
performance boost.

14 years agosupport for dynamic mapping of circ fields
Jason Etheridge [Wed, 26 Aug 2009 07:07:22 +0000]
support for dynamic mapping of circ fields

14 years agoadded new function to pad barcodes
Galen Charlton [Mon, 24 Aug 2009 16:20:34 +0000]
added new function to pad barcodes

-- expand_barcode
--   $barcode      source barcode
--   $prefix       prefix to add to barcode, NULL = add no prefix
--   $maxlen       maximum length of barcode; default to 14 if left NULL
--   $pad          padding string to apply to left of source barcode before adding
--                 prefix and suffix; set to NULL or '' if no padding is desired
--   $suffix       suffix to add to barcode, NULL = add no suffix
--
-- Returns a new string consisting of prefix concatenated with padded barcode and suffix.
-- If new barcode would be longer than $maxlen, the original barcode is returned instead.

Example usage:

UPDATE foo
SET barcode = migration_tools.expand_barcode(barcode, '21234', 14, '0', '');

14 years agosyntax
Jason Etheridge [Wed, 12 Aug 2009 05:53:55 +0000]
syntax

14 years agomove copy location mapping functionality into base.sql
Jason Etheridge [Wed, 12 Aug 2009 05:11:04 +0000]
move copy location mapping functionality into base.sql

14 years agomove dynamic item mapping functionality to base.sql; it's not ILS specific
Jason Etheridge [Wed, 12 Aug 2009 04:58:48 +0000]
move dynamic item mapping functionality to base.sql; it's not ILS specific

14 years agothis stored procedure is a true function with no side effects
Jason Etheridge [Tue, 11 Aug 2009 10:39:15 +0000]
this stored procedure is a true function with no side effects

14 years agoname parser
Jason Etheridge [Tue, 11 Aug 2009 10:37:09 +0000]
name parser

14 years agofix signature
Jason Etheridge [Sat, 8 Aug 2009 22:52:13 +0000]
fix signature

14 years agostart moving this mapping functionality over to base, since the only part that is...
Jason Etheridge [Sat, 8 Aug 2009 22:41:00 +0000]
start moving this mapping functionality over to base, since the only part that is ILS specific is the data that drives it

14 years agoMDMP require version bumped
Shawn Boyette [Mon, 27 Jul 2009 16:06:22 +0000]
MDMP require version bumped
believe non-holding multis work now
null non-holdings data handled better

14 years ago1.005
Shawn Boyette [Mon, 27 Jul 2009 16:06:21 +0000]
1.005
added 'ignoremulti' modifier
mods handling slightly tweaked

14 years agonewline at end of sample run
Shawn Boyette [Tue, 14 Jul 2009 03:07:46 +0000]
newline at end of sample run

14 years ago--marcfile no longer gets -m; --map does
Shawn Boyette [Mon, 13 Jul 2009 18:14:12 +0000]
--marcfile no longer gets -m; --map does

14 years agoautoset marcfile on prefix
Shawn Boyette [Thu, 9 Jul 2009 16:29:41 +0000]
autoset marcfile on prefix

14 years agooopses
Shawn Boyette [Thu, 9 Jul 2009 14:24:34 +0000]
oopses

14 years agoredo
Shawn Boyette [Thu, 9 Jul 2009 14:09:18 +0000]
redo

14 years agoredoing previous changes
Shawn Boyette [Thu, 9 Jul 2009 14:09:17 +0000]
redoing previous changes

14 years agorescued changes
Shawn Boyette [Thu, 9 Jul 2009 13:56:41 +0000]
rescued changes

14 years agoyanking DBM::Deep stuffs
Shawn Boyette [Thu, 25 Jun 2009 17:31:51 +0000]
yanking DBM::Deep stuffs

14 years agoremoving DBMD, phase I
Shawn Boyette [Thu, 25 Jun 2009 17:31:50 +0000]
removing DBMD, phase I

14 years agoold2new generation now handles controlfields and will map any number of matches,...
Shawn Boyette [Wed, 24 Jun 2009 19:20:19 +0000]
old2new generation now handles controlfields and will map any number of matches, not just one-per-record

14 years agotweaks
Shawn Boyette [Wed, 24 Jun 2009 19:20:19 +0000]
tweaks

14 years agotypo fix
Shawn Boyette [Wed, 24 Jun 2009 19:20:19 +0000]
typo fix

14 years agoimproved multifile handling
Shawn Boyette [Wed, 24 Jun 2009 19:20:18 +0000]
improved multifile handling

14 years agomulti extractions work now. holding seq# always included now
Shawn Boyette [Wed, 24 Jun 2009 19:20:18 +0000]
multi extractions work now. holding seq# always included now

14 years agomaking sampling work better
Shawn Boyette [Wed, 24 Jun 2009 19:20:17 +0000]
making sampling work better

14 years agoadded subs thresholding
Shawn Boyette [Wed, 24 Jun 2009 19:20:17 +0000]
added subs thresholding

14 years agoversion bump
Shawn Boyette [Wed, 24 Jun 2009 19:20:16 +0000]
version bump

14 years agofixes for multi subfields
Shawn Boyette [Wed, 24 Jun 2009 19:20:16 +0000]
fixes for multi subfields
added get_multis method

14 years agoautoflush turned off for DBM::Deep
Shawn Boyette [Wed, 24 Jun 2009 19:20:15 +0000]
autoflush turned off for DBM::Deep
name method doesn't require rec# anymore
{names} gone from record dataset

14 years agotest for existing DBMD file; die
Shawn Boyette [Thu, 18 Jun 2009 18:23:37 +0000]
test for existing DBMD file; die

14 years agoset default window size to 9 lines
Shawn Boyette [Thu, 18 Jun 2009 18:23:36 +0000]
set default window size to 9 lines

14 years agoholdings dump status msg now counts holdings instead of records
Shawn Boyette [Thu, 18 Jun 2009 18:23:35 +0000]
holdings dump status msg now counts holdings instead of records

14 years agoworks with new MDMP
Shawn Boyette [Fri, 12 Jun 2009 18:30:37 +0000]
works with new MDMP

14 years agotake rcnt out of dstore and call it reccount
Shawn Boyette [Fri, 12 Jun 2009 18:30:36 +0000]
take rcnt out of dstore and call it reccount

14 years agochanged rptr to rcnt
Shawn Boyette [Fri, 12 Jun 2009 18:30:36 +0000]
changed rptr to rcnt

14 years agoargs handling bug
Shawn Boyette [Fri, 12 Jun 2009 18:30:36 +0000]
args handling bug

14 years agoKeeping MDMP from eating all teh rams (WIP)
Shawn Boyette [Fri, 12 Jun 2009 18:30:35 +0000]
Keeping MDMP from eating all teh rams (WIP)