Exemplo n.º 1
0
func TestBib2ref(t *testing.T) {
	c := app.New()
	defer app.Exiting()
	c.Debug = testing.Verbose()
	lnc := nsutil.GetLines("/zx/lib/bib/zx.bib")
	rc := bib2ref(lnc)
	for ln := range rc {
		app.Dprintf("%s", ln)
	}
}
Exemplo n.º 2
0
func (b *Bib) loadBib(fn string) error {
	lnc := nsutil.GetLines(fn)
	ln := <-lnc
	if !strings.Contains(ln, "bib2ref ok") {
		close(lnc, "not for me")
		return nil
	}
	app.Dprintf("add file %s\n", fn)
	return b.loadLines(bib2ref(lnc))
}
Exemplo n.º 3
0
func (b *Bib) load(fn string) error {
	app.Dprintf("add file %s\n", fn)
	lnc := nsutil.GetLines(fn)
	return b.loadLines(lnc)
}