#!/bin/bash -e

UMEGAYA=/home/karl/upstream-metadata.debian.net/
rm -f $UMEGAYA/for_UDD/biblio.long
rm -f $UMEGAYA/for_UDD/biblio.wide
rm -f $UMEGAYA/for_UDD/biblio.yaml

for key in DOI PMID Reference-Author Reference-Eprint Reference-Journal Reference-Number Reference-Pages Reference-Title Reference-URL Reference-Volume Reference-Year References
do
  curl http://upstream-metadata.debian.net/table/$key >> $UMEGAYA/for_UDD/biblio.long
  curl http://upstream-metadata.debian.net/yaml/$key >> $UMEGAYA/for_UDD/biblio.yaml
done

$UMEGAYA/scripts/umegaya-reshape.r < $UMEGAYA/for_UDD/biblio.long | sed '1d' > $UMEGAYA/for_UDD/biblio.wide
