aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2008-01-12 06:09:10 +0800
committerdanfe <danfe@FreeBSD.org>2008-01-12 06:09:10 +0800
commitf0001a6de4971c4d5b6bd94ea3fbc8d22b8b00b8 (patch)
tree9a21fb211695cccd11c3b8b5fe5de5e635357946
parent3ee2fec2fbf8e2132f4bed53813a64145293a5d6 (diff)
downloadfreebsd-ports-gnome-f0001a6de4971c4d5b6bd94ea3fbc8d22b8b00b8.tar.gz
freebsd-ports-gnome-f0001a6de4971c4d5b6bd94ea3fbc8d22b8b00b8.tar.zst
freebsd-ports-gnome-f0001a6de4971c4d5b6bd94ea3fbc8d22b8b00b8.zip
Add ljdump, a tool to download LiveJournal entries and comments.
WWW: http://hewgill.com/software/ljdump/
-rw-r--r--www/Makefile1
-rw-r--r--www/ljdump/Makefile30
-rw-r--r--www/ljdump/distinfo3
-rw-r--r--www/ljdump/files/patch-ljdump.py24
-rw-r--r--www/ljdump/pkg-descr11
5 files changed, 69 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index cc3a2b68ded5..24231f01cb5a 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -293,6 +293,7 @@
SUBDIR += linux-seamonkey-devel
SUBDIR += linuxpluginwrapper
SUBDIR += ljdeps
+ SUBDIR += ljdump
SUBDIR += ljpms
SUBDIR += ljsm
SUBDIR += llgal
diff --git a/www/ljdump/Makefile b/www/ljdump/Makefile
new file mode 100644
index 000000000000..119e784b845f
--- /dev/null
+++ b/www/ljdump/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: ljdump
+# Date created: 11 Jan 2008
+# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ljdump
+PORTVERSION= 1.2
+CATEGORIES= www
+MASTER_SITES= http://hewgill.com/software/ljdump/ \
+ http://freebsd.nsu.ru/distfiles/
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Tool to download LiveJournal entries and comments
+
+NO_BUILD= yes
+USE_PYTHON_RUN= yes
+
+PLIST_FILES= bin/ljdump etc/ljdump.config.sample
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE}, ; \
+ s,%%PREFIX%%,${PREFIX},' ${WRKSRC}/ljdump.py
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/ljdump.py ${PREFIX}/bin/ljdump
+ ${INSTALL_DATA} ${WRKSRC}/ljdump.config.sample ${PREFIX}/etc
+
+.include <bsd.port.mk>
diff --git a/www/ljdump/distinfo b/www/ljdump/distinfo
new file mode 100644
index 000000000000..a180e9172998
--- /dev/null
+++ b/www/ljdump/distinfo
@@ -0,0 +1,3 @@
+MD5 (ljdump-1.2.tar.gz) = 45d8907289021f8931080c0d2ce646dc
+SHA256 (ljdump-1.2.tar.gz) = d7343b074991156dc8054995f3faf6e2fb2f1d2af58aec09fbd47859d776f40e
+SIZE (ljdump-1.2.tar.gz) = 3909
diff --git a/www/ljdump/files/patch-ljdump.py b/www/ljdump/files/patch-ljdump.py
new file mode 100644
index 000000000000..6ed1503c58d1
--- /dev/null
+++ b/www/ljdump/files/patch-ljdump.py
@@ -0,0 +1,24 @@
+--- ljdump.py.orig 2006-09-08 15:49:11.000000000 +0700
++++ ljdump.py 2008-01-12 03:30:50.000000000 +0600
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!%%LOCALBASE%%/bin/python
+ #
+ # ljdump.py - livejournal archiver
+ # Greg Hewgill <greg@hewgill.com> http://hewgill.com
+@@ -113,7 +113,14 @@
+ return ""
+ return e[0].firstChild.nodeValue
+
+-config = xml.dom.minidom.parse("ljdump.config")
++for file in [ "%%PREFIX%%/etc/ljdump.config", "ljdump.config", "/"]:
++ if os.access(file, os.R_OK):
++ break
++if file == "/":
++ print "Neither global (in %%PREFIX%%/etc) nor local configuration file found, exiting"
++ sys.exit()
++print "Using configuration file %s" % file
++config = xml.dom.minidom.parse(file)
+ 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
diff --git a/www/ljdump/pkg-descr b/www/ljdump/pkg-descr
new file mode 100644
index 000000000000..bf04eb6c3128
--- /dev/null
+++ b/www/ljdump/pkg-descr
@@ -0,0 +1,11 @@
+ljdump reads the journal entries from a LiveJournal (or compatible) blog
+site and archives them in a subdirectory named after the journal name.
+Both the journal entries and journal comments are downloaded.
+
+The program may be run as often as needed to bring the backup copy up to
+date. Both new and updated items are downloaded.
+
+ljdump uses only standard Python libraries, so it will work wherever
+Python itself does (Windows, Linux, FreeBSD, Mac OS X, etc).
+
+WWW: http://hewgill.com/software/ljdump/