File: bib2html

package info (click to toggle)
nbibtex 0.9.18-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,068 kB
  • ctags: 79
  • sloc: ansic: 814; sh: 283; makefile: 57
file content (21 lines) | stat: -rw-r--r-- 402 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env lua5.1
-- -*- mode: lua -*-

local function eprintf(...) return io.stderr:write(string.format(...)) end

require 'bibtex'
require 'nbib-html'

bst = bibtex.style 'html'

if table.getn(arg) ~= 1 then
  eprintf('Usage: %s bibname', arg[0])
  os.exit(1)
end

local bib = arg[1]

local pre, cs = bibtex.all_entries(arg[1], bst.macros())
bibtex.do_crossrefs(cs)
bst.emit(io.stdout, pre, cs)