Added the delevop_server script

This script and the small changes to quick start's makefile make for easily launching and killing of pelican --debug --autoreload and SimpleHTTPServer.
This is extra useful for working on templates.
This commit is contained in:
tBunnyMan 2012-07-08 17:50:18 -07:00
commit 38ffcfd4c4
3 changed files with 95 additions and 2 deletions

View file

@ -160,7 +160,7 @@ Please answer the following questions so this script can generate the files need
else:
CONF['default_pagination'] = False
mkfile = ask('Do you want to generate a Makefile to easily manage your website?', bool, True)
mkfile = ask('Do you want to generate a Makefile and develop server script to easily manage your website?', bool, True)
if mkfile:
if ask('Do you want to upload your website using FTP?', answer=bool, default=False):
@ -214,4 +214,13 @@ Please answer the following questions so this script can generate the files need
except OSError, e:
print('Error: {0}'.format(e))
try:
with open(os.path.join(CONF['basedir'], 'develop_server.sh'), 'w') as fd:
for line in get_template('develop_server.sh'):
template = string.Template(line)
fd.write(template.safe_substitute(CONF))
fd.close()
except OSError, e:
print('Error: {0}'.format(e))
print('Done. Your new project is available at %s' % CONF['basedir'])