projects
/
ferlib2koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fed2025
)
generate nick for ferweb
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 15 Aug 2011 14:13:16 +0000
(16:13 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 15 Aug 2011 14:16:35 +0000
(16:16 +0200)
isvu-import.pl
patch
|
blob
|
history
diff --git
a/isvu-import.pl
b/isvu-import.pl
index
6a67057
..
44defc4
100755
(executable)
--- a/
isvu-import.pl
+++ b/
isvu-import.pl
@@
-14,5
+14,18
@@
select * from brucosi_2011_ISVU
$s->execute;
while( my $row = $s->fetchrow_hashref ) {
- print "# row = ",dump($row),$/;
+
+ my $nick = sprintf '%s%s%s'
+ , substr($row->{ime},0,1)
+ , substr($row->{prezime},0,1)
+ , $row->{jmbag} =~ m/^0036/
+ ? substr($row->{jmbag},4,-1)
+ : substr($row->{jmbag},0,-1)
+ ;
+
+ $nick = lc unac_string('utf-8', $nick);
+
+ print "$nick ", $row->{jmbag},$/;
+
+ warn "# $nick row = ",dump($row),$/;
}