[librecat-dev] overriding a config item

Jonathan NORRIS jnorris at ist.ac.at
Thu Jun 14 11:02:57 CEST 2018


Hey,

Thanks for the tip, it worked great!

Jonathan


On 06/14/2018 09:58 AM, Nicolas Steenlant wrote:
> Hello Jonathan,
>
> sorry I didn’t realize your list is not an array but a hash.
> You can delete the items like this:
>
> ddc:
>   000:
>      optgroup: bla
>      000: '!DELETE!'
>      004: foo
>      005: '!DELETE!'
>      006: bar
>
> this will only retain 004 and 006
>
> it’s verbose but should work.
>
> Regards, Nicolas
>
> --
> Nicolas Steenlant
> software developer at University Library Ghent
>
>
>> On 14 Jun 2018, at 09:52, Jonathan NORRIS <jnorris at ist.ac.at 
>> <mailto:jnorris at ist.ac.at>> wrote:
>>
>> Hey,
>>
>> The lists.yml file in my layer looks like this:
>>
>> _prefix:
>> lists:
>> oa_version:
>> - "None"
>> - "Draft"
>> - "Preprint"
>> - "Submitted Version"
>> - "Published Version"
>> - "Updated Version"
>> ddc:
>> 000:
>> optgroup: "000 Computer science, information & general works"
>> 000: "-- 000 Computer science, knowledge & systems"
>> 004: "---- 004 Data processing, computer science, computer systems"
>> 006: "---- 006 Computer science, knowledge & systems"
>> 020: "-- 020 Library & information sciences"
>> 070: "-- 070 News media, journalism & publishing"
>> 500:
>> optgroup: "500 Science"
>> 510: "-- 510 Mathematics"
>> 520: "-- 520 Astronomy"
>> 530: "-- 530 Physics"
>> 540: "-- 540 Chemistry"
>> 550: "-- 550 Earth sciences & geology"
>> 560: "-- 560 Fossils & prehistoric life"
>> 570: "-- 570 Life sciences; biology"
>> 572: "---- 572 Biochemistry"
>> 580: "-- 580 Plants (Botany)"
>> 590: "-- 590 Animals (Zoology)"
>> 600:
>> optgroup: "600 Technology"
>> 600: "-- 600 Technology"
>> 610: "-- 610 Medicine & health"
>> 620: "-- 620 Engineering"
>> 630: "-- 630 Agriculture"
>> 660: "-- 660 Chemical engineering"
>> 660.6: "---- 660.6 Biotechnology"
>> 690: "-- 690 Building & construction"
>>
>>
>> There reason I believed there was merging going on was because I 
>> added an extra line in one of the ddc lists above, as a test, then 
>> after generating the forms the new line appeared but also with the 
>> total ddc list. So my reduced list, plus the extra test line, plus 
>> the rest of the list defined in the non-layer lists.yml file appeared 
>> in the ddc field of the forms.
>>
>>
>> Jonathan
>>
>> IST Austria
>>
>>
>>
>> On 06/14/2018 09:41 AM, Nicolas Steenlant wrote:
>>> Hello Jonathan,
>>>
>>> lists in the config don’t get merged, are you sure you’re overriding 
>>> the right key?
>>>
>>> Regards,
>>> Nicolas
>>> --
>>> Nicolas Steenlant
>>> software developer at University Library Ghent
>>>
>>>
>>>> On 14 Jun 2018, at 09:37, Jonathan NORRIS <jnorris at ist.ac.at 
>>>> <mailto:jnorris at ist.ac.at>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I was wondering if there is a way to totally override a config 
>>>> item? For example, I want to reduce the amount displayed by the DDC 
>>>> list in lists.yml. So in my layer I have a lists.yml file with a 
>>>> reduced DDC list. But when rebuilding the forms I see no 
>>>> difference, I still get the full list, presumably as it is merged 
>>>> with the original list outside of my layer.
>>>>
>>>> Is there a way to stop this merging for a particular config item? 
>>>> Its great when you want to expand the config, but is there a 
>>>> strategy when you want to reduce something?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Jonathan
>>>>
>>>> IST Austria
>>>>
>>>> _______________________________________________
>>>> librecat-dev mailing list
>>>> - send list mails to librecat-dev at lists.uni-bielefeld.de 
>>>> <mailto:librecat-dev at lists.uni-bielefeld.de>
>>>> - to unsubscribe or change options, visit 
>>>> https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
>>>> - project website: http://librecat.org/ <http://librecat.org/>
>>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20180614/81afa3cf/attachment.html>


More information about the librecat-dev mailing list