.. _further: Going further... ================== Using the Kbart files is also an opportunity to get a bit into OpenEdition's data. As an example, this page will show how to retrieve structured metadata about available issues for a given journal, using KBART files. We will be using common command line tools to illustrate how it can be achieved but other implementations are possible. We'll be working on the journal identified by ISSN `2275-2145 `_, *Sciences de la société* .. contents:: Table of Contents :depth: 2 Get the KBART from BACON -------------------------------- First we need to get the data. Refer to the :ref:`access section of this documentation` in order to identify the relevant package for your case and its URL. We use here the whole OpenEdition Journal catalogue, so the matching URL is ``https://bacon.abes.fr/package2kbart/OPENEDITION_GLOBAL_ALLJOURNALS.txt`` For this example, we will be using `curl `_ to download the desired KBART file: .. code-block:: bash $ curl https://bacon.abes.fr/package2kbart/OPENEDITION_GLOBAL_ALLJOURNALS.txt Extract a journal's data -------------------------------- This last command will pour the entire catalogue description as TSV in the console and its output won't be shown here. Instead, we'll pipe (``|``) it to `grep `_ in order to isolate the target journal, with ``grep 2275-2145``: .. code-block:: bash $ curl https://bacon.abes.fr/package2kbart/OPENEDITION_GLOBAL_ALLJOURNALS.txt | grep 2275-2145 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 32736 0 32736 0 0 9977 0 --:--:-- 0:00:03 --:--:-- 9977 Sciences de la société 1168-1446 2275-2145 2010 79 http://journals.openedition.org/sds sds fulltext Full access to the HTML version of the content. Access to PDF and Epub reserved to subscribing institutions. Presses universitaires du Midi serial F 180782584 Parse columns to find an identifier ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please refer to the :ref:`data description section of this documentation` in order to identify the relevant fields for your case. Here, the identifier we need is in the ``target_id`` column, which happens to be the twelfth. Then we can simply `cut `_ the line to extract this identifier, with ``cut -d$'\t' -f12``: .. code-block:: bash $ curl https://bacon.abes.fr/package2kbart/OPENEDITION_GLOBAL_ALLJOURNALS.txt | grep 2275-2145 | cut -d$'\t' -f12 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 119k 0 119k 0 0 40395 0 --:--:-- 0:00:03 --:--:-- 40395 sds Query OAI-PMH -------------------------------- Now we will query the OpenEdition OAI-PMH repository using this identifier. Please refer to the `documentation `_ if you need more information about it. We will use this sample query URL from the documentation, which expects a journal identifier to be appended to it: ``http://oai.openedition.org/?verb=ListRecords&metadataPrefix=mets&set=journals:`` So we can use the commands we already saw to append this identifier: .. code-block:: bash $ curl https://bacon.abes.fr/package2kbart/OPENEDITION_GLOBAL_ALLJOURNALS.txt | grep 2275-2145 | cut -d$'\t' -f12 | curl "http://oai.openedition.org/?verb=ListRecords&metadataPrefix=mets&set=journals:$( 2020-03-24T14:51:22Z http://oai.openedition.org/
oai:revues.org:sds/6800 2019-11-25T16:59:19Z journals journals:sds openaire
L'événement politique en ligne issue [...] output has been truncated We now have a XML-structured list of records, formatted as Metadata Encoding and Transmission Standard (mets), describing available issues for the journal *Sciences de la société*, identified by ISSN 2275-2145.