From 395d6771d948ed5e20892de0366d086d550d67f1 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sat, 8 Oct 2011 13:15:36 +0200 Subject: [PATCH] Source formatting, corrected email --- ublog | 45 +++++++++++---------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/ublog b/ublog index 2706043..f530354 100755 --- a/ublog +++ b/ublog @@ -3,45 +3,19 @@ # # A minimal distributed multiuser blogging software [well ... better: hack] # that is based on Git -# # Copyright 2011 Daniel Borkmann # Subject to the GNU GPL, version 2. -# -# ublog via Git Benefits: -# -# + Distributed for a better censorship resistance -# + Secure since all sites are static HTML -# + Fast since all sites are static HTML -# + Backuped, since DVCS is used -# + Easy usage and setup, single blog text file -# + Can be used with multiple authors -# + RSS per author, tag and full RSS -# + Automatic content creation triggered on Git push -# -# txt2html syntax: http://txt2html.sourceforge.net/ +# More information: read the README # On Debian: apt-get install txt2html -# -# More Readme on ToDo. Here's what you need to setup: -# -# - Have git installed on your server -# - Plus a webserver, e.g. nginx -# - You setup a single Git repo with your blog.txt in it -# - Then, add a Git hook for each push that triggers ublog -# - ublog will then generate the blog files, e.g. for /var/www/htdocs/ -# - Done. People should have the possibilty to clone your -# blog content (blog.txt), thus git server should run -# # Usage, i.e.: ublog blog.txt /var/www/htdocs/ # use strict; use warnings; - use HTML::TextToHTML; my $prognam = "ublog"; -my $version = "0.1"; - +my $version = "1.0"; my $line = 0; my $verbose = 0; @@ -389,7 +363,8 @@ sub generate_index if ($settings{txt2html}) { $output .= "\n
  • $pre". $conv->process_chunk($entries{$key}->{text}, - is_fragment => 1)."
  • "; + is_fragment => 1). + ""; } else { $output .= "\n
  • $pre".$entries{$key}->{text}. "
  • "; @@ -538,7 +513,8 @@ sub generate_entries if ($settings{txt2html}) { $output .= "\n
  • $pre". $conv->process_chunk($entries{$key}->{text}, - is_fragment => 1)."
  • "; + is_fragment => 1). + ""; } else { $output .= "\n
  • $pre".$entries{$key}->{text}."
  • "; } @@ -653,8 +629,10 @@ sub generate_tag_rss $titems{$tag} .= "". textify_html($entries{$key}->{text}). "\n"; - $titems{$tag} .= "".$settings{root}."/$key.html\n"; - $titems{$tag} .= "".$settings{root}."/$key.html\n"; + $titems{$tag} .= "".$settings{root}. + "/$key.html\n"; + $titems{$tag} .= "".$settings{root}. + "/$key.html\n"; $titems{$tag} .= "\n"; } } @@ -710,12 +688,11 @@ sub help print "\n$prognam $version\n"; print "http://gnumaniacs.org\n\n"; print "Usage: $prognam \n\n"; - print "Please report bugs to \n"; + print "Please report bugs to \n"; print "Copyright (C) 2011 Daniel Borkmann ,\n"; print "License: GNU GPL version 2\n"; print "This is free software: you are free to change and redistribute it.\n"; print "There is NO WARRANTY, to the extent permitted by law.\n\n"; - exit; } -- 2.11.4.GIT