← Previous day | Today | Next day → | Search | Index
All times shown according to UTC.
Time | Nick | Message |
---|---|---|
14:54 | kyle | hey all |
14:55 | paul | hey kyle |
14:55 | kyle | I have a question you may be able to answer |
14:55 | paul | throw it |
14:56 | kyle | I'm writing a perl script that will delete all biblios that have no items attached, I'm puting it in koha/utils as that seems an appropriate place for it to go, |
14:56 | paul | right |
14:56 | kyle | but when I run it, it can't locate the C4 perl modules |
14:56 | what should I do? | |
14:56 | paul | it's a web based script ? |
14:57 | or a command line one ? | |
14:57 | kyle | I figure I'd attach it to a button somewhere in koha AND have it run nightly as a cron job |
14:57 | paul | to run it as cron job, you need to EXPORT PERL5LIB=/path/to/koha |
14:58 | (or perl -l /path/to/koha ) | |
14:58 | ( and it's not koha/utils/ but koha/tools/ ) | |
14:59 | I don't see how you'll be able to have a script running on command line AND on web interface. | |
14:59 | because to run on web interface, you need to have auth enabled. | |
14:59 | and on cron you can't/don't need it | |
15:00 | kyle | I can have it check for a command line argument, and if it doesn't find it, output html |
15:00 | paul | OK |
15:00 | don't forget some libraries also catalogate websites. | |
15:00 | kyle | can you give me more detail? |
15:00 | paul | so you should be able to avoid removing some biblios even if they don't have any item attached |
15:00 | kyle | will this cause a problem with the script. |
15:01 | is there anything in the biblio that defines if it is a website link? | |
15:01 | paul | for example, add a parameter to limit the script to a given itemtype |
15:01 | kyle | so websites have an itemtype of say 'WEB' |
15:01 | paul | for example |
15:02 | kyle | that shouldn't be hard to add, I can have it check command line and form variables for itemtypes to ignore. |
15:05 | I'm testing it and when I try to run DelBiblio I get a failure message for each one: 224 ES: immediate execuation failed. | |
15:06 | nevermind, I typed a var wrong. | |
15:07 | now I'm getting: Undefined subroutine &C4::Search::itemissues called at C4/Biblio.pm line 440. | |
15:07 | I probably just have to include C4::Search in my script. | |
15:08 | fixed that, now I'm getting: DBD::mysql::st execute failed: Unknown column 'lcsort' in 'field list' at C4/Biblio.pm line 2320. | |
15:08 | I'm just having all kinds of fun ; ) | |
15:08 | paul | lcsort... I think it's a LibLime column ;-) |
15:08 | kyle | should I fix it? |
15:11 | I suppose all I have to do is add the column lcsort to my deleteedbiblioitems table | |
15:17 | paul: assuming this script is only run from the command line, where should I put it? | |
15:17 | paul | koha/misc/cronjobs |
15:18 | kyle | thanks. |
18:00 | I finished the script, it's call scrub_orphaned_biblios.pl and is in /misc in dev_week | |
23:29 | chris | kyle you about? |
← Previous day | Today | Next day → | Search | Index