Navigation Menu

Skip to content

Commit

Permalink
changed a ton of files to make docs/ into ducmentation/. changed the …
Browse files Browse the repository at this point in the history
…css because it was easier than not changing the css
  • Loading branch information
kylemcdonald committed Dec 22, 2011
1 parent 4636222 commit b9ee0c7
Show file tree
Hide file tree
Showing 239 changed files with 253 additions and 253 deletions.
6 changes: 3 additions & 3 deletions _config.py
Expand Up @@ -48,10 +48,10 @@
## blog_timezone -- the timezone that you normally write your blog posts from
blog.timezone = "US/Eastern"

controllers.docs.enabled = True
controllers.documentation.enabled = True
controllers.community.enabled = True

docs = controllers.docs
docs.path = 'docs'
documentation = controllers.documentation
documentation.path = 'documentation'


22 changes: 11 additions & 11 deletions _controllers/docs.py → _controllers/documentation.py
Expand Up @@ -11,7 +11,7 @@
import shutil
import glob

sys.path.append(os.path.join(os.path.realpath(__file__)[0:-(len(os.path.join('_controllers','docs.py'))+1)],'_tools'))
sys.path.append(os.path.join(os.path.realpath(__file__)[0:-(len(os.path.join('_controllers','documentation.py'))+1)],'_tools'))
#sys.path.append( os.path.realpath('')+"/../_tools" )
import markdown_file

Expand Down Expand Up @@ -69,8 +69,8 @@ def __parse_element(self, element):

def run():
classes = []
directory = "_docs"
docs = bf.config.controllers.docs
directory = "_documentation"
documentation = bf.config.controllers.documentation

classes = markdown_file.getclass_list()
for clazz_name in classes:
Expand All @@ -83,7 +83,7 @@ def run():
"clazz": clazz,
"functions": functions_file
}
bf.writer.materialize_template("docs_class.mako", ('docs',clazz.module+"/"+clazz.name+".html"), env )
bf.writer.materialize_template("documentation_class.mako", ('documentation',clazz.module+"/"+clazz.name+".html"), env )

function_files = markdown_file.getfunctionsfiles_list()
for functionfile_name in function_files:
Expand All @@ -95,11 +95,11 @@ def run():
"clazz": None,
"functions": functions_file
}
bf.writer.materialize_template("docs_class.mako", ('docs',functions_file.module+"/"+functions_file.name+".html"), env )
bf.writer.materialize_template("documentation_class.mako", ('documentation',functions_file.module+"/"+functions_file.name+".html"), env )


# process index file
indexhtml_file = open("_docs/" + "index.markdown",'r')
indexhtml_file = open("_documentation/" + "index.markdown",'r')
indexhtml = indexhtml_file.read()
columns = []
columns_src = indexhtml.split('___column___')
Expand All @@ -112,7 +112,7 @@ def run():
blocks.append(b)
columns.append(blocks)

indexhtml_file = open("_docs/" + "indexAddons.markdown",'r')
indexhtml_file = open("_documentation/" + "indexAddons.markdown",'r')
indexhtml = indexhtml_file.read()
addons_columns = []
columns_src = indexhtml.split('___column___')
Expand All @@ -125,19 +125,19 @@ def run():
blocks.append(b)
addons_columns.append(blocks)

bf.writer.materialize_template("docs.mako", ('docs',"index.html"), {'columns':columns,'addons_columns':addons_columns} )
bf.writer.materialize_template("documentation.mako", ('documentation',"index.html"), {'columns':columns,'addons_columns':addons_columns} )

for root, dirs, files in os.walk(directory):
for name in files:
file_split = os.path.splitext(name)
if file_split[1]==".jpeg" or file_split[1]==".jpg" or file_split[1]==".gif" or file_split[1]==".png":
try:
os.mkdir(os.path.join('_site','docs',os.path.basename(root)))
os.mkdir(os.path.join('_site','documentation',os.path.basename(root)))
except:
pass
shutil.copyfile(os.path.join(root,name), os.path.join('_site','docs',os.path.basename(root),name))
shutil.copyfile(os.path.join(root,name), os.path.join('_site','documentation',os.path.basename(root),name))

#html = open(docs.dir + "/" + class_fn + ".html",'w')
#html = open(documentation.dir + "/" + class_fn + ".html",'w')
#html.write(p.content)
#html.close()

Expand Down
28 changes: 14 additions & 14 deletions _dbtools/db2markdown.py
Expand Up @@ -2,21 +2,21 @@

import os
import sys
import docs_group
import docs_files
import docs_function
import docs_members
import documentation_group
import documentation_files
import documentation_function
import documentation_members
import MySQLdb

docs_root = "/home/arturo/Documentos/new_of_site/_docs"
documentation_root = "/home/arturo/Documentos/new_of_site/_documentation"

index = open(docs_root + "/index.markdown",'w')
index = open(documentation_root + "/index.markdown",'w')
db = MySQLdb.connect(host='localhost',user='root',passwd='asdqwe34',db='of_site09')
adv_groups = docs_group.list_all(db,'core',True)
adv_groups = documentation_group.list_all(db,'core',True)


def export_vars(db,clazz_file,clazz):
variables = docs_members.list_all_vars(db,clazz.id)
variables = documentation_members.list_all_vars(db,clazz.id)
for var in variables:
#if var.visible and not var.advanced
index.write(var.name+'\n\n')
Expand All @@ -39,7 +39,7 @@ def export_vars(db,clazz_file,clazz):


def export_methods(db,clazz_file,clazz):
methods = docs_members.list_all_methods(db,clazz.id)
methods = documentation_members.list_all_methods(db,clazz.id)
for method in methods:
#if method.visible and not method.advanced
if len(method.parameters.replace(' ',''))>0:
Expand All @@ -66,7 +66,7 @@ def export_methods(db,clazz_file,clazz):
clazz_file.write("\n\n\n\n\n\n\n\n\n\n\n\n")

def export_classes(db,group_dir,group):
classes = docs_files.list_all_classes(db,group.id)
classes = documentation_files.list_all_classes(db,group.id)
for clazz in classes:
print str(clazz.id) + " " + clazz.name + " " + str(clazz.new)
clazz_file = open(group_dir+"/"+clazz.name+".markdown",'w')
Expand All @@ -76,7 +76,7 @@ def export_classes(db,group_dir,group):
index.write('__advanced: ' + ('true' if clazz.advanced else 'false' ) + '__\n\n')
index.write('__methods__\n\n')

#clazz_file.write( '<%inherit file="_templates/docs.mako" />\n' )
#clazz_file.write( '<%inherit file="_templates/documentation.mako" />\n' )
clazz_file.write( '#class ' + clazz.name + "\n\n" )


Expand All @@ -99,10 +99,10 @@ def export_classes(db,group_dir,group):
clazz_file.close()

def export_groups(db,advanced):
groups = docs_group.list_all(db,'core',advanced)
groups = documentation_group.list_all(db,'core',advanced)
for group in groups:
print str(group.id) + " " + group.name
group_dir = docs_root + "/" + group.name.replace(' ','_')
group_dir = documentation_root + "/" + group.name.replace(' ','_')
#index.write("//----------------------\n\n")
index.write("##" + group.name + "##\n\n")
try:
Expand All @@ -113,7 +113,7 @@ def export_groups(db,advanced):



#index.write( '<%inherit file="_templates/docs.mako" />\n' )
#index.write( '<%inherit file="_templates/documentation.mako" />\n' )
index.write( '\n' )
export_groups(db,False)
export_groups(db,True)
Expand Down
12 changes: 6 additions & 6 deletions _dbtools/dbfunctions2markdown.py
Expand Up @@ -5,19 +5,19 @@

sys.path.append('_tools')

import docs_group
import documentation_group
import dbtools_group
import dbtools_files
import dbtools_functions
import docs_members
from docs_function import DocsFunctionsFile, DocsFunction
import documentation_members
from documentation_function import DocsFunctionsFile, DocsFunction
import MySQLdb
import markdown_file


docs_root = "/home/arturo/Documentos/new_of_site/_docs"
documentation_root = "/home/arturo/Documentos/new_of_site/_documentation"

#index = open(docs_root + "/index.markdown",'w')
#index = open(documentation_root + "/index.markdown",'w')
db = MySQLdb.connect(host='localhost',user='root',passwd='asdqwe34',db='of_site09')
adv_groups = dbtools_group.list_all(db,'core',True)

Expand Down Expand Up @@ -45,7 +45,7 @@ def export_groups(db,advanced):
groups = dbtools_group.list_all(db,'core',advanced)
for group in groups:
print str(group.id) + " " + group.name
group_dir = docs_root + "/" + group.name.replace(' ','_')
group_dir = documentation_root + "/" + group.name.replace(' ','_')
try:
os.mkdir(group_dir)
except:
Expand Down
18 changes: 9 additions & 9 deletions _dbtools/dbtools_class.py
Expand Up @@ -3,7 +3,7 @@

def list_all(db,fileid):
cursor=db.cursor()
sql='SELECT id,name,visible,advanced FROM docs_class WHERE fileid=%s '
sql='SELECT id,name,visible,advanced FROM documentation_class WHERE fileid=%s '
cursor.execute(sql,(fileid,))
classes=cursor.fetchall()
class_list = []
Expand All @@ -16,23 +16,23 @@ def list_all(db,fileid):

def getClass(db,classid):
cursor=db.cursor()
sql='SELECT name,description FROM docs_class WHERE id=%s'
sql='SELECT name,description FROM documentation_class WHERE id=%s'
cursor.execute(sql,(classid,))
clazz=cursor.fetchall()
docs_class = DocsClass(classid)
docs_class.name = clazz[0][0]
docs_class.reference = clazz[0][1]
return docs_class
documentation_class = DocsClass(classid)
documentation_class.name = clazz[0][0]
documentation_class.reference = clazz[0][1]
return documentation_class

def renderFunctionsDetail(htmlFunction, function):
htmlFunction.name.content = function.name
htmlFunction.description.content = function.description
htmlFunction.syntax.content = function.syntax

def renderClassDetail(tem,clazz):
tem.docs_class.name.content = clazz.name
tem.docs_class.description.content = clazz.description
tem.docs_class.function.repeat(renderFunctionsDetail,clazz.functions())
tem.documentation_class.name.content = clazz.name
tem.documentation_class.description.content = clazz.description
tem.documentation_class.function.repeat(renderFunctionsDetail,clazz.functions())

def class_detail():
try:
Expand Down
18 changes: 9 additions & 9 deletions _dbtools/dbtools_files.py
@@ -1,26 +1,26 @@
import docs_class
from docs_class import DocsClass
import docs_function
from docs_function import DocsFunction
import documentation_class
from documentation_class import DocsClass
import documentation_function
from documentation_function import DocsFunction

def names(db,advanced):
cursor=db.cursor()
sql='SELECT id,name FROM docs_files WHERE advanced=%s'
sql='SELECT id,name FROM documentation_files WHERE advanced=%s'
cursor.execute(sql,(advanced,))
files=cursor.fetchall()
return files

def list_all(db,groupid):
cursor=db.cursor()
sql='SELECT id,name,description FROM docs_files WHERE groupid=%s'
sql='SELECT id,name,description FROM documentation_files WHERE groupid=%s'
cursor.execute(sql,(groupid,))
files=cursor.fetchall()
return files


def list_all_classes(db,groupid):
cursor=db.cursor()
sql='SELECT c.id,c.name,c.description,c.advanced,c.visible FROM docs_class c JOIN docs_files f WHERE c.fileid=f.id and f.groupid=%s ORDER BY f.sortid, c.sortid'
sql='SELECT c.id,c.name,c.description,c.advanced,c.visible FROM documentation_class c JOIN documentation_files f WHERE c.fileid=f.id and f.groupid=%s ORDER BY f.sortid, c.sortid'
cursor.execute(sql,(groupid))
classes=cursor.fetchall()
class_list = []
Expand All @@ -30,13 +30,13 @@ def list_all_classes(db,groupid):
clazz.reference = dbclass[2]
clazz.advanced = dbclass[3]
clazz.visible = dbclass[4]
#clazz.function_list = docs_function.list_all(db,dbclass[0])
#clazz.function_list = documentation_function.list_all(db,dbclass[0])
class_list.append(clazz)
return class_list

def list_all_functions(db,groupid,advanced):
cursor=db.cursor()
sql='SELECT c.id,c.name FROM docs_functions c JOIN docs_files f WHERE c.linkid=f.id and f.groupid=%s and f.advanced=%s and c.advanced=%s and f.visible=1 and c.visible=1 and c.linktable="files" ORDER BY f.sortid, c.sortid'
sql='SELECT c.id,c.name FROM documentation_functions c JOIN documentation_files f WHERE c.linkid=f.id and f.groupid=%s and f.advanced=%s and c.advanced=%s and f.visible=1 and c.visible=1 and c.linktable="files" ORDER BY f.sortid, c.sortid'
cursor.execute(sql,(groupid,advanced,advanced,))
functions=cursor.fetchall()
function_list = []
Expand Down
4 changes: 2 additions & 2 deletions _dbtools/dbtools_function.py
@@ -1,14 +1,14 @@

def names(db,classid,advanced):
cursor=db.cursor()
sql='SELECT id,name FROM docs_functions WHERE linktable="class" and linkid= %s and advanced=%s'
sql='SELECT id,name FROM documentation_functions WHERE linktable="class" and linkid= %s and advanced=%s'
cursor.execute(sql,(classid,advanced))
functions=cursor.fetchall()
return functions

def list_all(db,classid,advanced):
cursor=db.cursor()
sql='SELECT id,name FROM docs_functions WHERE linkid=%s and linktable="class" and advanced=%s and visible=1 ORDER BY sortid'
sql='SELECT id,name FROM documentation_functions WHERE linkid=%s and linktable="class" and advanced=%s and visible=1 ORDER BY sortid'
cursor.execute(sql,(classid,advanced,))
functions=cursor.fetchall()
function_list = []
Expand Down
6 changes: 3 additions & 3 deletions _dbtools/dbtools_functions.py
@@ -1,5 +1,5 @@
import MySQLdb
from docs_function import DocsFunction
from documentation_function import DocsFunction


def tostr(string):
Expand All @@ -10,15 +10,15 @@ def tostr(string):

def names(db,classid,linktable="class"):
cursor=db.cursor()
sql='SELECT name FROM docs_functions WHERE linktable=%s and linkid= %s'
sql='SELECT name FROM documentation_functions WHERE linktable=%s and linkid= %s'
cursor.execute(sql,(linktable,classid,))

functions=cursor.fetchall()
return functions

def list_all(db,linkid,linktable='class'):
cursor=db.cursor()
sql='SELECT id,name,description,returns,returns_description,parameters,syntax,version_started,version_deprecated,visible,advanced FROM docs_functions WHERE linktable=%s and linkid= %s'
sql='SELECT id,name,description,returns,returns_description,parameters,syntax,version_started,version_deprecated,visible,advanced FROM documentation_functions WHERE linktable=%s and linkid= %s'
cursor.execute(sql,(linktable,linkid,))
dbfunctions = cursor.fetchall()
functions = []
Expand Down
4 changes: 2 additions & 2 deletions _dbtools/dbtools_group.py
@@ -1,9 +1,9 @@
from docs_group import DocsGroup
from documentation_group import DocsGroup
import dbtools_files

def list_all(db,type,advanced):
cursor=db.cursor()
sql='SELECT id,name FROM docs_group WHERE type=%s and advanced=%s and visible=1 ORDER BY sortid'
sql='SELECT id,name FROM documentation_group WHERE type=%s and advanced=%s and visible=1 ORDER BY sortid'
cursor.execute(sql,(type,advanced,))
groups=cursor.fetchall()
groups_list = []
Expand Down
6 changes: 3 additions & 3 deletions _dbtools/dbtools_members.py
Expand Up @@ -7,14 +7,14 @@ def tostr(string):

def names(db,classid,advanced):
cursor=db.cursor()
sql='SELECT id,name FROM docs_functions WHERE linktable="class" and linkid= %s and advanced=%s'
sql='SELECT id,name FROM documentation_functions WHERE linktable="class" and linkid= %s and advanced=%s'
cursor.execute(sql,(classid,advanced))
functions=cursor.fetchall()
return functions

def list_all_methods(db,classid):
cursor=db.cursor()
sql='SELECT id,name,returns,parameters,description,syntax,returns_description,access,version_started,version_deprecated,extra_description,visible,advanced FROM docs_functions WHERE linktable="class" and linkid=%s ORDER BY sortid'
sql='SELECT id,name,returns,parameters,description,syntax,returns_description,access,version_started,version_deprecated,extra_description,visible,advanced FROM documentation_functions WHERE linktable="class" and linkid=%s ORDER BY sortid'
cursor.execute(sql,(classid,))
functions=cursor.fetchall()
function_list = []
Expand Down Expand Up @@ -45,7 +45,7 @@ def list_all_methods(db,classid):

def list_all_vars(db,classid):
cursor=db.cursor()
sql='SELECT id,name,type,description,access,version_started,version_deprecated,constant,visible,advanced FROM docs_vars WHERE linktable="class" and linkid=%s ORDER BY sortid'
sql='SELECT id,name,type,description,access,version_started,version_deprecated,constant,visible,advanced FROM documentation_vars WHERE linktable="class" and linkid=%s ORDER BY sortid'
cursor.execute(sql,(classid,))
variables=cursor.fetchall()
variables_list = []
Expand Down
4 changes: 2 additions & 2 deletions _dbtools/dbtools_method.py
Expand Up @@ -7,14 +7,14 @@ def tostr(string):

def names(db,classid,advanced):
cursor=db.cursor()
sql='SELECT id,name FROM docs_functions WHERE linktable="class" and linkid= %s and advanced=%s'
sql='SELECT id,name FROM documentation_functions WHERE linktable="class" and linkid= %s and advanced=%s'
cursor.execute(sql,(classid,advanced))
functions=cursor.fetchall()
return functions

def list_all(db,classid,advanced):
cursor=db.cursor()
sql='SELECT id,name,returns,parameters,description,syntax,returns_description,extra_description FROM docs_functions WHERE linktable="class" and linkid=%s and advanced=%s ORDER BY sortid'
sql='SELECT id,name,returns,parameters,description,syntax,returns_description,extra_description FROM documentation_functions WHERE linktable="class" and linkid=%s and advanced=%s ORDER BY sortid'
cursor.execute(sql,(classid,advanced,))
functions=cursor.fetchall()
function_list = []
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b9ee0c7

Please sign in to comment.