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