From edf0639a237a4bceedaaa71290b933cdb8488a39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 20 Sep 2020 18:39:01 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=8E=A8=20Replace=20BC=20watcher=20with=20K?= =?utf8?q?otlin=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../rhynodge/watchers/BusinessCatWatcher.java | 22 ---------------------- .../rhynodge/watchers/BusinessCatWatcher.kt | 12 ++++++++++++ 2 files changed, 12 insertions(+), 22 deletions(-) delete mode 100644 src/main/java/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.java create mode 100644 src/main/kotlin/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.kt diff --git a/src/main/java/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.java b/src/main/java/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.java deleted file mode 100644 index 5d21b36..0000000 --- a/src/main/java/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.pterodactylus.rhynodge.watchers; - -import java.util.Arrays; - -import net.pterodactylus.rhynodge.Watcher; -import net.pterodactylus.rhynodge.filters.HtmlFilter; -import net.pterodactylus.rhynodge.filters.comics.BusinessCatComicFilter; -import net.pterodactylus.rhynodge.queries.HttpQuery; -import net.pterodactylus.rhynodge.triggers.NewComicTrigger; - -/** - * {@link Watcher} implementation that watches for new Business Cat comics. - * - * @author David ‘Bombe’ Roden - */ -public class BusinessCatWatcher extends DefaultWatcher { - - public BusinessCatWatcher() { - super(new HttpQuery("https://www.businesscatcomic.com/"), Arrays.asList(new HtmlFilter(), new BusinessCatComicFilter()), new NewComicTrigger()); - } - -} diff --git a/src/main/kotlin/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.kt b/src/main/kotlin/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.kt new file mode 100644 index 0000000..94fe96d --- /dev/null +++ b/src/main/kotlin/net/pterodactylus/rhynodge/watchers/BusinessCatWatcher.kt @@ -0,0 +1,12 @@ +package net.pterodactylus.rhynodge.watchers + +import net.pterodactylus.rhynodge.filters.HtmlFilter +import net.pterodactylus.rhynodge.filters.comics.BusinessCatComicFilter +import net.pterodactylus.rhynodge.queries.HttpQuery +import net.pterodactylus.rhynodge.triggers.NewComicTrigger + +class BusinessCatWatcher : DefaultWatcher(query, filters, trigger) + +private val query = HttpQuery("https://www.businesscatcomic.com/") +private val filters = listOf(HtmlFilter(), BusinessCatComicFilter()) +private val trigger = NewComicTrigger() -- 2.7.4