Passing the validator
This commit is contained in:
12
main.go
12
main.go
@@ -114,6 +114,11 @@ func writeCatalogFeed(w io.Writer, u *url.URL) error {
|
|||||||
feed := &CatalogFeed{ID: u.Path, Title: "Catalog feed in " + u.Path}
|
feed := &CatalogFeed{ID: u.Path, Title: "Catalog feed in " + u.Path}
|
||||||
feed.Author = &atom.Person{Name: author, Email: authorEmail, URI: authorUri}
|
feed.Author = &atom.Person{Name: author, Email: authorEmail, URI: authorUri}
|
||||||
feed.Updated = updated
|
feed.Updated = updated
|
||||||
|
feed.Link = []atom.Link{{
|
||||||
|
Rel: "start",
|
||||||
|
Href: "/",
|
||||||
|
Type: "application/atom+xml;profile=opds-catalog;kind=navigation",
|
||||||
|
}}
|
||||||
|
|
||||||
abs_path := filepath.Join(dirRoot, u.Path)
|
abs_path := filepath.Join(dirRoot, u.Path)
|
||||||
fis, err := ioutil.ReadDir(abs_path)
|
fis, err := ioutil.ReadDir(abs_path)
|
||||||
@@ -131,6 +136,7 @@ func writeCatalogFeed(w io.Writer, u *url.URL) error {
|
|||||||
ID: filepath.Join(u.Path, fi.Name()),
|
ID: filepath.Join(u.Path, fi.Name()),
|
||||||
Title: fi.Name(),
|
Title: fi.Name(),
|
||||||
Updated: updated,
|
Updated: updated,
|
||||||
|
Published: updated,
|
||||||
Link: []atom.Link{link},
|
Link: []atom.Link{link},
|
||||||
}
|
}
|
||||||
feed.Entry = append(feed.Entry, entry)
|
feed.Entry = append(feed.Entry, entry)
|
||||||
@@ -150,6 +156,11 @@ func writeAcquisitionFeed(w io.Writer, u *url.URL) error {
|
|||||||
feed.Updated = updated
|
feed.Updated = updated
|
||||||
feed.Title = filepath.Base(u.Path)
|
feed.Title = filepath.Base(u.Path)
|
||||||
feed.Author = &atom.Person{Name: author, Email: authorEmail, URI: authorUri}
|
feed.Author = &atom.Person{Name: author, Email: authorEmail, URI: authorUri}
|
||||||
|
feed.Link = []atom.Link{{
|
||||||
|
Rel: "start",
|
||||||
|
Href: "/",
|
||||||
|
Type: "application/atom+xml;profile=opds-catalog;kind=navigation",
|
||||||
|
}}
|
||||||
|
|
||||||
abs_path := filepath.Join(dirRoot, u.Path)
|
abs_path := filepath.Join(dirRoot, u.Path)
|
||||||
fis, err := ioutil.ReadDir(abs_path)
|
fis, err := ioutil.ReadDir(abs_path)
|
||||||
@@ -160,6 +171,7 @@ func writeAcquisitionFeed(w io.Writer, u *url.URL) error {
|
|||||||
ID: u.Path,
|
ID: u.Path,
|
||||||
Title: filepath.Base(u.Path),
|
Title: filepath.Base(u.Path),
|
||||||
Updated: updated,
|
Updated: updated,
|
||||||
|
Published: updated,
|
||||||
}
|
}
|
||||||
for _, fi := range fis {
|
for _, fi := range fis {
|
||||||
ext := filepath.Ext(fi.Name())
|
ext := filepath.Ext(fi.Name())
|
||||||
|
Reference in New Issue
Block a user