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

Comparing SiteMapper/SiteMapper.cpp (file contents):
Revision 155 by Douglas Thrift, 2004-06-04T02:53:03-07:00 vs.
Revision 156 by Douglas Thrift, 2004-06-10T01:24:32-07:00

# Line 36 | Line 36 | int main(int argc, char* argv[])
36                  }
37          }
38  
39 <        if (siteIndex != "" && siteMap != "")
39 >        if (!siteIndex.empty() && !siteMap.empty())
40          {
41                  SiteMapper mapper(siteIndex, siteMap);
42          }
# Line 105 | Line 105 | void SiteMapper::newIndex(const string&
105                  if (page == matcher(string("^Douglas\\sThrift's\\sWebsite\\s\\|\\sDou")
106                          + "glas\\sThrift's\\sBlog:\\s(.+)$"))
107                  {
108 <                        if (Matcher("^\\w+\\s\\d\\d\\d\\d\\sArchives$") == matcher[1])
108 >                        if (Matcher("^\\w+\\s\\d{4}\\sArchives$") == matcher[1])
109                          {
110                                  page.setTitle(matcher[1]);
111  
# Line 143 | Line 143 | bool SiteMapper::newIndex(vector<Page>&
143  
144                                  pages[index] = page;
145  
146 +                                cout << "Updated: " << page.getUrl() << '\n';
147 +
148                                  return true;
149                          }
150                          else if (matcher('^' + pages[index].getPath()) == page)
# Line 206 | Line 208 | void SiteMapper::newMap(vector<Page>& pa
208          for (multimap<string, Page>::iterator itor(newPages.lower_bound(childOf));
209                  itor != newPages.upper_bound(childOf); itor++)
210          {
211 +                cout << "Added: " << itor->second.getUrl() << '\n';
212 +
213                  pages.push_back(itor->second);
214          }
215  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines