Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add description as separate field

  • Loading branch information...
commit 1b817ab868cd31000e653a06cf931b43b754a456 1 parent f83b9f7
Tom Parker authored
Showing with 8 additions and 8 deletions.
  1. +6 −4 blog.proto
  2. +2 −4 grabber.py
10 blog.proto
View
@@ -3,10 +3,12 @@ package blog;
message Series
{
required string name = 1;
- required string startPage = 2;
- required string titlePattern = 3;
- required string contentPattern = 4;
- required string nextPattern = 5;
+ required string description = 2;
+ optional string author = 3 [default = "Various"];
+ required string startPage = 4;
+ required string titlePattern = 5;
+ required string contentPattern = 6;
+ required string nextPattern = 7;
}
message All
6 grabber.py
View
@@ -7,18 +7,16 @@
c = Cache()
-series = "Tales of Mu"
-
db = All()
db.ParseFromString(open("series.list", "rb").read())
for s in db.series:
- if s.name == series:
+ if s.name in argv[1:]:
print s
page = s.startPage
index = 1
while page!=None:
- folder = "%s #%02d"%(s.name, index)
+ folder = "%s #%02d"%(s.description, index)
if not exists(folder):
mkdir(folder)
toc = open(join(folder, "toc.html"), "wb")
Please sign in to comment.
Something went wrong with that request. Please try again.