From 039f075d61fa9554b6ec81f6aff740e889460f96 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Apr 2009 13:47:53 -0400 Subject: response --- doc/tips/add_chatterbox_to_blog/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/add_chatterbox_to_blog/discussion.mdwn b/doc/tips/add_chatterbox_to_blog/discussion.mdwn index bf7c9b1c3..8960a8b0f 100644 --- a/doc/tips/add_chatterbox_to_blog/discussion.mdwn +++ b/doc/tips/add_chatterbox_to_blog/discussion.mdwn @@ -23,3 +23,7 @@ On the [[/ikiwiki/pagespec]] page, it says "internal" pages aren't "first-class" >> Oooh, I see, it's referring to an absolute path (relative to the site), right? >> Thanks :). + +>>> Right, PageSpecs are always absolute paths unless prefixed with `./` +>>> (somewhat confusingly since WikiLinks are always realtive unless +>>> previxed with `/` ...) --[[Joey]] -- cgit v1.2.3 From 7b46399c8e2d0500fcf21d0bca8ec860fcd2bebe Mon Sep 17 00:00:00 2001 From: simonraven Date: Sun, 26 Apr 2009 16:17:41 -0400 Subject: --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 15ddccb92..b3fe9f86c 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -63,6 +63,8 @@ The iki-fast-load ruby script from the u32 page is given below: pipe.puts end +> Would be nice to know where you could get "node-callbacks"... this thing is useless without it. --[[users/simonraven]] + Mediawiki.pm - A plugin which supports mediawiki format. -- cgit v1.2.3 From 972220412fded94b53a357858039656f234ce8f9 Mon Sep 17 00:00:00 2001 From: simonraven Date: Tue, 28 Apr 2009 16:14:44 -0400 Subject: --- .../importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn b/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn index 5d7a266ec..96c5f2f89 100644 --- a/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn +++ b/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn @@ -111,3 +111,12 @@ if __name__ == "__main__": main(*sys.argv[1:]) + + +(I don't know why the tag down there says %s other than it's reading in from the <pre>'d script...) + +I have another version of the script, which scans for <pubDate> and inserts that as a \[[!meta date="foodate"]]. Still work in progress since I just got back to it today, after adding in a rough idea. I'll post a link to it here when it's "good enough for me". + +[[!tag wordpress]] +[[!tag python]] +[[!tag conversion]] -- cgit v1.2.3 From 0e8f7c336dc3ecd2367cbe8dd6c091d1989b2491 Mon Sep 17 00:00:00 2001 From: simonraven Date: Tue, 28 Apr 2009 16:42:35 -0400 Subject: --- .../ikiwiki-wordpress-import.mdwn | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn b/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn index 96c5f2f89..aa1135b5d 100644 --- a/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn +++ b/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn @@ -2,7 +2,7 @@ I modified the script a bit so categories and tags would actually show up in the output file. - +-----
 #!/usr/bin/env python
 
@@ -29,7 +29,7 @@ I modified the script a bit so categories and tags would actually show up in the
     Usage: run --help as an argument with this script.
 
     Notes:
-    I added some extra bits to include the [[!tag foo]] stuff in the post,
+    I added some extra bits to include the \[[!tag foo]] stuff in the post,
     as it wasn't before, at all. I'll diff the versions out so you can see
     the mess I made :).
 
@@ -66,7 +66,7 @@ def main(name, email, subdir, branch='master'):
         commit_msg = """Importing WordPress post "%s" [%s]""" % (x.title.string, x.guid.string)
         timestamp = time.mktime(time.strptime(x.find('wp:post_date_gmt').string, "%Y-%m-%d %H:%M:%S"))
 
-        content = '[[!meta title="%s"]]\n\n' % (x.title.string.replace('"', r'\"'))
+        content = '\[[!meta title="%s"]]\n\n' % (x.title.string.replace('"', r'\"'))
         content += x.find('content:encoded').string.replace('\r\n', '\n')
 
         # categories = x.findAll('category')
@@ -76,8 +76,8 @@ def main(name, email, subdir, branch='master'):
         """
         We do it differently here because we have duplicates otherwise.
         Take a look:
-        
-	
+        <category><![CDATA[Health]]></category>
+        <category domain="category" nicename="health"><![CDATA[Health]]></category>
 
         If we do the what original did, we end up with all tags and cats doubled.
         Therefore we only pick out nicename="foo". Our 'True' below is our 'foo'.
@@ -90,14 +90,14 @@ def main(name, email, subdir, branch='master'):
             for cat in categories:
                 # remove 'tags/' because we have a 'tagbase' set.
                 # your choice: 'tag', or 'taglink'
-                # content += "\n[[!tag %s]]" % (cat.string.replace(' ', '-'))
-                content += "\n[[!taglink %s]]" % (cat.string.replace(' ', '-'))
+                # content += "\n\[[!tag %s]]" % (cat.string.replace(' ', '-'))
+                content += "\n\[[!taglink %s]]" % (cat.string.replace(' ', '-'))
                 # print >>sys.stderr, cat.string.replace(' ', '-')
 
         # moved this thing down
         data = content.encode('ascii', 'html_replace')
         print "commit refs/heads/%s" % branch
-        print "committer %s <%s> %d +0000" % (name, email, timestamp)
+        print "committer %s <%s> %d +0000" % (name, email, timestamp)
         print "data %d" % len(commit_msg)
         print commit_msg
         print "M 644 inline %s" % os.path.join(subdir, "%s.mdwn" % stub)
@@ -111,12 +111,15 @@ if __name__ == "__main__":
         main(*sys.argv[1:])
 
 
- +----- (I don't know why the tag down there says %s other than it's reading in from the <pre>'d script...) I have another version of the script, which scans for <pubDate> and inserts that as a \[[!meta date="foodate"]]. Still work in progress since I just got back to it today, after adding in a rough idea. I'll post a link to it here when it's "good enough for me". +(Hopefully I've escaped everything properly; if I missed something, check the source.) + [[!tag wordpress]] [[!tag python]] [[!tag conversion]] +[[!tag ikiwiki]] -- cgit v1.2.3 From d6b095b06cf94463bc505d728e8281a6b5e03a03 Mon Sep 17 00:00:00 2001 From: simonraven Date: Tue, 28 Apr 2009 17:46:21 -0400 Subject: --- .../ikiwiki-wordpress-import.mdwn | 114 ++++++++++++++++++++- 1 file changed, 111 insertions(+), 3 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn b/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn index aa1135b5d..0c0527f2c 100644 --- a/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn +++ b/doc/tips/importing_posts_from_wordpress/ikiwiki-wordpress-import.mdwn @@ -113,12 +113,120 @@ if __name__ == "__main__": ----- -(I don't know why the tag down there says %s other than it's reading in from the <pre>'d script...) - -I have another version of the script, which scans for <pubDate> and inserts that as a \[[!meta date="foodate"]]. Still work in progress since I just got back to it today, after adding in a rough idea. I'll post a link to it here when it's "good enough for me". +I have another version of the script, which uses the `timestamp` from the script, and inserts that as a \[[!meta date="foodate"]]. I'm posting it here just in case I happen to be doing something to the httpd. (Hopefully I've escaped everything properly; if I missed something, check the source.) +----- +
+#!/usr/bin/env python
+
+"""
+    Purpose:
+    Wordpress-to-Ikiwiki import tool
+
+    Copyright:
+    Copyright (C) 2007  Chris Lamb 
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see .
+
+    Usage: run --help as an argument with this script.
+
+    Notes:
+    I added some extra bits to include the \[[!tag foo]] stuff in the post,
+    as it wasn't before, at all. I'll diff the versions out so you can see
+    the mess I made :).
+
+"""
+
+import os, sys
+import time
+import re
+
+from datetime import datetime
+from BeautifulSoup import BeautifulSoup
+
+import codecs, htmlentitydefs
+
+codecs.register_error('html_replace', lambda x: (''.join([u'&%s;' \
+    % htmlentitydefs.codepoint2name[ord(c)] for c in x.object[x.start:x.end]]), x.end))
+
+def main(name, email, subdir, branch='master'):
+    soup = BeautifulSoup(sys.stdin.read())
+
+    # Regular expression to match stub in URL.
+    stub_pattern = re.compile(r'.*\/(.+)\/$')
+
+    for x in soup.findAll('item'):
+        # Ignore draft posts
+        if x.find('wp:status').string != 'publish': continue
+
+        match = stub_pattern.match(x.guid.string)
+        if match:
+            stub = match.groups()[0]
+        else:
+            # Fall back to our own stubs
+            stub = re.sub(r'[^a-zA-Z0-9_]', '-', x.title.string).lower()
+
+        commit_msg = """Importing WordPress post "%s" [%s]""" % (x.title.string, x.guid.string)
+        timestamp = time.mktime(time.strptime(x.find('wp:post_date_gmt').string, "%Y-%m-%d %H:%M:%S"))
+        content = '\[[!meta title="%s"]]\n' % (x.title.string.replace('"', r'\"'))
+        content += "\[[!meta date=\"%s\"]]\n" % datetime.fromtimestamp(timestamp)
+        content += x.find('content:encoded').string.replace('\r\n', '\n')
+
+        """
+        We do it differently here because we have duplicates otherwise.
+        Take a look:
+        <category><![CDATA[Health]]></category>
+        <category domain="category" nicename="health"><![CDATA[Health]]></category>
+
+        If we do the what original did, we end up with all tags and cats doubled.
+        Therefore we only pick out nicename="foo". Our 'True' below is our 'foo'.
+        I'd much rather have the value of 'nicename', and tried, but my
+        python skillz are extremely limited....
+        """
+        categories = x.findAll('category', nicename=True)
+        if categories:
+            content += "\n"
+            for cat in categories:
+                # remove 'tags/' because we have a 'tagbase' set.
+                # your choice: 'tag', or 'taglink'
+                # content += "\n\[[!tag %s]]" % (cat.string.replace(' ', '-'))
+                content += "\n\[[!taglink %s]]" % (cat.string.replace(' ', '-'))
+                # this is just debugging, and for fun
+                # print >>sys.stderr, cat.string.replace(' ', '-')
+
+        # moved this thing down
+        data = content.encode('ascii', 'html_replace')
+        print "commit refs/heads/%s" % branch
+        print "committer %s <%s> %d +0000" % (name, email, timestamp)
+        print "data %d" % len(commit_msg)
+        print commit_msg
+        print "M 644 inline %s" % os.path.join(subdir, "%s.mdwn" % stub)
+        print "data %d" % len(data)
+        print data
+
+if __name__ == "__main__":
+    if len(sys.argv) not in (4, 5):
+        print >>sys.stderr, "%s: usage: %s name email subdir [branch] < wordpress-export.xml | git-fast-import " % (sys.argv[0], sys.argv[0])
+    else:
+        main(*sys.argv[1:])
+
+
+----- + + [[!tag wordpress]] [[!tag python]] [[!tag conversion]] -- cgit v1.2.3 From 31826c8b975245efb8e578efa037a2ce5c088b83 Mon Sep 17 00:00:00 2001 From: simonraven Date: Tue, 28 Apr 2009 19:11:38 -0400 Subject: --- .../Importing_posts_from_Wordpress/discussion.mdwn | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn b/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn index 55e04d9cb..0e9c8b756 100644 --- a/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn @@ -24,21 +24,6 @@ git-fast-import statistics: etc. +(Removed now dead info and blah blah.) -> Well, if this really is a script error, it's not really the script, but the wordpress XML dump, referring to a -> possible malformed or invalid unicode character in the dump file. This is what I can gather from other scripts. -> I'll be checking my dump file shortly. - ->> This is only part of the problem... I'm not exactly sure what's going on, and it's get late/early for me.... - ->>> I used --force for fast-import, but then everything seems deleted, so you end up doing a reset, checkout, add, *then* commit. ->>> Seems really odd. I edited the script however, maybe this is why... this is my changes: - - -print "data %d" % len(data) - +print "data %d merge refs/heads/%s" % (len(data), branch) - ->>> That control character is a ^q^0 in emacs, see git fast-import --help for more info. ->>> I'll be trying an import *without* that change, to see what happens. - ->>>> I still have to do the above to preserve the changes done by this script... (removed previous note). - +> It works fine.... The script is picky about having everything in proper UTF-8, **and** proper XML and HTML escaping. You need that to have a successful import. I let Emacs remove DOS line endings, and it works OK (if on *nix of some sort, of course). Thing is with this `git fast-import`, is that you have to `git reset` afterwards, (let's say you put them in posts/) `git checkout posts`, `git add posts`, then commit. I don't know if this a characteristic with `git fast-import`, but this is the way I get my posts to exist on the filesystem. If I don't do this, then I lose the data. --[[users/simonraven]] -- cgit v1.2.3 From b2675a77c8dfced20af39e3b187dc3465241549e Mon Sep 17 00:00:00 2001 From: simonraven Date: Tue, 28 Apr 2009 19:12:52 -0400 Subject: --- doc/tips/Importing_posts_from_Wordpress/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn b/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn index 0e9c8b756..09e6f6742 100644 --- a/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn @@ -26,4 +26,4 @@ etc. (Removed now dead info and blah blah.) -> It works fine.... The script is picky about having everything in proper UTF-8, **and** proper XML and HTML escaping. You need that to have a successful import. I let Emacs remove DOS line endings, and it works OK (if on *nix of some sort, of course). Thing is with this `git fast-import`, is that you have to `git reset` afterwards, (let's say you put them in posts/) `git checkout posts`, `git add posts`, then commit. I don't know if this a characteristic with `git fast-import`, but this is the way I get my posts to exist on the filesystem. If I don't do this, then I lose the data. --[[users/simonraven]] +> It works fine.... The script is picky about having everything in proper UTF-8, **and** proper XML and HTML escaping. You need that to have a successful import. I let Emacs remove DOS line endings, and it works OK (if on *nix of some sort, of course). Thing is with this `git fast-import`, is that you have to `git reset` afterwards, (let's say you put them in posts/) `git checkout posts`, `git add posts`, then commit. I don't know if this a characteristic with `git fast-import`, but this is the way I get my posts to exist on the filesystem. If I don't do this, then I lose the data. If you get that "Not updating..." error, then just --force the import in. --[[users/simonraven]] -- cgit v1.2.3 From 9e40564ecb7f879701e3b4921f0d1f120c3a611a Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Thu, 30 Apr 2009 15:18:40 -0400 Subject: personal experience --- doc/tips/DreamHost/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/DreamHost/discussion.mdwn b/doc/tips/DreamHost/discussion.mdwn index 03ed78700..74f48938e 100644 --- a/doc/tips/DreamHost/discussion.mdwn +++ b/doc/tips/DreamHost/discussion.mdwn @@ -1,3 +1,5 @@ I managed to install ikiwiki on eggplant farms, with most basic features except markdown. I think ikiwiki is more suitable for VPS/dedicated server. Shared hosting doesn't fit. + +I just (2009/04/27) installed ikiwiki on DreamHost and the CPAN instructions here are unnecessarily complicated. I used "cpan" instead of "perl -MCPAN -e shell" and had no trouble with that portion of the install. --[[schmonz]] -- cgit v1.2.3 From 147828c62ddb1401d18af57f812bb59d95ce73c9 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 2 May 2009 21:21:39 -0400 Subject: --- doc/tips/add_chatterbox_to_blog/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/add_chatterbox_to_blog/discussion.mdwn b/doc/tips/add_chatterbox_to_blog/discussion.mdwn index 8960a8b0f..7057235c5 100644 --- a/doc/tips/add_chatterbox_to_blog/discussion.mdwn +++ b/doc/tips/add_chatterbox_to_blog/discussion.mdwn @@ -27,3 +27,5 @@ On the [[/ikiwiki/pagespec]] page, it says "internal" pages aren't "first-class" >>> Right, PageSpecs are always absolute paths unless prefixed with `./` >>> (somewhat confusingly since WikiLinks are always realtive unless >>> previxed with `/` ...) --[[Joey]] + +>> This is not working for me at all, all I get is some SHA1 hash all the time. I've tried variants of the `internal()` arg, and nothing gets spit out. --[[simonraven]] -- cgit v1.2.3 From 8d5cd865932b0c0feb1a398e5cde31de262a7649 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 May 2009 14:34:05 -0400 Subject: response --- doc/tips/add_chatterbox_to_blog/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/add_chatterbox_to_blog/discussion.mdwn b/doc/tips/add_chatterbox_to_blog/discussion.mdwn index 7057235c5..d17008fe1 100644 --- a/doc/tips/add_chatterbox_to_blog/discussion.mdwn +++ b/doc/tips/add_chatterbox_to_blog/discussion.mdwn @@ -29,3 +29,7 @@ On the [[/ikiwiki/pagespec]] page, it says "internal" pages aren't "first-class" >>> previxed with `/` ...) --[[Joey]] >> This is not working for me at all, all I get is some SHA1 hash all the time. I've tried variants of the `internal()` arg, and nothing gets spit out. --[[simonraven]] + +>>> Sounds like [[!debbug 380212]]? +>>> If so, the fix is to use Text::Markdown, or markdown 1.0.2 instead of buggy +>>> old markdown 1.0.1. --[[Joey]] -- cgit v1.2.3 From 7402dc48b77ddc7f36d8dada53bc5dead70e09c9 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 9 May 2009 15:21:30 -0400 Subject: --- doc/tips/add_chatterbox_to_blog/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/add_chatterbox_to_blog/discussion.mdwn b/doc/tips/add_chatterbox_to_blog/discussion.mdwn index d17008fe1..effce6c60 100644 --- a/doc/tips/add_chatterbox_to_blog/discussion.mdwn +++ b/doc/tips/add_chatterbox_to_blog/discussion.mdwn @@ -33,3 +33,8 @@ On the [[/ikiwiki/pagespec]] page, it says "internal" pages aren't "first-class" >>> Sounds like [[!debbug 380212]]? >>> If so, the fix is to use Text::Markdown, or markdown 1.0.2 instead of buggy >>> old markdown 1.0.1. --[[Joey]] + +>> `ii libtext-markdown-perl 1.0.21-1 Markdown and MultiMarkdown markup languages library` +>> +>> I'm using `Text::Markdown` due to its "multi-markdown" support. +>> Maybe update it from CPAN + dh-make-perl (if there's a new one, that is) -- cgit v1.2.3 From 866dbb314352f10edabbd977de48729cf23123cb Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 9 May 2009 15:38:53 -0400 Subject: --- doc/tips/add_chatterbox_to_blog/discussion.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/add_chatterbox_to_blog/discussion.mdwn b/doc/tips/add_chatterbox_to_blog/discussion.mdwn index effce6c60..5170c775e 100644 --- a/doc/tips/add_chatterbox_to_blog/discussion.mdwn +++ b/doc/tips/add_chatterbox_to_blog/discussion.mdwn @@ -36,5 +36,6 @@ On the [[/ikiwiki/pagespec]] page, it says "internal" pages aren't "first-class" >> `ii libtext-markdown-perl 1.0.21-1 Markdown and MultiMarkdown markup languages library` >> ->> I'm using `Text::Markdown` due to its "multi-markdown" support. ->> Maybe update it from CPAN + dh-make-perl (if there's a new one, that is) +>> I'm using `Text::Markdown` due to its "multi-markdown" support. Yes, it does seem exactly like [[!debbug 380212]] . +>> Maybe update it from CPAN + dh-make-perl (if there's a new one, that is) --[[simonraven]] +>> I've just built and installed `libtext-markdown-perl 1.0.21-1` from dh-make-perl & CPAN, and regenerated that page.. let's see what happens... -- cgit v1.2.3 From 13ea4d6b45860190875db6f79db63fc06ba4972c Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 9 May 2009 15:47:17 -0400 Subject: --- doc/tips/add_chatterbox_to_blog/discussion.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/add_chatterbox_to_blog/discussion.mdwn b/doc/tips/add_chatterbox_to_blog/discussion.mdwn index 5170c775e..a3d686409 100644 --- a/doc/tips/add_chatterbox_to_blog/discussion.mdwn +++ b/doc/tips/add_chatterbox_to_blog/discussion.mdwn @@ -38,4 +38,6 @@ On the [[/ikiwiki/pagespec]] page, it says "internal" pages aren't "first-class" >> >> I'm using `Text::Markdown` due to its "multi-markdown" support. Yes, it does seem exactly like [[!debbug 380212]] . >> Maybe update it from CPAN + dh-make-perl (if there's a new one, that is) --[[simonraven]] ->> I've just built and installed `libtext-markdown-perl 1.0.21-1` from dh-make-perl & CPAN, and regenerated that page.. let's see what happens... +>> I've just built and installed `libtext-markdown-perl 1.0.21-1` from dh-make-perl & CPAN, and regenerated that page.. let's see what happens... no hashes, but nothing else either: +>> +>> "kijkaqawej: last checked 10 minutes ago (25 posts)" -- inside of a box, no display of posts. -- cgit v1.2.3 From af3b457b80d9cd7fa85514e1f1dd583e2f165ba3 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 15 May 2009 18:51:13 -0400 Subject: Q: warning: lighttpd only or both? --- doc/tips/dot_cgi/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/tips/dot_cgi/discussion.mdwn (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi/discussion.mdwn b/doc/tips/dot_cgi/discussion.mdwn new file mode 100644 index 000000000..982621295 --- /dev/null +++ b/doc/tips/dot_cgi/discussion.mdwn @@ -0,0 +1,5 @@ +## warning: lighttpd only or both? + +Is your warning at the bottom (you don't know how secure it is) only about lighttpd or it's about apache2 configuration as well? + +I'm asking this because right now I want to setup an httpd solely for the public use of ikiwiki on a general puprpose computer (there are other things there), and so I need to choose the more secure solution. --Ivan Z. -- cgit v1.2.3 From 5d8fa0de2736b615b62f6c5df4c015ee868fe703 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 15 May 2009 19:03:24 -0400 Subject: More my thoughts about making a secure public wiki -- perhaps someone will find them useful --- doc/tips/dot_cgi/discussion.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi/discussion.mdwn b/doc/tips/dot_cgi/discussion.mdwn index 982621295..50e6fd9d5 100644 --- a/doc/tips/dot_cgi/discussion.mdwn +++ b/doc/tips/dot_cgi/discussion.mdwn @@ -2,4 +2,6 @@ Is your warning at the bottom (you don't know how secure it is) only about lighttpd or it's about apache2 configuration as well? -I'm asking this because right now I want to setup an httpd solely for the public use of ikiwiki on a general puprpose computer (there are other things there), and so I need to choose the more secure solution. --Ivan Z. +I'm asking this because right now I want to setup an httpd solely for the public use of ikiwiki on a general purpose computer (there are other things there), and so I need to choose the more secure solution. --Ivan Z. +> AFAIU, my main simplest security measure should be running the public ikiwiki's cgi under a special user, but then: how do I push to the repo owned by that other user? I see, probably I should setup the public wiki under the special user (so that it was able to create the cgi-script with the desired permission), and then give my personal user the required permissions to make a git-push by, say, creating a special Unix group for this. +> Shouldn't there be a page here which would document a secure public and multi-user installation of ikiwiki (by "multi-user" I mean writable by a group of local Unix users)? If there isn't such yet, I started writing it with this discussion.--Ivan Z. -- cgit v1.2.3 From 99018a65e5f4cb7378b4e78d2357d3f07f39691a Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 15 May 2009 19:04:21 -0400 Subject: minor: formatting --- doc/tips/dot_cgi/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi/discussion.mdwn b/doc/tips/dot_cgi/discussion.mdwn index 50e6fd9d5..8bca5ef5a 100644 --- a/doc/tips/dot_cgi/discussion.mdwn +++ b/doc/tips/dot_cgi/discussion.mdwn @@ -3,5 +3,7 @@ Is your warning at the bottom (you don't know how secure it is) only about lighttpd or it's about apache2 configuration as well? I'm asking this because right now I want to setup an httpd solely for the public use of ikiwiki on a general purpose computer (there are other things there), and so I need to choose the more secure solution. --Ivan Z. + > AFAIU, my main simplest security measure should be running the public ikiwiki's cgi under a special user, but then: how do I push to the repo owned by that other user? I see, probably I should setup the public wiki under the special user (so that it was able to create the cgi-script with the desired permission), and then give my personal user the required permissions to make a git-push by, say, creating a special Unix group for this. + > Shouldn't there be a page here which would document a secure public and multi-user installation of ikiwiki (by "multi-user" I mean writable by a group of local Unix users)? If there isn't such yet, I started writing it with this discussion.--Ivan Z. -- cgit v1.2.3 From 1f185c5d408e1136a2c53537ef48cbce5652e8cf Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 15 May 2009 19:21:25 -0400 Subject: a simplification to my previous hint about a trivial setup --- doc/tips/dot_cgi/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi/discussion.mdwn b/doc/tips/dot_cgi/discussion.mdwn index 8bca5ef5a..4bb0007bd 100644 --- a/doc/tips/dot_cgi/discussion.mdwn +++ b/doc/tips/dot_cgi/discussion.mdwn @@ -7,3 +7,5 @@ I'm asking this because right now I want to setup an httpd solely for the public > AFAIU, my main simplest security measure should be running the public ikiwiki's cgi under a special user, but then: how do I push to the repo owned by that other user? I see, probably I should setup the public wiki under the special user (so that it was able to create the cgi-script with the desired permission), and then give my personal user the required permissions to make a git-push by, say, creating a special Unix group for this. > Shouldn't there be a page here which would document a secure public and multi-user installation of ikiwiki (by "multi-user" I mean writable by a group of local Unix users)? If there isn't such yet, I started writing it with this discussion.--Ivan Z. + +> I see, perhaps a simpler setup would not make use of a Unix group, but simply allow pushing to the public wiki (kept under a special user) through git+ssh. --Ivan Z. -- cgit v1.2.3 From df112ed89e2e8fc5c4c449758968ccd21a10ad30 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 15 May 2009 21:47:55 -0400 Subject: response --- doc/tips/dot_cgi.mdwn | 6 +++--- doc/tips/dot_cgi/discussion.mdwn | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 8 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi.mdwn b/doc/tips/dot_cgi.mdwn index 04d7a9721..64d7a0757 100644 --- a/doc/tips/dot_cgi.mdwn +++ b/doc/tips/dot_cgi.mdwn @@ -52,6 +52,6 @@ Note that the first part enables cgi server wide but depending on default configuration, it may be not enough. The second part creates a specific rule that allow `ikiwiki.cgi` to be executed. -**Warning:** I only use this on my development server (offline). I am not -sure of how secure this approach is. If you have any thought about it, feel -free to let me know. +**Warning:** I only use this lighttpd configuration on my development +server (offline). I am not sure of how secure this approach is. +If you have any thought about it, feel free to let me know. diff --git a/doc/tips/dot_cgi/discussion.mdwn b/doc/tips/dot_cgi/discussion.mdwn index 4bb0007bd..124b9edff 100644 --- a/doc/tips/dot_cgi/discussion.mdwn +++ b/doc/tips/dot_cgi/discussion.mdwn @@ -1,11 +1,36 @@ ## warning: lighttpd only or both? -Is your warning at the bottom (you don't know how secure it is) only about lighttpd or it's about apache2 configuration as well? +Is your warning at the bottom (you don't know how secure it is) only about +lighttpd or it's about apache2 configuration as well? -I'm asking this because right now I want to setup an httpd solely for the public use of ikiwiki on a general purpose computer (there are other things there), and so I need to choose the more secure solution. --Ivan Z. +> The latter. (Although I don't know why using lighttpd would lead +> to any additional security exposure anyway.) --[[Joey]] -> AFAIU, my main simplest security measure should be running the public ikiwiki's cgi under a special user, but then: how do I push to the repo owned by that other user? I see, probably I should setup the public wiki under the special user (so that it was able to create the cgi-script with the desired permission), and then give my personal user the required permissions to make a git-push by, say, creating a special Unix group for this. +I'm asking this because right now I want to setup an httpd solely for the +public use of ikiwiki on a general purpose computer (there are other things +there), and so I need to choose the more secure solution. --Ivan Z. -> Shouldn't there be a page here which would document a secure public and multi-user installation of ikiwiki (by "multi-user" I mean writable by a group of local Unix users)? If there isn't such yet, I started writing it with this discussion.--Ivan Z. +> AFAIU, my main simplest security measure should be running the public +> ikiwiki's cgi under a special user, but then: how do I push to the repo +> owned by that other user? I see, probably I should setup the public wiki +> under the special user (so that it was able to create the cgi-script with +> the desired permission), and then give my personal user the required +> permissions to make a git-push by, say, creating a special Unix group for +> this. -> I see, perhaps a simpler setup would not make use of a Unix group, but simply allow pushing to the public wiki (kept under a special user) through git+ssh. --Ivan Z. +> Shouldn't there be a page here which would document a secure public and +> multi-user installation of ikiwiki (by "multi-user" I mean writable by a +> group of local Unix users)? If there isn't such yet, I started writing it +> with this discussion.--Ivan Z. + +> I see, perhaps a simpler setup would not make use of a Unix group, but +> simply allow pushing to the public wiki (kept under a special user) through +> git+ssh. --Ivan Z. + +>> Yes, it's certianly possible to configure git (and svn, etc) repositories so that +>> two users can both push to them. There should be plenty of docs out there +>> about doing that. +>> +>> The easiest way though is probably +>> to add your ssh key to the special user's `.ssh/authorized_keys` +>> and push that way. --[[Joey]] -- cgit v1.2.3