LCCN

Joshua McGee joshua at mcgees.org
Tue Mar 13 00:53:17 MDT 2007


Hi,

I'm a brand-new user.

I'm a nut for LCCNs.  I don't see an option to sort by LCCN in
Tellico.  If I'm not just missing it, and its absence is due to a lack
of a spec, I wrote some code (in Perl) a while back to do it.  It is:

sub locsort ($a,$b)
{
    @a = ($a =~
/^([A-Z]+)(\d+(?:\.\d+)?)\.?([A-Z]*)(\d*)\.?([A-Z]*)(\d*)(?:
(\d\d\d\d))?/);
    @b = ($b =~
/^([A-Z]+)(\d+(?:\.\d+)?)\.?([A-Z]*)(\d*)\.?([A-Z]*)(\d*)(?:
(\d\d\d\d))?/);

    return
	$a[0] cmp $b[0]
	    ||
	$a[1] <=> $b[1]
	    ||
	$a[2] cmp $b[2]
	    ||
	"0.$a[3]" <=> "0.$b[3]"
	    ||
	$a[4] cmp $b[4]
	    ||
	"0.$a[5]" <=> "0.$b[5]"
	    ||
	$a[6] <=> $b[6]
	    ;
}

I'm pretty sure that handles everything in the spec.  If you cannot
read enough Perl to convert it, let me know.

That being said, I cannot really get Tellico to work with LCCNs.  My
ideal collection app would let me scan the Bookland EAN with my
barcode scanner, and have it scrape both Amazon and the LoC for all
available information.  But if I'm not mistaken, the LoC search is not
working at all out of the box.  At least, Title searches for "Walden"
and "Bible" both failed, which is strong circumstantial evidence.

Also -- presumably there's a way to change the Amazon Associate ID in
HTML output to one's own?  Maybe in an XSL?  Not to sound totally
ungrateful....

- Joshua McGee
http://www.mcgees.org



More information about the tellico-users mailing list