mirror of
https://github.com/moparisthebest/ComicReader
synced 2024-11-15 13:45:07 -05:00
Fixed the filenames for some of the classes from previous commit + converted WaywardSons to ArchiveComic
This commit is contained in:
parent
3adff0da56
commit
e94bf3ac6b
@ -269,12 +269,12 @@
|
||||
{"class":"GoComics.MythTickle", "name":"MythTickle", "pref":"mythticklePref"},
|
||||
{"class":"GoComics.Nancy", "name":"Nancy", "pref":"nancyPref"},
|
||||
{"class":"GoComics.NestHeads", "name":"Nest Heads", "pref":"nestheadsPref"},
|
||||
{"class":"GoComics.NEUROTICA", "name":"NEUROTICA", "pref":"neuroticaPref"},
|
||||
{"class":"GoComics.Neurotica", "name":"Neurotica", "pref":"neuroticaPref"},
|
||||
{"class":"GoComics.NewAdventuresofQueenVictoria", "name":"New Adventures of Queen Victoria", "pref":"thenewadventuresofqueenvictoriaPref"},
|
||||
{"class":"GoComics.NonSequitur", "name":"Non Sequitur", "pref":"nonsequiturPref"},
|
||||
{"class":"GoComics.TheNormClassics", "name":"The Norm Classics", "pref":"thenormPref"},
|
||||
{"class":"GoComics.NothingisNotSomething", "name":"Nothing is Not Something", "pref":"nothingisnotsomethingPref", "new":"1"},
|
||||
{"class":"GoComics.OfftheMark", "name":"Off the Mark", "pref":"offthemarkPref"},
|
||||
{"class":"GoComics.OffTheMark", "name":"Off The Mark", "pref":"offthemarkPref"},
|
||||
{"class":"GoComics.OllieandQuentin", "name":"Ollie and Quentin", "pref":"ollieandquentinPref", "new":"1"},
|
||||
{"class":"GoComics.OnAClaireDay", "name":"On A Claire Day", "pref":"onaclairedayPref"},
|
||||
{"class":"GoComics.OneBigHappy", "name":"One Big Happy", "pref":"onebighappyPref"},
|
||||
@ -319,7 +319,7 @@
|
||||
{"class":"GoComics.SkinHorse", "name":"Skin Horse", "pref":"skinhorsePref"},
|
||||
{"class":"GoComics.Skippy", "name":"Skippy", "pref":"skippyPref", "new":"1"},
|
||||
{"class":"GoComics.Slowpoke", "name":"Slowpoke", "pref":"slowpokePref"},
|
||||
{"class":"GoComics.SouptoNutz", "name":"Soup to Nutz", "pref":"souptonutzPref"},
|
||||
{"class":"GoComics.SoupToNutz", "name":"Soup To Nutz", "pref":"souptonutzPref"},
|
||||
{"class":"GoComics.SpeedBump", "name":"Speed Bump", "pref":"speedbumpPref"},
|
||||
{"class":"GoComics.SpottheFrog", "name":"Spot the Frog", "pref":"spotthefrogPref"},
|
||||
{"class":"GoComics.Starslip", "name":"Starslip", "pref":"starslipPref", "new":"1"},
|
||||
@ -336,7 +336,7 @@
|
||||
{"class":"GoComics.Thatababy", "name":"Thatababy", "pref":"thatababyPref"},
|
||||
{"class":"GoComics.ThinLines", "name":"Thin Lines", "pref":"thinlinesPref"},
|
||||
{"class":"GoComics.TinySepuku", "name":"Tiny Sepuku", "pref":"tinysepukuPref"},
|
||||
{"class":"GoComics.TOBY", "name":"TOBY", "pref":"tobyPref"},
|
||||
{"class":"GoComics.Toby", "name":"Toby", "pref":"tobyPref"},
|
||||
{"class":"GoComics.TodaysDogg", "name":"Today's Dogg", "pref":"todaysdoggPref"},
|
||||
{"class":"GoComics.TomtheDancingBug", "name":"Tom the Dancing Bug", "pref":"tomthedancingbugPref"},
|
||||
{"class":"GoComics.TooMuchCoffeeMan", "name":"Too Much Coffee Man", "pref":"toomuchcoffeemanPref"},
|
||||
|
@ -3,8 +3,8 @@ package com.blogspot.applications4android.comicreader.comics.GoComics;
|
||||
import java.util.Calendar;
|
||||
import com.blogspot.applications4android.comicreader.comictypes.DailyGoComicsCom;
|
||||
|
||||
public class NEUROTICA extends DailyGoComicsCom {
|
||||
public NEUROTICA() {
|
||||
public class Neurotica extends DailyGoComicsCom {
|
||||
public Neurotica() {
|
||||
super();
|
||||
mComicName = "neurotica";
|
||||
mFirstCal = Calendar.getInstance();
|
||||
|
@ -3,8 +3,8 @@ package com.blogspot.applications4android.comicreader.comics.GoComics;
|
||||
import java.util.Calendar;
|
||||
import com.blogspot.applications4android.comicreader.comictypes.DailyGoComicsCom;
|
||||
|
||||
public class OfftheMark extends DailyGoComicsCom {
|
||||
public OfftheMark() {
|
||||
public class OffTheMark extends DailyGoComicsCom {
|
||||
public OffTheMark() {
|
||||
super();
|
||||
mComicName = "offthemark";
|
||||
mFirstCal = Calendar.getInstance();
|
||||
|
@ -3,8 +3,8 @@ package com.blogspot.applications4android.comicreader.comics.GoComics;
|
||||
import java.util.Calendar;
|
||||
import com.blogspot.applications4android.comicreader.comictypes.DailyGoComicsCom;
|
||||
|
||||
public class SouptoNutz extends DailyGoComicsCom {
|
||||
public SouptoNutz() {
|
||||
public class SoupToNutz extends DailyGoComicsCom {
|
||||
public SoupToNutz() {
|
||||
super();
|
||||
mComicName = "soup-to-nutz";
|
||||
mFirstCal = Calendar.getInstance();
|
||||
|
@ -3,8 +3,8 @@ package com.blogspot.applications4android.comicreader.comics.GoComics;
|
||||
import java.util.Calendar;
|
||||
import com.blogspot.applications4android.comicreader.comictypes.DailyGoComicsCom;
|
||||
|
||||
public class TOBY extends DailyGoComicsCom {
|
||||
public TOBY() {
|
||||
public class Toby extends DailyGoComicsCom {
|
||||
public Toby() {
|
||||
super();
|
||||
mComicName = "toby";
|
||||
mFirstCal = Calendar.getInstance();
|
||||
|
@ -2,57 +2,27 @@ package com.blogspot.applications4android.comicreader.comics;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.util.Calendar;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.blogspot.applications4android.comicreader.comictypes.DailyComic;
|
||||
import com.blogspot.applications4android.comicreader.comictypes.ArchivedComic;
|
||||
import com.blogspot.applications4android.comicreader.core.Strip;
|
||||
|
||||
|
||||
|
||||
public class WaywardSons extends DailyComic {
|
||||
public class WaywardSons extends ArchivedComic {
|
||||
|
||||
@Override
|
||||
public String getComicWebPageUrl() {
|
||||
return "http://waywardsons.keenspot.com/";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Calendar getFirstCalendar() {
|
||||
Calendar first = Calendar.getInstance();
|
||||
first.set(2010, 4, 31); // 2010 05 31
|
||||
return first;
|
||||
}
|
||||
|
||||
protected Calendar getLatestCalendar() {
|
||||
return Calendar.getInstance(m_zone);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Calendar getTimeFromUrl(String url) {
|
||||
String str = url.replace("http://waywardsons.keenspot.com/d/", "");
|
||||
str = str.replace(".html", "");
|
||||
int year = Integer.parseInt(str.substring(0, 4));
|
||||
int month = Integer.parseInt(str.substring(4, 6)) - 1;
|
||||
int day = Integer.parseInt(str.substring(6));
|
||||
Calendar date = Calendar.getInstance();
|
||||
date.set(year, month, day);
|
||||
return date;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUrlFromTime(Calendar cal) {
|
||||
return String.format("http://waywardsons.keenspot.com/d/%4d%02d%02d.html",
|
||||
cal.get(Calendar.YEAR), cal.get(Calendar.MONTH)+1, cal.get(Calendar.DAY_OF_MONTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean htmlNeeded() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String parse(String url, BufferedReader reader, Strip strip)
|
||||
throws IOException {
|
||||
protected String parse(String url, BufferedReader reader, Strip strip) throws IOException {
|
||||
String date = strip.uid().replace("http://waywardsons.keenspot.com/d/", "");
|
||||
date = date.replace(".html", "");
|
||||
String str = "http://cdn.waywardsons.keenspot.com/comics/" + date + ".jpg";
|
||||
@ -60,4 +30,31 @@ public class WaywardSons extends DailyComic {
|
||||
strip.setText("-NA-");
|
||||
return str;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] getAllComicUrls(BufferedReader reader) throws IOException {
|
||||
int idx = 0;
|
||||
ArrayList<String> m_com = new ArrayList<String>();
|
||||
String str,str_temp;
|
||||
int i;
|
||||
while((str = reader.readLine()) != null) {
|
||||
i = str.indexOf("<a href=\"/d/");
|
||||
if (i != -1) {
|
||||
str_temp = str;
|
||||
str_temp=str_temp.replaceAll(".*href=\"","");
|
||||
str_temp=str_temp.replaceAll("\".*","");
|
||||
str_temp="http://waywardsons.keenspot.com"+str_temp;
|
||||
m_com.add(str_temp);
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
String[] m_com_urls = new String[idx];
|
||||
m_com.toArray(m_com_urls);
|
||||
return m_com_urls;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getArchiveUrl() {
|
||||
return "http://waywardsons.keenspot.com/archive.html";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user