]> www.wagner.pp.ru Git - oss/ljdump.git/commitdiff
server config item, docs
authorgreg <greg@7994a137-d0a5-da11-ade6-0050bffea3d9>
Fri, 25 Nov 2005 19:04:21 +0000 (19:04 +0000)
committergreg <greg@7994a137-d0a5-da11-ade6-0050bffea3d9>
Fri, 25 Nov 2005 19:04:21 +0000 (19:04 +0000)
git-svn-id: file:///home/svn/ljdump/trunk@5 7994a137-d0a5-da11-ade6-0050bffea3d9

ljdump.config.sample
ljdump.py

index 3d98ddc1af07b2ab3ab1ce224ca4a8556303f473..7b65eb35b884cc2db028c83cefaae42adf8f4a71 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0"?>
 <ljdump>
+    <server>http://livejournal.com/interface/xmlrpc</server>
     <username>myaccount</username>
     <password>mypassword</password>
 </ljdump>
index 3a2aa6367c2fbd51b3bdb0fe85c09b330aa1d9fc..67e185155139820523b3beeaa952d3a10b5a4560 100755 (executable)
--- a/ljdump.py
+++ b/ljdump.py
@@ -1,3 +1,50 @@
+#
+# ljdump.py - livejournal archiver
+# Greg Hewgill <greg@hewgill.com> http://hewgill.com
+# Version 1.0
+#
+# $Id$
+#
+# This program reads the journal entries from a livejournal (or compatible)
+# blog site and archives them in a subdirectory named after the journal name.
+#
+# The configuration is read from "ljdump.config". A sample configuration is
+# provided in "ljdump.config.sample", which should be copied and then edited.
+# The configuration settings are:
+#
+#   server - The XMLRPC server URL. This should only need to be changed
+#            if you are dumping a journal that is livejournal-compatible
+#            but is not livejournal itself.
+#
+#   username - The livejournal user name. A subdirectory will be created
+#              with this same name to store the journal entries.
+#
+#   password - The account password. This password is never sent in the
+#              clear; the livejournal "challenge" password mechanism is used.
+#
+# This program may be run as often as needed to bring the backup copy up
+# to date. Only new items are downloaded.
+#
+# LICENSE
+#
+# This software is provided 'as-is', without any express or implied
+# warranty.  In no event will the author be held liable for any damages
+# arising from the use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+#    claim that you wrote the original software. If you use this software
+#    in a product, an acknowledgment in the product documentation would be
+#    appreciated but is not required.
+# 2. Altered source versions must be plainly marked as such, and must not be
+#    misrepresented as being the original software.
+# 3. This notice may not be removed or altered from any source distribution.
+#
+# Copyright (c) 2005 Greg Hewgill
+
 import codecs, md5, os, pprint, sys, xml.dom.minidom, xmlrpclib
 from xml.sax import saxutils
 
@@ -27,6 +74,7 @@ def writedump(fn, event):
     f.close()
 
 config = xml.dom.minidom.parse("ljdump.config")
+Server = config.documentElement.getElementsByTagName("server")[0].childNodes[0].data
 Username = config.documentElement.getElementsByTagName("username")[0].childNodes[0].data
 Password = config.documentElement.getElementsByTagName("password")[0].childNodes[0].data
 
@@ -37,7 +85,7 @@ try:
 except:
     pass
 
-server = xmlrpclib.ServerProxy("http://livejournal.com/interface/xmlrpc")
+server = xmlrpclib.ServerProxy(Server)
 
 total = 0
 fetched = 0