40 |
|
} |
41 |
|
} |
42 |
|
|
43 |
< |
if (siteIndex != "" && siteMap != "") |
43 |
> |
if (!siteIndex.empty() && !siteMap.empty()) |
44 |
|
{ |
45 |
|
XMLPlatformUtils::Initialize(); |
46 |
|
XPathEvaluator::initialize(); |
84 |
|
comment << evaluator.evaluate(support, document, |
85 |
|
XalanDOMString("comment()").c_str())->str(); |
86 |
|
|
87 |
+ |
if (debug) cerr << "comment = " << comment.str() << '\n'; |
88 |
+ |
|
89 |
|
item = evaluator.createXPath(XalanDOMString("item").c_str()); |
90 |
|
address = evaluator.createXPath(XalanDOMString("link/@address").c_str()); |
91 |
|
link = evaluator.createXPath(XalanDOMString("link").c_str()); |
163 |
|
if (page == matcher(string("^Douglas\\sThrift's\\sWebsite\\s\\|\\sDou") |
164 |
|
+ "glas\\sThrift's\\sBlog:\\s(.+)$")) |
165 |
|
{ |
166 |
< |
if (Matcher("^\\w+\\s\\d\\d\\d\\d\\sArchives$") == matcher[1]) |
166 |
> |
if (Matcher("^\\w+\\s\\d{4}\\sArchives$") == matcher[1]) |
167 |
|
{ |
168 |
|
page.setTitle(matcher[1]); |
169 |
|
|
206 |
|
|
207 |
|
pages[index] = page; |
208 |
|
|
209 |
+ |
cout << "Updated: " << page.getUrl() << '\n'; |
210 |
+ |
|
211 |
|
return true; |
212 |
|
} |
213 |
|
else if (matcher('^' + pages[index].getPath()) == page) |
271 |
|
for (multimap<string, Page>::iterator itor(newPages.lower_bound(childOf)); |
272 |
|
itor != newPages.upper_bound(childOf); itor++) |
273 |
|
{ |
274 |
+ |
cout << "Added: " << itor->second.getUrl() << '\n'; |
275 |
+ |
|
276 |
|
pages.push_back(itor->second); |
277 |
|
} |
278 |
|
|