diff --git a/config.yaml b/config.yaml index dc56d95..cf060cf 100644 --- a/config.yaml +++ b/config.yaml @@ -4,9 +4,12 @@ theme: light # Options: daily, yesterday, weekly or all edition: weekly feeds: + - https://programadorwebvalencia.com/feed/index.xml + - http://planet.es.python.org/rss.xml - https://diarioestoico.com/feed/ - - https://markosaric.com/feed/ - - https://jvns.ca/atom.xml + - https://republicaweb.es/feed/podcast + +old: - https://static.fsf.org/fsforg/rss/news.xml - https://hakibenita.com/feeds/all.atom.xml - https://www.blogger.com/feeds/5402814408460261521/posts/default diff --git a/rsspaper.iml b/rsspaper.iml index 1e89d7d..7f26eaa 100644 --- a/rsspaper.iml +++ b/rsspaper.iml @@ -31,6 +31,7 @@ + @@ -44,7 +45,8 @@ - + + diff --git a/src/log4j.properties b/src/log4j.properties deleted file mode 100644 index f7125ac..0000000 --- a/src/log4j.properties +++ /dev/null @@ -1,12 +0,0 @@ -log4j.rootLogger=DEBUG, R -#Output to the file, and a new file is generated when the file size reaches the specified size -log4j.appender.R=org.apache.log4j.RollingFileAppender -#Output to the console -#log4j.appender.stdout=org.apache.log4j.ConsoleAppender -#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.R.File=./log/logger1.log - -log4j.appender.R.MaxBackupIndex=20 - -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.layout.ConversionPattern=[%d][%p][%c] %m%n \ No newline at end of file diff --git a/src/rsspaper/feeds.clj b/src/rsspaper/feeds.clj index 279d80d..5246257 100644 --- a/src/rsspaper/feeds.clj +++ b/src/rsspaper/feeds.clj @@ -17,11 +17,11 @@ (defn filter-edition [articles] - (let [daily (- (c/to-long (t/now)) 86400) - weekly (- (c/to-long (t/now)) 604800)] + (let [daily (c/to-long (t/minus (t/now) (t/days 1))) + weekly (c/to-long (t/minus (t/now) (t/weeks 1)))] (case (:edition config) - "daily" (filter (fn [article] (> (:published-date article) daily)) articles) - "weekly" (filter (fn [article] (> (:published-date article) weekly)) articles) + "daily" (filter (fn [article] (>= (:published-date article) daily)) articles) + "weekly" (filter (fn [article] (>= (:published-date article) weekly)) articles) :else articles)))