Commit d96841c9 authored by Denis Salem's avatar Denis Salem
Browse files

wip include

parent b1d268b5
authors: 'Denis Salem'
categories: ''
categories: 'test1,test2'
tags: ''
title:
style: features
---
## V __en__ C is super easy to use and learn!
Here's a random number .:GetRandomNumber::5::10::0:.
Here's a random number .:GetRandomNumber::0::100::0:.
.:DoesntExists:.
......@@ -99,16 +99,16 @@
DONE | Clear white spaces in error messages.
DONE | Speed up blog exportation ( almost seven times faster!).
DONE | Implement RelativeLocation.
WIP | Massive refactorisation, code cleaning and optimisation. (Fix pattern dictionary, must be more organized)
DONE | Optimisation of categories tree.
DONE | Code should be a little bit more PEP 8 compliant.
DONE | Handle currentLocale = locale.getlocale()[0].split('_')[0] AttributeError: 'NoneType'.
DONE | Clean up installation.
DONE | Add random number generator.
WIP | Massive refactorisation, code cleaning and optimisation.
WIP | Change nomenclature: Most of the usual patterns are changed. Fix doc.
WIP | Add function Include. (Add a directory force included ressources)
TODO | Fix vertical scroll bar in code snippet.
TODO | Add relevant templates for themes.
TODO | Add function Include.
TODO | Add categories tree in entry.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
TODO | SSH SUPPORT.
......
......@@ -138,6 +138,7 @@ def new_blog(argv):
os.mkdir(folder_name+'/'+"blog")
os.mkdir(folder_name+'/'+"entries")
os.mkdir(folder_name+'/'+"theme")
os.mkdir(folder_name+'/'+"includes")
os.mkdir(folder_name+'/'+"extra")
os.mkdir(folder_name+'/'+"templates")
stream = codecs.open(folder_name+'/'+'blogConfiguration.yaml', 'w',encoding="utf-8")
......
......@@ -18,10 +18,23 @@
# along with VenC. If not, see <http://www.gnu.org/licenses/>.
from venc2 import venc_version
from venc2.l10n import messages
import venc2.helpers.PatternInvalidArgument
def get_venc_version(argv):
return venc_version
try:
include_string = open("includes/"+argv[0], 'r').read()
return include_string
except PermissionError:
raise PatternInvalidArgument("path", argv[0], )
except FileNotFoundError:
raise PatternInvalidArgument("path", argv[0], )
non_contextual_pattern_names = {
non_contextual_pattern_name = {
"GetVenCVersion" : get_venc_version
"Include" : include
}
......@@ -30,7 +30,6 @@ from venc2.helpers import PatternInvalidArgument
from venc2.l10n import messages
# Special case of KeyError
class UnknownContextual(KeyError):
pass
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment