Skip to content

Commit

Permalink
Add description as separate field
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed May 31, 2012
1 parent f83b9f7 commit 1b817ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 6 additions & 4 deletions blog.proto
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions grabber.py
Expand Up @@ -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")
Expand Down

0 comments on commit 1b817ab

Please sign in to comment.