migrate to standard svn repo layout

This commit is contained in:
Markus Rosenstihl
2014-06-26 11:10:51 +00:00
commit 0a393b0748
55 changed files with 13617 additions and 0 deletions

242
doc/Doxyfile Normal file
View File

@ -0,0 +1,242 @@
# Doxyfile 1.5.3
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "python DAMARIS"
PROJECT_NUMBER = 0.13-svn
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class " \
"The $name widget " \
"The $name file " \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text "
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = damaris
INPUT_ENCODING = ISO-8859-15
FILE_PATTERNS = *.py \
*.PY
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = YES
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = reference-html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = NO
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH = /usr/bin/
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

24
doc/README.txt Normal file
View File

@ -0,0 +1,24 @@
by now the documentation creation is not automatized...
# html reference
# requires dot and doxygen
cd doc
ln -s ../src damaris
doxygen Doxyfile
rm damaris
# todo: copy damaris logo
# html wiki export
# requires moinmoin and damaris/data as wikidata
cd doc
# underlay must be writable, so we have to copy it...
cp -r /usr/share/moin/underlay wikiunderlay
python dump_wiki.py
cp -r /usr/share/moin/htdocs/modern tutorial-html
rm -r wikiunderlay wikiconfig.py
# get useful numpy doc
wget http://www.scipy.org/Numpy_Example_List_With_Doc?action=print

177
doc/dump_wiki.py Normal file
View File

@ -0,0 +1,177 @@
# -*- coding: iso-8859-1 -*-
"""
MoinMoin - Dump a MoinMoin wiki to static pages
based on "moin.py export dump" command
"""
import sys, os, time, StringIO, codecs, shutil, re, errno
from MoinMoin import config, wikiutil, Page
from MoinMoin.request import RequestCLI
from MoinMoin.action import AttachFile
HTML_SUFFIX = ".html"
page_template = u'''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=%(charset)s">
<title>%(pagename)s</title>
<link rel="stylesheet" type="text/css" media="all" charset="utf-8" href="%(theme)s/css/common.css">
<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="%(theme)s/css/screen.css">
<link rel="stylesheet" type="text/css" media="print" charset="utf-8" href="%(theme)s/css/print.css">
</head>
<body>
<div id="page">
<h1 id="title">%(pagename)s</h1>
%(pagehtml)s
</div>
<hr>
%(timestamp)s
</body>
</html>
'''
def _attachment(request, pagename, filename, outputdir):
filename = filename.encode(config.charset)
source_dir = AttachFile.getAttachDir(request, pagename)
source_file = os.path.join(source_dir, filename)
dest_dir = os.path.join(outputdir, "attachments", wikiutil.quoteWikinameFS(pagename))
dest_file = os.path.join(dest_dir, filename)
dest_url = "attachments/%s/%s" % (wikiutil.quoteWikinameFS(pagename), wikiutil.url_quote(filename))
if os.access(source_file, os.R_OK):
if not os.access(dest_dir, os.F_OK):
try:
os.makedirs(dest_dir)
except:
print ("Cannot create attachment directory '%s'" % dest_dir)
raise
elif not os.path.isdir(dest_dir):
print ("'%s' is not a directory" % dest_dir)
shutil.copyfile(source_file, dest_file)
print ('Writing "%s"...' % dest_url)
return dest_url
else:
return ""
class PluginScript: #(MoinScript):
""" Dump script class """
def __init__(self):
pass
def mainloop(self):
""" moin-dump's main code. """
# Prepare output directory
outputdir=os.path.join(os.curdir,"tutorial-html")
try:
os.mkdir(outputdir)
print "Created output directory '%s'!" % outputdir
except OSError, err:
if err.errno != errno.EEXIST:
print "Cannot create output directory '%s'!" % outputdir
raise
sys.path.insert(0, os.path.abspath(os.curdir))
wikiconfig_template="""
from MoinMoin.multiconfig import DefaultConfig
class Config(DefaultConfig):
sitename = u'DAMARIS Homepage and Usergroup'
logo_string = u'<img src="/damaris/wiki/damaris/DAMARIS.png" alt="DAMARIS Logo">'
page_front_page = u"Welcome"
interwikiname = 'damaris'
data_dir = '%(pwd)s/wikidata/'
data_underlay_dir = '%(pwd)s/wikiunderlay'
url_prefix = '/damaris/wiki'
theme_default = 'modern'
"""%{"pwd": os.curdir, "underlay": "/home/achim/underlay" }
config_file = open("wikiconfig.py","w")
print >>config_file, wikiconfig_template
config_file.close()
# start with wiki entry page
request = RequestCLI(pagename="Welcome")
# fix url_prefix so we get relative paths in output html
url_prefix = "."
request.cfg.url_prefix = url_prefix
pages = request.rootpage.getPageList(user='') # get list of all pages in wiki
pages.sort()
# extract a list of pages to be extracted
# trial session to fat!!!
try:
pages_match = re.compile("^(Tutorial|auxiliary tools|overview|installation|code snippets)")
pages = [page for page in pages if pages_match.match(page)]
except:
print "did not find suitable pages"
raise
wikiutil.quoteWikinameURL = lambda pagename, qfn=wikiutil.quoteWikinameFS: (qfn(pagename) + HTML_SUFFIX)
AttachFile.getAttachUrl = lambda pagename, filename, request, addts=0, escaped=0: (_attachment(request, pagename, filename, outputdir))
errfile = os.path.join(outputdir, 'error.log')
errlog = open(errfile, 'w')
errcnt = 0
page_front_page = wikiutil.getSysPage(request, request.cfg.page_front_page).page_name
page_title_index = wikiutil.getSysPage(request, 'TitleIndex').page_name
page_word_index = wikiutil.getSysPage(request, 'WordIndex').page_name
navibar_html = ''
for p in [page_front_page, page_title_index, page_word_index]:
navibar_html += '&nbsp;[<a href="%s">%s</a>]' % (wikiutil.quoteWikinameURL(p), wikiutil.escape(p))
urlbase = request.url # save wiki base url
for pagename in pages:
# we have the same name in URL and FS
file = wikiutil.quoteWikinameURL(pagename)
print ('Writing "%s"...' % file)
try:
pagehtml = ''
request.url = urlbase + pagename # add current pagename to url base
page = Page.Page(request, pagename)
request.page = page
try:
request.reset()
pagehtml = request.redirectedOutput(page.send_page, request, count_hit=0, content_only=1)
except:
errcnt = errcnt + 1
print >>sys.stderr, "*** Caught exception while writing page!"
print >>errlog, "~" * 78
print >>errlog, file # page filename
import traceback
traceback.print_exc(None, errlog)
finally:
timestamp = time.strftime("%Y-%m-%d %H:%M")
filepath = os.path.join(outputdir, file)
fileout = codecs.open(filepath, 'w', config.charset)
logo_html = '<img src="logo.png">'
fileout.write(page_template % {
'charset': config.charset,
'pagename': pagename,
'pagehtml': pagehtml,
'logo_html': logo_html,
'navibar_html': navibar_html,
'timestamp': timestamp,
'theme': request.cfg.theme_default,
})
fileout.close()
# ToDo: insert style sheets and logo
errlog.close()
if errcnt:
print >>sys.stderr, "*** %d error(s) occurred, see '%s'!" % (errcnt, errfile)
if __name__=="__main__":
PluginScript().mainloop()

84
doc/index.html Normal file
View File

@ -0,0 +1,84 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>python-damaris documentation index</title>
</head>
<body>
<h1><img alt="DAMARIS" src="../images/DAMARIS.png" align="middle">DAMARIS
Documentation Index<br>
</h1>
<h2>Local Resources:</h2>
<br>
Documentation from DAMARIS wiki:<br>
<ul>
<li><a href="tutorial-html/Tutorial.html">Tutorial</a></li>
<li><a href="tutorial-html/Tutorial%282f%29List_of_Commands.html">Command
Reference</a></li>
</ul>
python-damaris source code reference (generated by <a
href="http://www.doxygen.org/">doxygen</a>)<br>
<ul>
<li><a href="reference-html/index.html">index</a></li>
<li><a href="reference-html/namespacedamaris_1_1data.html">result
reference</a><br>
</li>
<li><a
href="reference-html/namespacedamaris_1_1experiments_1_1Experiment.html">experiment
reference</a></li>
</ul>
<h2>Internet Resources:</h2>
<ul>
<li><a href="http://damaris.berlios.de/">DAMARIS
Homepage</a></li>
<li>Software Related</li>
<ul>
<li><a href="http://www.python.org/">Python Homepage</a></li>
<li><a href="http://www.numpy.org/">Numeric Python (numpy)</a></li>
<li><a href="http://www.pytables.org/">HDF Support (pytables)</a><br>
</li>
<li><a href="http://www.scipy.org/">Scientific Python (scipy)</a></li>
<li><a href="http://www.pygtk.org/">PyGTK Homepage (Graphics)<br>
</a></li>
<li><a href="matplotlib.sourceforge.net">2D Graph drawing
(Matplotlib)</a></li>
<li><a href="http://ipython.scipy.org/">Interactive Python
Interpreter (iPython)</a><br>
</li>
</ul>
<li>More Documentation:</li>
<ul>
<li>Official Python <a href="http://www.python.org/doc/">Documentation</a>
/ <a href="http://docs.python.org/tut/tut.html">Tutorial</a></li>
<li>More Python <a
href="http://www.awaretek.com/tutorials.html#begin">Tutorials</a><br>
</li>
</ul>
<ul>
<li><a href="http://www.scipy.org/Numpy_Example_List_With_Doc">Numpy
Example List</a></li>
<li><a href="http://www.tramy.us/numpybook.pdf">Numpy Book (pdf)</a>
von Travis E. Oliphant</li>
<li>A <a href="http://www.scipy.org/Cookbook">Cookbook</a> for
many advanced data processing tasks<br>
</li>
</ul>
<li>NMR Links</li>
<ul>
<li><a href="http://www.nmrwiki.org/">NMR wiki</a><br>
</li>
<li><a href="http://www.spincore.com/nmrinfo/">NMR Info</a><br>
</li>
<li><a href="http://www.diffusion-fundamentals.org/">Diffusion
Fundamentals</a><br>
</li>
</ul>
<ul>
<li><a href="http://www.fkp.tu-darmstadt.de/groups/ag_fujara/fup/index.de.jsp">AG Fujara</a></li>
<li><a href="http://www.fkp.tu-darmstadt.de/groups/ag_vogel/index.de.jsp">AG Vogel</a><br>
</li>
</ul>
</ul>
</body>
</html>