diff --git a/app/router.go b/app/router.go
index 4da2f7d..d7f48b8 100644
--- a/app/router.go
+++ b/app/router.go
@@ -60,6 +60,9 @@ func Router() {
}
p, _ := strconv.Atoi(arg("p"))
skunky.Page = p
+ if arg("atom") == "true" {
+ skunky.atom = true
+ }
// пути
switch path[1] {
diff --git a/app/util.go b/app/util.go
index cda0ffc..0d36fd8 100644
--- a/app/util.go
+++ b/app/util.go
@@ -200,39 +200,87 @@ func (s skunkyart) NavBase(c dlist) string {
func (s skunkyart) DeviationList(devs []devianter.Deviation, content ...dlist) string {
var list strings.Builder
- list.WriteString(`
`)
+ if !s.atom {
+ list.WriteString(`
`)
+ } else {
+ list.WriteString(`
`)
+ list.WriteString(`SkunkyArt `)
+ // list.WriteString(` `)
+ }
for _, data := range devs {
url := devianter.UrlFromMedia(data.Media)
+ if s.atom {
+ id := strconv.Itoa(data.ID)
+ list.WriteString(``)
+ list.WriteString(data.Author.Username)
+ list.WriteString(` `)
+ list.WriteString(data.Title)
+ list.WriteString(` `)
+ list.WriteString(id)
+ list.WriteString(` `)
+ list.WriteString(data.PublishedTime.UTC().Format("Mon, 02 Jan 2006 15:04:05 -0700"))
+ list.WriteString(` `)
+ list.WriteString(``)
+ list.WriteString(data.Title)
+ list.WriteString(` `)
+ list.WriteString(ParseDescription(data.TextContent))
+ list.WriteString(`
`)
+ } else {
+ list.WriteString(`")
}
- list.WriteString(" ")
- list.WriteString(s.NavBase(content[0]))
+
+ if s.atom {
+ list.WriteString("")
+ s.Writer.Write([]byte(list.String()))
+ return ""
+ } else {
+ list.WriteString("
")
+ list.WriteString(s.NavBase(content[0]))
+ }
return list.String()
}
diff --git a/app/wraper.go b/app/wraper.go
index f3f025d..757602c 100644
--- a/app/wraper.go
+++ b/app/wraper.go
@@ -20,6 +20,7 @@ type skunkyart struct {
Type rune
Query string
Page int
+ atom bool
Templates struct {
GroupUser struct {
GR devianter.GRuser
@@ -64,6 +65,7 @@ func (s skunkyart) GRUser() {
switch s.Type {
case 'a':
g := group.GR
+ s.atom = false
for _, x := range g.Gruser.Page.Modules {
switch x.Name {
case "about", "group_about":
@@ -173,7 +175,9 @@ func (s skunkyart) GRUser() {
s.ReturnHTTPError(400)
}
- s.ExecuteTemplate("html/gruser.htm", &s)
+ if !s.atom {
+ s.ExecuteTemplate("html/gruser.htm", &s)
+ }
}
// посты
@@ -217,13 +221,17 @@ func (s skunkyart) Deviation(author, postname string) {
func (s skunkyart) DD() {
dd := devianter.DailyDeviationsFunc(s.Page)
- s.ExecuteTemplate("html/list.htm", s.DeviationList(dd.Deviations, dlist{
+ ddparsed := s.DeviationList(dd.Deviations, dlist{
Pages: 0,
More: dd.HasMore,
- }))
+ })
+ if !s.atom {
+ s.ExecuteTemplate("html/list.htm", &ddparsed)
+ }
}
func (s skunkyart) Search() {
+ s.atom = false
var e error
ss := &s.Templates.Search
switch s.Type {
diff --git a/atom.xml b/atom.xml
new file mode 100644
index 0000000..784f37d
--- /dev/null
+++ b/atom.xml
@@ -0,0 +1,43 @@
+
+
+
+ yt:channel:UCuxpxCCevIlF-k-K5YU8XPA
+ UCuxpxCCevIlF-k-K5YU8XPA
+ https://yt3.googleusercontent.com/ytc/AIdro_n7bKr9iusclFjvYw3U8UR74iTCoMcdGTKI3h55SOG8mSsY=s900-c-k-c0x00ffffff-no-rj
+ Test
+
+
+ lost+skunk
+ https://skunky.ebloid.ru
+
+
+ https://ebloid.ru/_matrix/media/v3/download/ebloid.ru/enfAtfdjzCQMRNBgLXmiURfJ?allow_redirect=true
+ lost+skunk
+
+
+
+ Test
+
+
+ lost+skunk
+ https://skunky.ebloid.ru
+
+
+
+
+ 2024-07-04T00:37:55+00:00
+
+ GM Just Announced Their Shutting Down Production in America and Firing Their Workers
+
+ test
+
+
+
+
+
+
diff --git a/html/gruser.htm b/html/gruser.htm
index 9035a88..89347aa 100644
--- a/html/gruser.htm
+++ b/html/gruser.htm
@@ -13,8 +13,8 @@