1 |
douglas |
672 |
// Google Tron |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#include <cxx/standard.hh> |
8 |
|
|
|
9 |
douglas |
673 |
#include <api/process.hpp> |
10 |
douglas |
672 |
#include <app/simple.hpp> |
11 |
douglas |
673 |
#include <xml/textwriter.hpp> |
12 |
douglas |
672 |
|
13 |
douglas |
676 |
#include "GoogleTron.hpp" |
14 |
douglas |
674 |
#include "GzipWriter.hpp" |
15 |
|
|
|
16 |
douglas |
672 |
int Main(const app::Options &options) |
17 |
|
|
{ |
18 |
douglas |
676 |
GoogleTron tron; |
19 |
|
|
|
20 |
|
|
return 0; |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
GoogleTron::GoogleTron() : finished(false) |
24 |
|
|
{ |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
GoogleTron::~GoogleTron() |
28 |
|
|
{ |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
int GoogleTron::Output() |
32 |
|
|
{ |
33 |
douglas |
674 |
_S<GzipWriter> gzip(_B("sitemap.gz")); |
34 |
|
|
_S<xml::TextWriter> writer(gzip); |
35 |
douglas |
673 |
xml::ScopeElement urlset(writer, _B("urlset")); |
36 |
|
|
|
37 |
|
|
writer.SetAttribute(_B("xmlns"), _B("http://www.google.com/schemas/sitemap/0.84")); |
38 |
|
|
|
39 |
douglas |
672 |
return 0; |
40 |
|
|
} |