I tried the perl that Jonathan sent but the Internet did not give good advise on how to run the perl. Here is what I typed: """ use Modern::Perl; use Koha::Biblios; use Koha::Items; my $biblios = Koha::Biblios->search; my $branchcode='ppa'; while ( my $biblio=$biblios->next) { Koha::Item->new( { biblionumber => $biblio->biblionumber, homebranch => $branchcode, holingbranch =>$branchcode, barccode =>"barcode_'.$biblio->biblionumber, itype =>$biblio->biblioitem->itemtype, } )-store; } """ My test machine has a mind of its own. On Monday because it was a Federal holiday it did not want to work. It is a 32 bit machine with ubuntu 14.04 and Koha 16.05.05. When I tried to run barodes.pl all it did was make Koha think it was just installed. I am doing something wrong but have no idea what it is. Anything that works on that machine will work on my 64 bit machine with Ubuntu 20.04.1 with Koha 20.11.02. Br Raphael
Excerpts from library's message of 2021-02-18 10:22:59 -0600:
I tried the perl that Jonathan sent but the Internet did not give good advise on how to run the perl. Here is what I typed:
When I compare Jonathon's script with yours, I see some typos in yours: holingbranch =>$branchcode, This should be holdingbranch. barccode =>"barcode_'.$biblio->biblionumber, The single quote ' should be a double quote ". )-store; There should be a > after the -, i.e. -> To run this script, first use this command to set up the proper environment: koha-shell INSTANCE where INSTANCE is your Koha instance name (it appears to be ppa in your case). Then you can run the script using this: perl scriptname.pl -- To any truly impartial person, it would be obvious that I'm always right. --Ashleigh Brilliant
Thanks for seeing my typos. Now it is giving me this message: String found where operator expected at barcode.pl line 22, near “”” (Might be a runaaway multi-line “” string starting on line 1) (Missing semicolon on previous line?) syntax error at barcode.pl line 22, near “”” execution of barcode.pl aborted due to compilation errors. Quoting Mark Alexander <marka@pobox.com>:
Excerpts from library's message of 2021-02-18 10:22:59 -0600:
I tried the perl that Jonathan sent but the Internet did not give good advise on how to run the perl. Here is what I typed:
When I compare Jonathon's script with yours, I see some typos in yours:
holingbranch =>$branchcode,
This should be holdingbranch.
barccode =>"barcode_'.$biblio->biblionumber,
The single quote ' should be a double quote ".
)-store;
There should be a > after the -, i.e. ->
To run this script, first use this command to set up the proper environment:
koha-shell INSTANCE
where INSTANCE is your Koha instance name (it appears to be ppa in your case).
Then you can run the script using this:
perl scriptname.pl
-- To any truly impartial person, it would be obvious that I'm always right. --Ashleigh Brilliant _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Also, barccode should be barcode, right? --Ere Mark Alexander kirjoitti 18.2.2021 klo 18.52:
Excerpts from library's message of 2021-02-18 10:22:59 -0600:
I tried the perl that Jonathan sent but the Internet did not give good advise on how to run the perl. Here is what I typed:
When I compare Jonathon's script with yours, I see some typos in yours:
holingbranch =>$branchcode,
This should be holdingbranch.
barccode =>"barcode_'.$biblio->biblionumber,
The single quote ' should be a double quote ".
)-store;
There should be a > after the -, i.e. ->
To run this script, first use this command to set up the proper environment:
koha-shell INSTANCE
where INSTANCE is your Koha instance name (it appears to be ppa in your case).
Then you can run the script using this:
perl scriptname.pl
-- Ere Maijala Kansalliskirjasto / The National Library of Finland
participants (3)
-
Ere Maijala -
library@princeofpeaceabbey.org -
Mark Alexander