Several years ago, I wrote a simple report generator for MPOW which broke
down our daily list of items to send to other branches into separate
reports. I'm looking to refactor it and one of my big targets is to make
the collection/call number smarter.
Right now, it treats an LC call number as a simple string, so I can do some
simple searches against it (e.g., "coll. HERITAGE", call number starts with
"P"), but this has some limitations. For example, when I select a range, I
can't sort by the numeric part, which means that an item PN6728 will appear
in the list before an item from PN704.
Does anyone know of a decent script (preferably Python or Ruby) which will
break the call number down into an array (or other set) of values (e.g.,
PN6728.S4546F73 2015 v.2 coll. GRAPHICNOVELS would become ["PN", 6728, "S",
4546, "F", 73, 2015, "2", "GRAPHICNOVELS"])? This way, I could have
granular control over sorting by call number.
---
Rob D.
[log in to unmask]
|