mirror of https://github.com/Malphaet/vkyweb.git
Finished patching, functionnal mostly and lacking features
This commit is contained in:
parent
fbd4cb7dd8
commit
61090e54e1
|
|
@ -1,8 +1,7 @@
|
|||
# Copyleft (c) 2016 Cocobug All Rights Reserved.
|
||||
# coding=utf-8
|
||||
# -*- coding: utf_8 -*-
|
||||
|
||||
|
||||
import os,sys
|
||||
import os,sys,codecs
|
||||
import re
|
||||
import traceback
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyleft (c) 2016 Cocobug All Rights Reserved.
|
||||
# coding=utf-8
|
||||
# -*- coding: utf_8 -*-
|
||||
|
||||
import re,traceback,os
|
||||
import re,traceback,os,markdown
|
||||
|
||||
try:
|
||||
from tree_parser import *
|
||||
|
|
@ -43,7 +43,8 @@ def makeiFrame(module,list_of_nodes):
|
|||
return module.iframe(list_of_nodes)
|
||||
|
||||
def makeData(module,current_node,lang):
|
||||
return module.content(content=current_node.get_content(lang),title=current_node.get_one(["article_title",'title',"article_name","name"],lang))
|
||||
content=markdown.markdown(unicode(current_node.get_content(lang).decode("utf-8")))
|
||||
return module.content(content=content.encode('utf-8'),title=current_node.get_one(["article_title",'title',"article_name","name"],lang))
|
||||
|
||||
def makePage(module,site,lang,menu,data,depth,langswitch):
|
||||
return module.container(pagetitle=site.get_title(lang),websitename=site.get_one(['websitename',"webtitle","name","title"],lang),menu=menu,page=data,depth=depth,langswitch=langswitch)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# -*- coding: utf_8 -*-
|
||||
|
||||
import os
|
||||
|
||||
def container(pagetitle="#_pagetitle_#",websitename="#_websitename_#",menu="\{menu\}",page="\{page\}",langswitch="\{langswitch\}",depth=""):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# Copyleft (c) 2016 Cocobug All Rights Reserved.
|
||||
# -*- coding: utf_8 -*-
|
||||
|
||||
import os,sys
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Loreme ipsume dolore site amete, consecteture adipisicinge elite, sede doe eiusm
|
|||
__/fr__
|
||||
|
||||
__*__
|
||||

|
||||

|
||||
__/*__
|
||||
|
||||
__hidden__
|
||||
|
|
|
|||
1
test.py
1
test.py
|
|
@ -1,4 +1,5 @@
|
|||
# Copyleft (c) 2016 Cocobug All Rights Reserved.
|
||||
# -*- coding: utf_8 -*-
|
||||
|
||||
from minitest import minitest
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf_8 -*-
|
||||
|
||||
# Copyleft (c) 2016 Cocobug All Rights Reserved.
|
||||
|
||||
import argparse,os,sys,shutil
|
||||
import argparse,os,sys,shutil,markdown
|
||||
from generator import *
|
||||
choosen_model=models.dual
|
||||
|
||||
|
|
@ -67,7 +68,7 @@ def gen_all_nodes_content(tree,lang):
|
|||
if (os.path.basename(current_node.name)[0]!="_"): #Likely add a visible: true/false tag in the future
|
||||
file_name=htmlContentNamer(current_node.name)
|
||||
if args.verbose:
|
||||
print "Generating [{}]: content".format(file_name)
|
||||
print("Generating [{}]: content".format(file_name))
|
||||
save=savePath(file_name)
|
||||
content=model.makeData(choosen_model,current_node,lang)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue