Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Denis Salem
VenC
Commits
9b0b56aa
Commit
9b0b56aa
authored
Mar 18, 2019
by
Denis Salem
Browse files
Fix migration/configuration, missing fields
parent
c53d3dc6
Changes
6
Hide whitespace changes
Inline
Side-by-side
changelog.md
View file @
9b0b56aa
...
...
@@ -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-
blog
s within main
blog
.
TODO | Add support for sub-
site
s within main
site
.
TODO | Add support for single pages.
src/setup.py
View file @
9b0b56aa
#!/usr/bin/python3
# Copyright 2016, 201
7
Denis Salem
# Copyright 2016, 201
9
Denis Salem
# This file is part of VenC.
#
...
...
src/venc-blog-migration
View file @
9b0b56aa
...
...
@@ -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"
:
""
...
...
src/venc2/datastore/__init__.py
View file @
9b0b56aa
#! /usr/bin/python
#! /usr/bin/python
3
# Copyright 2016, 2019 Denis Salem
#
...
...
src/venc2/datastore/configuration.py
View file @
9b0b56aa
...
...
@@ -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
:]
==
'/'
:
...
...
test/benchmark/benchmark.py
View file @
9b0b56aa
...
...
@@ -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
(
"
\t
VenC"
,
benchmark_data
[
"VenC"
][
-
1
])
print
(
"
\t
Pelican"
,
benchmark_data
[
"Pelican"
][
-
1
])
print
(
"
\t
Jekyll"
,
benchmark_data
[
"Jekyll"
][
-
1
])
print
(
"
\t
Hugo"
,
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
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment