diff options
author | friendica <info@friendica.com> | 2013-02-02 16:10:27 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-02-02 16:10:27 -0800 |
commit | 09ece497f7211bf65aa026894fec22dd1605a20c (patch) | |
tree | 026ce6b9ae14770df74a8264c8acad5ac790fdab /mods/updatetpl.py | |
parent | 3eacd7aab37421c40a5647aee9acdbc58615ab4e (diff) | |
download | volse-hubzilla-09ece497f7211bf65aa026894fec22dd1605a20c.tar.gz volse-hubzilla-09ece497f7211bf65aa026894fec22dd1605a20c.tar.bz2 volse-hubzilla-09ece497f7211bf65aa026894fec22dd1605a20c.zip |
more work on settings - move template utils to utils and get rid of mods
Diffstat (limited to 'mods/updatetpl.py')
-rwxr-xr-x | mods/updatetpl.py | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/mods/updatetpl.py b/mods/updatetpl.py deleted file mode 100755 index 1319387c6..000000000 --- a/mods/updatetpl.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/python -# -# Script to update Smarty template files from all internal templates -# Copyright 2013 Zach Prezkuta -# Licensed under GPL v3 - - -import os -import sys, getopt -import subprocess - - -def help(pname): - print "\nUsage:" - print "\t" + pname + " -h\n\n\t\t\tShow this help screen\n" - print "\t" + pname + " -p directory\n\n\t\t\tConvert all .tpl files in top-level\n\t\t\tFriendica directory to Smarty templates\n" - print "\t" + pname + "\n\n\t\t\tInteractive mode\n" - - - -# -# Main script -# - -path = '' - -try: - opts, args = getopt.getopt(sys.argv[1:], "hp:") - for opt, arg in opts: - if opt == '-h': - help(sys.argv[0]) - sys.exit() - elif opt == '-p': - path = arg -except getopt.GetoptError: - help(sys.argv[0]) - sys.exit(2) - -if path == '': - path = raw_input('Path to top-level Friendica directory: ') - -if path[-1:] != '/': - path = path + '/' - -excludepaths = ['css', 'img', 'js', 'php', 'theme'] -tplpaths = [] -names = os.listdir(path + 'view/') -for name in names: - if os.path.isdir(path + 'view/' + name): - if name not in excludepaths: - tplpaths.append('view/' + name + '/') - -names = os.listdir(path + 'view/theme/') -for name in names: - if os.path.isdir(path + 'view/theme/' + name): - tplpaths.append('view/theme/' + name + '/tpl/') - -fnull = open(os.devnull, "w") - -for tplpath in tplpaths: - print "Converting " + path + tplpath - subprocess.call(['python', path + 'mods/friendica-to-smarty-tpl.py', '-p', path + tplpath], stdout = fnull) - -fnull.close() - |