From 83f027429767a05bbcc2cc662e8d9bc3e1508f33 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Wed, 16 Aug 2017 15:01:46 +0300 Subject: [PATCH] moving files to allow pip installation --- Qalbum | 1 - Qalbum.py => qalbum/Qalbum.py | 4 ++-- {lib => qalbum/lib}/gallery.js | 0 {lib => qalbum/lib}/jquery.js | 0 {lib => qalbum/lib}/jqzoom.js | 0 {lib => qalbum/lib}/style.css | 0 {lib => qalbum/lib}/touch.js | 0 Qalbum-descriptor.py => scripts/Qalbum-descriptor | 2 +- Qalbum-thumbnailer.py => scripts/Qalbum-thumbnailer | 2 +- 9 files changed, 4 insertions(+), 5 deletions(-) delete mode 120000 Qalbum rename Qalbum.py => qalbum/Qalbum.py (99%) rename {lib => qalbum/lib}/gallery.js (100%) rename {lib => qalbum/lib}/jquery.js (100%) rename {lib => qalbum/lib}/jqzoom.js (100%) rename {lib => qalbum/lib}/style.css (100%) rename {lib => qalbum/lib}/touch.js (100%) rename Qalbum-descriptor.py => scripts/Qalbum-descriptor (99%) rename Qalbum-thumbnailer.py => scripts/Qalbum-thumbnailer (99%) diff --git a/Qalbum b/Qalbum deleted file mode 120000 index 35d5c32..0000000 --- a/Qalbum +++ /dev/null @@ -1 +0,0 @@ -Qalbum.py \ No newline at end of file diff --git a/Qalbum.py b/qalbum/Qalbum.py similarity index 99% rename from Qalbum.py rename to qalbum/Qalbum.py index 7c1dd90..bd83257 100755 --- a/Qalbum.py +++ b/qalbum/Qalbum.py @@ -555,7 +555,7 @@ def setupdefaultoptions(options): if 'reverse' not in options: options.reverse=False if 'style' not in options or options.style is None: - options.style=os.path.join(os.path.abspath(os.path.dirname(os.path.realpath(sys.argv[0]))),'lib','style.css') + options.style=os.path.join(os.path.dirname(__file__),'lib','style.css') if 'timesort' not in options: options.timesort=False if 'thumbs' not in options: @@ -601,7 +601,7 @@ def execute_plain(): writeconfig(options) sys.exit(0) # Copy all resources to target folder - pathname=os.path.dirname(os.path.realpath(sys.argv[0])) + pathname=os.path.dirname(__file__) fullpath=os.path.abspath(pathname) libpath=os.path.join(options.startpath,'.qalbum') if not os.path.exists(options.style): diff --git a/lib/gallery.js b/qalbum/lib/gallery.js similarity index 100% rename from lib/gallery.js rename to qalbum/lib/gallery.js diff --git a/lib/jquery.js b/qalbum/lib/jquery.js similarity index 100% rename from lib/jquery.js rename to qalbum/lib/jquery.js diff --git a/lib/jqzoom.js b/qalbum/lib/jqzoom.js similarity index 100% rename from lib/jqzoom.js rename to qalbum/lib/jqzoom.js diff --git a/lib/style.css b/qalbum/lib/style.css similarity index 100% rename from lib/style.css rename to qalbum/lib/style.css diff --git a/lib/touch.js b/qalbum/lib/touch.js similarity index 100% rename from lib/touch.js rename to qalbum/lib/touch.js diff --git a/Qalbum-descriptor.py b/scripts/Qalbum-descriptor similarity index 99% rename from Qalbum-descriptor.py rename to scripts/Qalbum-descriptor index 6060cfe..fc3619a 100755 --- a/Qalbum-descriptor.py +++ b/scripts/Qalbum-descriptor @@ -18,7 +18,7 @@ import sys,os import subprocess from argparse import ArgumentParser -import Qalbum +from qalbum import Qalbum # (c) ville.q.rantanen@gmail.com diff --git a/Qalbum-thumbnailer.py b/scripts/Qalbum-thumbnailer similarity index 99% rename from Qalbum-thumbnailer.py rename to scripts/Qalbum-thumbnailer index 8c6d682..c3518c7 100755 --- a/Qalbum-thumbnailer.py +++ b/scripts/Qalbum-thumbnailer @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -import Qalbum +from qalbum import Qalbum from argparse import ArgumentParser import os