diff --git a/defaults.ini b/defaults.ini
index ec3f8c41..1d47e81c 100644
--- a/defaults.ini
+++ b/defaults.ini
@@ -79,7 +79,7 @@ include_subject_tags: extratags, genre, category, lastupdate, status
#include_tocpage: false
# epub->mobi conversions typically don't like tables.
-titlepage_use_table: true
+titlepage_use_table: false
## When using tables, make these span both columns.
wide_titlepage_entries: description, storyUrl, author URL
diff --git a/fanficdownloader/adapters/adapter_test1.py b/fanficdownloader/adapters/adapter_test1.py
index 3f4af12e..47f00dbc 100644
--- a/fanficdownloader/adapters/adapter_test1.py
+++ b/fanficdownloader/adapters/adapter_test1.py
@@ -46,7 +46,10 @@ Some more longer description. "I suck at summaries!" "Better than it sounds!"
''')
self.story.setMetadata('datePublished',datetime.date(1972, 01, 31))
self.story.setMetadata('dateCreated',datetime.datetime.now())
- self.story.setMetadata('dateUpdated',datetime.date(1975, 01, 31))
+ if self.story.getMetadata('storyId') == '669':
+ self.story.setMetadata('dateUpdated',datetime.datetime.now())
+ else:
+ self.story.setMetadata('dateUpdated',datetime.date(1975, 01, 31))
self.story.setMetadata('numChapters','5')
self.story.setMetadata('numWords','123456')
self.story.setMetadata('status','In-Completed')
@@ -75,15 +78,23 @@ Some more longer description. "I suck at summaries!" "Better than it sounds!"
def getChapterText(self, url):
-# return "
Really short chapter
"
-# return u'''
-#
“It might be all it takes.” He held out his hand and shook Wilfred’s, he glanced at the Vinvocci woman as she knelt there cradling the body of her partner, and he said not a word.
Disclaimer: I don't own Harry Potter or the craziness of Romilda Vane.
*EDIT* Romilda is in her 4th year, like she always has.
Thanks xxSkitten for Beta reading this! :D
Full Summary: Harry and Ginny are together. Romilda Vane is not happy. She can't stand seeing the guy she wants to be with the person she deserves to be with, with another girl - especially a girl younger that is far less pretty than her. She orders 100 Love potions from Weasley's Wizard Wheezes, Wonder Witch line. Several get to undesired targets, such as Ron Weasley. What happens when Ginny takes matters into her own hands?
Romilda Vane (3rd Person)
"Th-Tha-That little skank!" snarled Romilda Vane as she watched Harry Potter and Ginny Weasley from the balcony overlooking the common room.
"Romilda," said Abigail Stones, one of her friends, "Lets go, you don't need to watch this."
Abigail stones had long, sleek black hair that was always in a high ponytail. She had pale skin that very few blemishes. She had a long, blocky nose and a small mouth. Her hazel eyes were behind think horned rimmed glasses, and her uniform was in order without a crease or wrinkle in sight.
"What does he see in her?" Romilda snarled in a whisper, her eyes upon the red-headed fifth year. "I mean, she's all freckle-y and gingery, she's a filthy fifth year-"
"And you're a fourth year!" Abigail interjected, but Romilda just kept on ranting.
"…and I heard they live in a dump!" Her nostrils flared.
"Well what are you going to do about it, just sit and watch them all the time?" Piped up Charlotte Henderson, the second of Romilda's present friends. She had curly shoulder length blonde hair and wore a thick layer of make up to cover up her various large red pimples. Her eyes were dark blue and were surrounded with large clumpy eyelashes. She had an eager expression, like she was witnessing two people on a Muggle drama who were about to kiss.
"Of course not!" She said, looking away as Ginny kissed Harry. "I've ordered one-hundred love potions from that Wonder Witch line from Weasley's Wizard Wheezes, so once I get him in my grasp I'll have him for the rest of the year!"
"You realize," Abigail said, rolling her eyes slightly. "That with your luck, you'll get every guy in the school but him."
"It will only be for around an hour, and I could always just make him jealous by making every guy close to him fall in love with me."
Abigail sighed, "One, he has a girlfriend. Two, you already got his best friend and he wasn't jealous, he was pissed, and three, you'll get expelled before you can get to him."
"Sometimes I wonder how we're friends!" Romilda snapped at Abigail.
"We're friends because you need a good influence around you, or you would be as crazy as Peeves." Abigail stated.
Romilda spun around to glare at her friend, knowing Abigail was right but did not daring to admit it.
The silence was broken by Charlotte. "So how are you going to slip him the potion?" She asked, honestly interested.
"Just wait 'till morning, and you'll see." Romilda said, looking back down at Harry, then suddenly realizing Ginny wasn't there.
Then, Ginny appeared next to them. She stalked through their group, not looking at any of them. She stopped at the girl's dorm door and turned her head slightly to see them from the corner of her eye.
"One-hundred? You're that desperate?" Ginny said with a mix of humor and anger. Then, the red-head turned to the door and left them all in a surprised state.
"You're screwed." Abigail said matter-of-factly. She went into the dorm without another word.
"She can be so insensitive." Charlotte said, looking where Abigail had left while shaking her head.
"You can say that again," mumbled Romilda, downcast.
"She can be-" Charlotte began again, but Romilda held her hand up.
"That was a figure of speech, pea-brain." She snapped. "Sometimes you can be as dumb as that Loony Lovegood." She then stalked up to her room with one last pleading look at Harry, whispering fiercely under her breath.
"You will be mine…"
Isn't Romilda Pleasant? ;] xD Oh she's crazy, insane, envious, has stalkerish and man stealing tendencies. and that's why she's everyone's FAVORITE character.
Also Romilda's in her fourth year. yeah. oh an NO FEMSLASH geez.
Also, Abigail Stones and Charlotte Henderson are to OC's that i made up on the spot because even crazies need friends. Ones the ignored good influence and ones a stereotypical dumb 'blonde' (NO OFFENSE TO BLONDES! I'm blonde and I don't take those things that personally unless their clearly mean that way. Also Charlotte's Muggle-Born so she watches all those Muggle TV's shows were all addicted too. ;] .. )
The rest of the story will be in Ginny's point of view whether its 1st or 3rd Person IDK yet but probably 1st person. The pairing in this are - Harry x Ginny / Romilda x Harry / Ron x Hermione (hints of) / Charolette x OC (Undetermined).
Reviews = Something... GOOD!
~ Sincerely MNM
-
-#
'''
if self.story.getMetadata('storyId') == '667':
raise exceptions.FailedToDownload("Error downloading Chapter: %s!" % url)
- soup = bs.BeautifulStoneSoup(u'''
+ if "chapter=1" in url :
+ text=u'''
+
+
Prologue
+
This is a fake adapter for testing purposes. Different storyId's will give different errors:
http://test1.com?sid=669 - Succeeds with Updated Date=now
+
And other storyId will succeed with the same output.
+
+'''
+ else:
+ text=u'''
Chapter
Centered text
@@ -96,7 +107,8 @@ horizontal rules
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-''',selfClosingTags=('br','hr')) # otherwise soup eats the br/hr tags.
+'''
+ soup = bs.BeautifulStoneSoup(text,selfClosingTags=('br','hr')) # otherwise soup eats the br/hr tags.
return utf8FromSoup(soup)
def getClass():
diff --git a/fanficdownloader/adapters/base_adapter.py b/fanficdownloader/adapters/base_adapter.py
index 67c0033a..f4c012c2 100644
--- a/fanficdownloader/adapters/base_adapter.py
+++ b/fanficdownloader/adapters/base_adapter.py
@@ -27,6 +27,8 @@ class BaseSiteAdapter(Configurable):
def __init__(self, config, url):
Configurable.__init__(self, config)
self.addConfigSection(self.getSiteDomain())
+ self.addConfigSection("commandline")
+
self.opener = u2.build_opener(u2.HTTPCookieProcessor())
self.storyDone = False
self.metadataDone = False
diff --git a/fanficdownloader/writers/base_writer.py b/fanficdownloader/writers/base_writer.py
index 7e8d13c3..47024e4e 100644
--- a/fanficdownloader/writers/base_writer.py
+++ b/fanficdownloader/writers/base_writer.py
@@ -24,6 +24,8 @@ class BaseStoryWriter(Configurable):
def __init__(self, config, story):
Configurable.__init__(self, config)
self.addConfigSection(self.getFormatName())
+ ## Pass adapter instead, to check date before fetching all?
+ ## Or add 'check update' method to writer?
self.story = story
self.titleLabels = {
'category':'Category',
@@ -127,6 +129,8 @@ class BaseStoryWriter(Configurable):
def writeStory(self,outstream=None):
self.addConfigSection(self.story.getMetadata('site'))
self.addConfigSection(self.story.getMetadata('site')+":"+self.getFormatName())
+ self.addConfigSection("commandline")
+
for tag in self.getConfigList("extratags"):
self.story.addToList("extratags",tag)
@@ -148,6 +152,8 @@ class BaseStoryWriter(Configurable):
path+=dir+"/"
if not os.path.exists(path):
os.mkdir(path) ## os.makedirs() doesn't work in 2.5.2?
+
+ ## Check for output file date vs updated date here?
outstream = open(outfilename,"wb")
else:
close=False
diff --git a/fanficdownloader/writers/writer_epub.py b/fanficdownloader/writers/writer_epub.py
index 52f18dcb..e06c4140 100644
--- a/fanficdownloader/writers/writer_epub.py
+++ b/fanficdownloader/writers/writer_epub.py
@@ -57,7 +57,7 @@ h6 { text-align: center; }
-