Commit 9b0b56aa authored by Denis Salem's avatar Denis Salem
Browse files

Fix migration/configuration, missing fields

parent c53d3dc6
......@@ -195,9 +195,11 @@
TODO | Improve sub folder management in Entry and EntriesThread.
TODO | Optimize objects dereferencing.
TODO | Add draft support.
TODO | Add CPU threads support.
# version 3.x.x
TODO | Replace categories with taxonomy support.
TODO | Add support for plugin.
TODO | Add Incremental blog update.
TODO | Add support for sub-blogs within main blog.
TODO | Add support for sub-sites within main site.
TODO | Add support for single pages.
#!/usr/bin/python3
# Copyright 2016, 2017 Denis Salem
# Copyright 2016, 2019 Denis Salem
# This file is part of VenC.
#
......
......@@ -121,10 +121,12 @@ new_keys = {
"server_port": 8888,
"disable_rss_feed":False,
"disable_atom_feed":False,
"feed_lenght": 5
"feed_lenght": 5,
"sort_by":'id'
}
new_path_keys = {
"atom_file_name": "atom_feed.xml",
"entries_sub_folders":"",
"categories_sub_folders":"",
"dates_sub_folders":""
......
#! /usr/bin/python
#! /usr/bin/python3
# Copyright 2016, 2019 Denis Salem
#
......
......@@ -91,7 +91,7 @@ def get_blog_configuration():
everything_is_okay = False
notify(messages.unknown_markup_language.format(blog_configuration["markup_language"], "blog_configuration.yaml"),"RED")
if blog_configuration["sort_by"] in ['', None]:
if (not "sort_by" in blog_configuration.keys() ) or blog_configuration["sort_by"] in ['', None]:
blog_configuration["sort_by"] = "id"
if blog_configuration["blog_url"][-1:] == '/':
......
......@@ -240,24 +240,24 @@ def benchmark_hugo():
for folder in folders_to_clear:
reset_folder(folder)
#~ for i in range(1,101):
#~ gen_entries("Markdown", 5, (i*10)+1, False)
#~ print("Number or entries:",i*10)
#~ benchmark_data["entries"].append(i*10)
for i in range(1,101):
gen_entries("Markdown", 5, (i*10)+1, False)
print("Number or entries:",i*10)
benchmark_data["entries"].append(i*10)
#~ benchmark_data["VenC"].append(benchmark_venc())
#~ benchmark_data["Pelican"].append(benchmark_pelican())
#~ benchmark_data["Jekyll"].append(benchmark_jekyll())
#~ benchmark_data["Hugo"].append(benchmark_hugo())
benchmark_data["VenC"].append(benchmark_venc())
benchmark_data["Pelican"].append(benchmark_pelican())
benchmark_data["Jekyll"].append(benchmark_jekyll())
benchmark_data["Hugo"].append(benchmark_hugo())
#~ print("\tVenC", benchmark_data["VenC"][-1])
#~ print("\tPelican", benchmark_data["Pelican"][-1])
#~ print("\tJekyll", benchmark_data["Jekyll"][-1])
#~ print("\tHugo", benchmark_data["Hugo"][-1])
print("\tVenC", benchmark_data["VenC"][-1])
print("\tPelican", benchmark_data["Pelican"][-1])
print("\tJekyll", benchmark_data["Jekyll"][-1])
print("\tHugo", benchmark_data["Hugo"][-1])
#~ print()
print()
#~ output = json.dumps(benchmark_data)
#~ f = open(str(time.time())+".json","w")
#~ f.write(output)
#~ f.close()
output = json.dumps(benchmark_data)
f = open(str(time.time())+".json","w")
f.write(output)
f.close()
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