27 |
|
else |
28 |
|
{ |
29 |
|
cerr << "Usage: " << Zoe::program << " [-config=config] [-D]\n"; |
30 |
+ |
|
31 |
+ |
return 1; |
32 |
|
} |
33 |
|
} |
34 |
|
|
40 |
|
Zoe::Zoe() : rss("zoe.rss") |
41 |
|
{ |
42 |
|
configure(); |
43 |
+ |
|
44 |
+ |
// This is just to figure out Jay's XML output, seems to have worked! |
45 |
+ |
// It should really go in Rss.cpp later |
46 |
+ |
api::FileOutputStream fout(this->rss != "-" ? this->rss : "/dev/null"); |
47 |
+ |
xml::TextWriter rss(this->rss != "-" ? fout : api::Cout.GetStream()); |
48 |
+ |
xml::ScopeElement root(rss, "rss"); |
49 |
+ |
|
50 |
+ |
rss.SetAttribute("version", "2.0"); |
51 |
+ |
|
52 |
+ |
xml::ScopeElement channel(rss, "channel"); |
53 |
+ |
|
54 |
+ |
rss.OpenElement("title"); |
55 |
+ |
rss.OutputText("Zoe's Away Messages"); |
56 |
+ |
rss.CloseElement(); |
57 |
+ |
rss.OpenElement("link"); |
58 |
+ |
rss.OutputText("http://computers.douglasthrift.net/zoe.xml"); |
59 |
+ |
rss.CloseElement(); |
60 |
|
} |
61 |
|
|
62 |
|
bool Zoe::debug(false); |