Summary: | MARC bibliographic framework plugin to generate Cutter-Sanborn | ||
---|---|---|---|
Product: | Koha | Reporter: | Ítalo <italo.barbosa.brasileiro> |
Component: | Cataloging | Assignee: | Ítalo <italo.barbosa.brasileiro> |
Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
Severity: | new feature | ||
Priority: | P5 - low | CC: | bgkriegel, carnold, david, italo.barbosa.brasileiro, josef.moravec, kohadevinim, m.de.rooy, pasi.kallinen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | Sponsored | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
First implementation of cutter generator
Plugin with comments in english Updated plugin code, using String.prototype.normalize() Bug 22371: Add MARC21 cataloguing plugin to generate Cutter-Sanborn Bug 22371: Add MARC21 cataloguing plugin to generate Cutter-Sanborn |
Description
Ítalo
2019-02-19 14:53:57 UTC
Created attachment 85466 [details] [review] First implementation of cutter generator I'm trying to test this functionality. Can you explain this step in more detail: To use the plugin, it is necessary to associate it with the Cutter field in the framework. Thanks! -cori lynn Any chance of converting the comments in the plugin to english? Should also perhaps use String.prototype.normalize() if it's available (In reply to Cori Lynn Arnold from comment #2) > I'm trying to test this functionality. Can you explain this step in more > detail: > > To use the plugin, it is necessary to associate it with the Cutter field in > the framework. > > Thanks! > -cori lynn Hello Cori! To associate the plugin with the cutter field, you must set the 'cutter.pl' plugin in your MARC framework. this can be done through the following steps: 1. Navigate to More > Administration > MARC bibliographic framework; 2. On the framework which you want to use de plugin, click on Action > MARC Structure; 3. On the field to be associated with the plugin, click on Actions > Subfields; 4. Select the tab corresponding to the cutter subfield; 5. On the "Other options (choose one)" panel, select "cutter.pl" in "Plugin" dropdown menu, and save changes. Hope it works! Created attachment 86277 [details]
Plugin with comments in english
(In reply to paxed from comment #3) > Any chance of converting the comments in the plugin to english? Paxed, I inserted a new attachment named 'Plugin with comments in english'. Created attachment 86304 [details]
Updated plugin code, using String.prototype.normalize()
(In reply to paxed from comment #4) > Should also perhaps use String.prototype.normalize() if it's available Paxed, the new attachment ('Updated plugin code, using String.prototype.normalize()') was done with normalize(). Thanks for the suggestion! (In reply to Ítalo from comment #9) > (In reply to paxed from comment #4) > > Should also perhaps use String.prototype.normalize() if it's available > > Paxed, the new attachment ('Updated plugin code, using > String.prototype.normalize()') was done with normalize(). > Thanks for the suggestion! You probably shouldn't split the string into character array (and then join it later), but use the normalize directly on the string and remove the combining diacritics (eg. with a regular expression). Hi, There are many Italian variables in code (In reply to Devinim from comment #11) > Hi, > > There are many Italian variables in code Not Italian, Portuguese :) Hi Ítalo. As this patch is not formatted the "normal" way, then the development environments we use don't work - so I'm not able to test and sign off the usual way. See the Developer Handbook, https://wiki.koha-community.org/wiki/Developer_handbook and look for : - the Development workflow (https://wiki.koha-community.org/wiki/Development_workflow) - submitting a patch https://wiki.koha-community.org/wiki/Submitting_A_Patch - commit messages https://wiki.koha-community.org/wiki/Commit_messages There is a bit of a hurdle to get these things in! Feel free to ask for help on how to do this on the bug, Development email list, or IRC (there are times where there are more people around to help - day time European and US time zones are probably better, it is normally very quiet over the weekend). I'm not a developer, so I don't think I will be much help in getting your patch formatted and attached to Bugzilla the right way... I'm also not sure whether the variable names need to be English (as per comment #11 and #12) - something some of the developers will be able to answer. I've changed status to In Discussion in the meantime until it is ready for sign off. David Nind Created attachment 119796 [details] [review] Bug 22371: Add MARC21 cataloguing plugin to generate Cutter-Sanborn To associate the plugin with the cutter field, you must set the 'cutter.pl' plugin in your MARC framework. this can be done through the following steps: 1. Navigate to More > Administration > MARC bibliographic framework; 2. On the framework which you want to use de plugin, click on Action > MARC Structure; 3. On the field to be associated with the plugin, click on Actions > Subfields; 4. Select the tab corresponding to the cutter subfield; 5. On the "Other options (choose one)" panel, select "cutter.pl" in "Plugin" dropdown menu, and save changes. I've turned this into a patch file, but haven't tested it. Please try it out! (In reply to Katrin Fischer from comment #15) > I've turned this into a patch file, but haven't tested it. Please try it out! Thanks Katrin! The patch applies, and I will have a go at testing. Created attachment 119978 [details] [review] Bug 22371: Add MARC21 cataloguing plugin to generate Cutter-Sanborn To associate the plugin with the cutter field, you must set the 'cutter.pl' plugin in your MARC framework. this can be done through the following steps: 1. Navigate to More > Administration > MARC bibliographic framework; 2. On the framework which you want to use de plugin, click on Action > MARC Structure; 3. On the field to be associated with the plugin, click on Actions > Subfields; 4. Select the tab corresponding to the cutter subfield; 5. On the "Other options (choose one)" panel, select "cutter.pl" in "Plugin" dropdown menu, and save changes. Signed-off-by: David Nind <david@davidnind.com> I'm not a cataloguer, and don't understand all the nuances here, so it may pay for someone familiar with this to review as well. Testing notes: - Followed the test plan - Added the cutter plugin to 050$a (most likely this isn't technically correct, but it shows the code being generated by cutter.pl) - Used koha-testing-docker and the sample data, tested with a couple of records - Programming Perl / Tom Christiansen, Brian D. Foy & Larry Wall. (Record number 262) . classification code generated: C555p (C = first letter of author; 555 = from table in source code from surname; p = first letter of the title) . changed indicator 2 for 245 to 4: code generated = C555r (next character in the title after 4 characters, that is, the 5th character) - Perl Better Practices (Record number 191): . added corporate author to 110$a (1151 Academia Sinica, Nanking. Inst. of Soil Science) . classification code generated: A168p (A = first letter of author; 168 = from table in source code for aca; p = first letter of the title) I really like this and always happy to have new contribs, but I am worried about something in the behaviour of this plugin. I've also tried linking it to 050$a. When I import a record with a 050$a set already or open a record that already has it and click into the field or tab through the fields, the plugin is immediately triggered, killing the original value. I think we need this to trigger only 'on demand' or when the field is empty to avoid unintentional data loss. |