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) } }
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)) }
func (b *Bib) load(fn string) error { app.Dprintf("add file %s\n", fn) lnc := nsutil.GetLines(fn) return b.loadLines(lnc) }