Allow articles to be independent of an issue and allow a title for an issue

This commit is contained in:
2024-09-01 18:18:07 +02:00
parent e05521591b
commit 79ee20a50e
9 changed files with 116 additions and 89 deletions

View File

@@ -31,7 +31,10 @@ func GenerateRSS(c *Config, db *DB) (*string, error) {
for _, tag := range tags {
tagNames = append(tagNames, tag.Name)
}
tagNames = append(tagNames, fmt.Sprint("Orient Express ", article.IssueID))
if article.IsInIssue {
tagNames = append(tagNames, fmt.Sprint("Orient Express ", article.IssueID))
}
user, err := db.GetUser(article.AuthorID)
if err != nil {
@@ -57,9 +60,8 @@ func GenerateRSS(c *Config, db *DB) (*string, error) {
PubDate: article.Created.Format(time.RFC1123Z),
Title: articleTitle,
}
fmt.Println(article.Link, ": ", len(article.Link))
if article.Title == "Autogenerated cpolis Issue Article" {
if article.AutoGenerated {
item.Enclosure = &rss.Enclosure{
Url: article.EncURL,
Lenght: article.EncLength,