add support for command-line usage

This commit is contained in:
Martin Monperrus
2016-08-17 13:51:21 +02:00
parent 3be64ff9b9
commit 8474129a57
4 changed files with 89 additions and 5 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
// a command line interface for bibtexbrowser
// example: php bibtexbrowser-cli.php test_cli.bib --id classical --set-title "a new title"
$_GET['library']=1;
function createBibEntry() { $x = new RawBibEntry(); return $x;}
require('bibtexbrowser.php');
bibtexbrowser_configure('BIBTEXBROWSER_BIBTEX_VIEW','reconstructed');
bibtexbrowser_configure('BIBTEXBROWSER_BIBTEX_VIEW_FILTEREDOUT','');
bibtexbrowser_cli($argv);
?>