ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapperOld/SiteMapper.cpp
(Generate patch)

Comparing:
SiteMapper/SiteMapper.cpp (file contents), Revision 153 by Douglas Thrift, 2004-05-29T20:37:48-07:00 vs.
SiteMapperOld/SiteMapper.cpp (file contents), Revision 248 by Douglas Thrift, 2004-09-11T22:02:20-07:00

# Line 40 | Line 40 | int main(int argc, char* argv[])
40                  }
41          }
42  
43 <        if (siteIndex != "" && siteMap != "")
43 >        if (!siteIndex.empty() && !siteMap.empty())
44          {
45                  XMLPlatformUtils::Initialize();
46                  XPathEvaluator::initialize();
# Line 84 | Line 84 | void SiteMapper::oldMap(const string& si
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());
# Line 161 | Line 163 | void SiteMapper::newIndex(const string&
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  
# Line 204 | Line 206 | bool SiteMapper::newIndex(vector<Page>&
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)
# Line 267 | Line 271 | void SiteMapper::newMap(vector<Page>& pa
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines