#!/bin/sh -e
#
# Copyright (C) 2010-2025 by Thomas Dreibholz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Contact: thomas.dreibholz@gmail.com

DOWNLOAD="${HOME}/tmp/BibTeXConv"
mkdir -p "$DOWNLOAD"


bibtexconv ExampleReferences.bib --export-to-bibtex=UpdatedReferences.bib --check-urls --only-check-new-urls --non-interactive

bibtexconv ExampleReferences.bib <web-example1.export >MyPublications1.html

bibtexconv ExampleReferences.bib --mapping=author-url:authors.list:Name:URL <web-example2.export >MyPublications2.html

bibtexconv ExampleReferences.bib <text-example.export >MyPublications.txt

bibtexconv ExampleReferences.bib <yaml-example.export >MyPublications.yaml

bibtexconv ExampleReferences.bib --export-to-separate-xmls="$DOWNLOAD/reference." --non-interactive

bibtexconv ExampleReferences.bib --non-interactive --export-to-separate-bibtexs="$DOWNLOAD/"

bibtexconv ExampleReferences.bib --export-to-bibtex=UpdatedReferences.bib --check-urls --store-downloads="$DOWNLOAD" --non-interactive

bibtexconv-odt ODT-Template.odt MyPublications.odt ExampleReferences.bib odt-example.export

soffice --convert-to docx MyPublications.odt
