EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #00536


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: add subject question


Hi Ulf,

You'll need to write your own PERL script then, have a look at how it's done on the UI (Plugin/Screen/Subject/Edit):

        my $newsubject = $subject_ds->create_object( $session, {
                subjectid => $newid,
                parents => [ $subject->get_value( "subjectid" ) ],
                depositable => 1 } );
        $newsubject->commit;

with subject_ds = $session->dataset( 'subject' );
and subject = the instanciated parent.

Seb.



On 10/05/12 14:56, Ulf Laube wrote:
Hi all,

how I can add a subject like

BAR:bar:FOO:1

onto an existing subject tree like this:

subjects:My Library:ROOT:0
FOO:foo:subjects:1

_w/o_ the web interface, on CL only?

Thanks and best regards
Ulf

BTW: I don't like to rewrite the _whole_ subject tree with
bin/import_subjects