Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Flush
Browse files Browse the repository at this point in the history
svn path=/trunk/lb/; revision=44961
  • Loading branch information
migueldeicaza committed May 25, 2005
1 parent 6882b82 commit 5ccb9a2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions config.cs
Expand Up @@ -6,6 +6,7 @@ public class Config {
[XmlAttribute] public string BlogDirectory;
[XmlAttribute] public string BlogFileName;
[XmlAttribute] public string BlogWebDirectory;
[XmlAttribute] public string BlogImageBasedir;
[XmlAttribute] public string Copyright;
[XmlAttribute] public string Description;
[XmlAttribute] public string ManagingEditor;
Expand Down
9 changes: 5 additions & 4 deletions config.xml
@@ -1,12 +1,13 @@
<?xml version="1.0"?>
<config
Author="Miguel de Icaza (miguel@novell.com)"
Author="Miguel de Icaza (miguel@gnome.org)"
BlogDirectory="/home/miguel/activity"
BlogFileName="activity-log.php"
BlogWebDirectory="http://primates.ximian.com/~miguel/"
BlogFileName="index.html"
BlogWebDirectory="http://tirania.org/blog/"
BlogImageBasedir="http://primates.ximian.com/~miguel"
Copyright="Miguel de Icaza"
Description="Miguel de Icaza's web log"
ManagingEditor="miguel@novell.com"
ManagingEditor="miguel@gnome.org"
Title="Miguel de Icaza"
RSSFileName="miguel"
/>
5 changes: 4 additions & 1 deletion lb.cs
Expand Up @@ -169,7 +169,7 @@ void Load (StreamReader i, bool is_html)

string filename = s.Substring (5, idx-5);
string caption = s.Substring (idx + 1);
sb.Append (String.Format ("<p><center><a href=\"{0}pic.php?name={1}&caption={2}\"><img border=0 src=\"{0}/pictures/small-{1}\"></a><p>{2}</center></p>", blog_base, filename, caption));
sb.Append (String.Format ("<p><center><a href=\"{0}pic.php?name={1}&caption={2}\"><img border=0 src=\"{3}/pictures/small-{1}\"></a><p>{2}</center></p>", blog_base, filename, caption, blog.config.BlogImageBasedir));
continue;

}
Expand Down Expand Up @@ -477,6 +477,9 @@ static void Main ()
{
Config config = (Config)
new XmlSerializer (typeof (Config)).Deserialize (new XmlTextReader ("config.xml"));
if (config.BlogImageBasedir == null || config.BlogImageBasedir == "")
config.BlogImageBasedir = config.BlogWebDirectory;

Blog b = new Blog (config);

b.RenderHtml ("template", config.BlogFileName, 0, 30, "");
Expand Down
7 changes: 7 additions & 0 deletions makefile
Expand Up @@ -12,6 +12,13 @@ clean:
rm -f *.exe

push: b
chmod 644 archive/*/*.html
chmod 644 *html *rss2 *php *atom
rsync -pr -v --rsh=ssh texts archive prettyprint.js \
log-style.css *.rss2 *.atom *.php index.html all.html \
miguel@www.tirania.org:tirania/blog

pp: b
chmod 644 archive/*/*.html
chmod 644 *html *rss2 *php *atom
rsync -pr -v --rsh=ssh texts archive prettyprint.js \
Expand Down

0 comments on commit 5ccb9a2

Please sign in to comment.