[librecat-dev] Export into JSON using perl

Tiago Murakami trmurakami at gmail.com
Thu Mar 7 17:05:53 CET 2019


Hi,

Thanks! It is possible to, for each json, create one file?


On Thu, Mar 7, 2019 at 12:40 PM Nicolas Franck <Nicolas.Franck at ugent.be>
wrote:

>
>
> > On 7 Mar 2019, at 16:30, Tiago Murakami <trmurakami at gmail.com> wrote:
> >
> > Hi,
> >
> > I made my first perl script to convert MARC ALEPHSEQ into JSON. I can
> import and convert to JSON using myfixes. How I can export into JSON files?
> >
> > Thanks,
> >
> > =================
> >
> > use Catmandu;
> >
> > my $importer = Catmandu->importer('MARC',file => 'input/2records.seq' ,
> type => 'ALEPHSEQ');
> > my $fixer    = Catmandu->fixer('fixesCatmandu.txt');
> > my $exporter = Catmandu->exporter('JSON');
>
> my $exporter = Catmandu->exporter('JSON', file => "/path/to/my/file.json");
>
> or direct the output of stdout to a file
>
> >
> > $exporter->add_many(
> >      $fixer->fix($importer->benchmark)
> > );
> >
> > =================
> >
> > --
> > Tiago Murakami
> > _______________________________________________
> > librecat-dev mailing list
> > - send list mails to 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/
>
>

-- 
Tiago Murakami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20190307/b9562bda/attachment.html>


More information about the librecat-dev mailing list