Esempio n. 1
0
 def test_03_module_method_with_cutters(self):
     self.assertTrue(callnumber.normalize('A 123.4 .c11'), 'A  012340C110')
     self.assertTrue(callnumber.normalize('B11 .c13 .d11'),
                     'B  001100C130D110')
     self.assertTrue(callnumber.normalize('B11 .c13 .d11'),
                     'B  001100C130D119~999')
Esempio n. 2
0
 def test_02_normalize_module_method(self):
     self.assertTrue(callnumber.normalize('B11'), 'B  0011')
Esempio n. 3
0
 def test_02_normalize_module_method(self):
     self.assertTrue(callnumber.normalize('B11'), 'B  0011')
Esempio n. 4
0
 def test_03_module_method_with_cutters(self):
     self.assertTrue(callnumber.normalize('A 123.4 .c11'), 'A  012340C110')
     self.assertTrue(callnumber.normalize('B11 .c13 .d11'),
                     'B  001100C130D110')
     self.assertTrue(callnumber.normalize('B11 .c13 .d11'),
                     'B  001100C130D119~999')
Esempio n. 5
0
 author = row[7]
 barcode = row[14]
 status = row[18]
 description = row[6]
 invdate = row[25]
 if temploc != '':
   location = temploc
 if description != '':
   call = call + ' ' + description
   call2 = call + ' ' + description   
 if status != 'WITHDRAWN':
   lcmatch = re.compile('[A-Z]{1,3}\d')
   deweymatch = re.compile('\d*\.\d*')
   if lcmatch.match(call):
     call2 = call.replace('-','v')  
     sortcall = callnumber.normalize(call2)
     if sortcall == None:
       csv_out.writerow([call,call,title,author,barcode,location,status,invdate])
     else:
       if sortcall.find('PT') != -1:
         partsplit = sortcall.split('PT')
         partsplitnum = partsplit[1].rjust(3, '0')
         sortcall = partsplit[0] + 'PT' + partsplitnum
       if call.find('v.') != -1:
         #if v. and no normalized V
          if sortcall.find('V') == -1:
            sortedsplit = call.split('v.')
            vcallsortnum = sortedsplit[1].rjust(3, '0')
            sortcall = sortcall + ' V' + vcallsortnum
            #csv_out.writerow([sortcall,call,title,author,barcode,location]) 
          #else if v. and normalized V