Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-28 Thread GunChleoc
Daily is good enough :)
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-27 Thread kaputtnik
Ok, got it. The problem was that merging this branch the folder 
media/documentation/ was owned by me, so the script (which runs as user 
www-data) could not write into it.

Fixed also another small issue.

Merged and deployed.

The django management command to update the documentation is now executed 
daily. Former it was executed hourly. Is this ok?
If we want to update the documentation hourly, i have to investigate if the 
permissions allow it.

Hopefully SirVer did not get too much errors due to my changes in the cron 
jobs...
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-25 Thread GunChleoc
Glad you found it :)
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-24 Thread kaputtnik
Just found that a redirect from docs/wl/ to documentation was missing.

Will give it another try to get it into production next weekend (when i am not 
that tired from work ;) )
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-23 Thread kaputtnik
Hmmm... currently i didn't get the cron job 
/etc/cron.hourly/update_widelands_bzr to work... Commenting all other rows 
(except the 'bzr pull' command) and applying the following do not work for some 
reason:

# Some magic from: http://stackoverflow.com/a/29969243/200945. If we are
# run as root (which we are from cron), we rerun the script under the user we
# actually want to execute all commands as
if [ $UID -eq 0 ]; then
  exec sudo -u www-data "$0" "$@"
fi

cd /var/www/django_projects/wlwebsite/
source bin/activate
cd code/widelands

/var/www/django_projects/wlwebsite/bin/python manage.py create_docs
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-23 Thread GunChleoc
The really dark green works for me. Ship it! :)
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-15 Thread kaputtnik
Ah, forgotton: I have sometimes trouble to access the alpha site, because my 
browser opens  wl.widelands.org instead. I have to clean the browsers cache to 
get into alpha...
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-15 Thread kaputtnik
The link shown in user browsers addressbar is also fixed now. I fixed it in the 
same manner as the links for 'media' and 'wlmedia'. Added a location block to 
the nginx file and made a symlink to 'wlmedia/documentation/html'

I would be glad if some one can have a look at the documentation.

In the meantime i will adjust the code at home accordingly.
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-13 Thread kaputtnik
The alpha site is functional now and running. So one can test the look and feel 
of the documentation.

The link shown in the users addressbar isn't that good now. May i have to 
adjust nginx for that. Also there is no favicon shown.

In regard to bug 1758515 it has to be modified again.
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-13 Thread kaputtnik
Ok, my approach will not work on the server. After some fiddling i will 
continue the work for this next week.

Just if one want's to play around with the alpha site: Be aware that it is 
currently in a WIP-state.
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/solitaire_html_documentation into 
lp:widelands-website.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

2018-05-13 Thread GunChleoc
That screenshot looks so good - finally, a table of contents!

Just 1 tiny nit for a comment.

Diff comments:

> 
> === added directory 'documentation/management'
> === added file 'documentation/management/__init__.py'
> === added directory 'documentation/management/commands'
> === added file 'documentation/management/commands/__init__.py'
> === added file 'documentation/management/commands/create_docs.py'
> --- documentation/management/commands/create_docs.py  1970-01-01 00:00:00 
> +
> +++ documentation/management/commands/create_docs.py  2018-05-12 14:03:46 
> +
> @@ -0,0 +1,134 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> +
> +"""Create the source code documenation.
> +
> +This script covers all needed steps to create or recreate the widelands
> +source code documentation.
> +
> +Needed dependency: Sphinx
> +
> +"""
> +
> +from __future__ import print_function
> +from django.core.management.base import BaseCommand, CommandError
> +from django.conf import settings
> +from subprocess import check_call, CalledProcessError
> +from documentation import conf
> +import os
> +import sys
> +import shutil
> +import glob
> +
> +
> +class Command(BaseCommand):
> +help = 'Create the source code documenation.'
> +
> +def __init__(self, *args, **kwargs):
> +super(Command, self).__init__(*args, **kwargs)
> +
> +# Define the main directories used in this class
> +self.sphinx_dir = os.path.join(
> +settings.WIDELANDS_SVN_DIR, 'doc/sphinx')
> +self.build_dir = os.path.join(
> +settings.MEDIA_ROOT, 'documentation/html_temp')
> +self.sphinx_conf_dir = os.path.dirname(conf.__file__)
> +
> +def move_docs(self):
> +"""Move the documentation created by sphinxdoc to the correct folder.
> +
> +On unix systems the files were served from the symlink called
> +'html'. On Windows systems the files will only be copied in a
> +folder called 'html'.
> +
> +"""
> +
> +if os.name == 'posix':
> +# Creating symlinks is only available on unix systems
> +try:
> +link_name = os.path.join(
> +settings.MEDIA_ROOT, 'documentation/html')
> +target_dir = os.path.join(
> +settings.MEDIA_ROOT, 'documentation/current')
> +
> +if not os.path.exists(target_dir):
> +# only needed on first run
> +os.mkdir(target_dir)
> +
> +if os.path.exists(link_name):
> +# only needed if this script has already run
> +os.remove(link_name)
> +
> +# Temporarily switch the symlink
> +os.symlink(self.build_dir, link_name)
> +# Remove current
> +shutil.rmtree(target_dir)
> +# Copy new build to current
> +shutil.copytree(self.build_dir, target_dir)
> +# Switch the link to current
> +os.remove(link_name)
> +os.symlink(target_dir, link_name)
> +except:
> +raise
> +else:
> +# Non unix OS: Copy docs
> +try:
> +target_dir = os.path.join(
> +settings.MEDIA_ROOT, 'documentation/html')
> +if os.path.exists(target_dir):
> +shutil.rmtree(target_dir)
> +shutil.copytree(self.build_dir, target_dir)
> +except:
> +raise
> +
> +try:
> +# The new build directory is no longer needed
> +shutil.rmtree(self.build_dir)
> +except:
> +raise
> +
> +def handle(self, *args, **options):
> +"""Create the widelands source code documentation.
> +
> +The Documenatation is build by sphinxdoc in the directory

build -> built

> +'settings/MEDIA/documentation/html_temp'.
> +
> +"""
> +
> +if not os.path.exists(self.sphinx_dir):
> +print(
> +"Can't find the directory given by WIDELANDS_SVN_DIR in 
> local_settings.py:\n", self.sphinx_dir)
> +sys.exit(1)
> +
> +if os.path.exists(os.path.join(self.sphinx_dir, 'build')):
> +# Clean the autogen* files created by extract_rst.py
> +# This has to be done because sometimes such a file remains after
> +# removing it from extract_rst.
> +try:
> +for f in glob.glob(os.path.join(self.sphinx_dir, 
> 'source/autogen*')):
> +os.remove(f)
> +except OSError:
> +raise
> +
> +# Locally 'dirhtml' do not work because the staticfiles view disallow
> +# directory indexes, but 'dirhtml' gives nicer addresses in 
> production
> +builder = 'html'
> +if not settings.DEBUG:
> +# In production DEBUG is False
> +builder =