Commit 2a186ce7 authored by Denis Salem's avatar Denis Salem
Browse files

fix typo, fix get_feed_entries returning None

parent 8b62c076
......@@ -196,6 +196,7 @@
TODO | Optimize objects dereferencing.
TODO | Add draft support.
TODO | Add CPU threads support.
TODO | Regenerate any missing folders.
# version 3.x.x
TODO | Replace categories with taxonomy support.
......
......@@ -18,8 +18,8 @@
# along with VenC. If not, see <http://www.gnu.org/licenses/>.
class Messages:
blog_created = "Votre blog a été crée!"
theme_installed = "Le thème à bien été installé!"
blog_created = "Votre blog a été créé!"
theme_installed = "Le thème a bien été installé!"
entry_written = "La publication a bien été ajouté!"
file_not_found = "{0} : Ce fichier ou ce dossier n'existe pas."
file_already_exists = "{0} : {1}: Le fichier existe déjà."
......
......@@ -49,6 +49,8 @@ class MainThread(Thread):
i+=1
if i == self.datastore.blog_configuration["feed_lenght"]:
return entries
return entries
def do_feeds(self):
disable_rss_feed = self.datastore.blog_configuration["disable_rss_feed"]
......
......@@ -185,6 +185,17 @@ benchmark_data = {
"Hugo": []
}
def get_venc_version():
output = subprocess.Popen([PATH_TO_VENC,"-v"], stdout=subprocess.PIPE)
output.wait()
return output.stdout.read().decode("utf-8")
def get_hugo_version():
output = subprocess.Popen([PATH_TO_HUGO,"version"], stdout=subprocess.PIPE)
output.wait()
return "Hugo "+output.stdout.read().decode("utf-8").split(' ')[4].split('-')[0]
def benchmark_venc():
os.chdir("venc-benchmark")
start_timestamp = time.time()
......@@ -216,11 +227,14 @@ def benchmark_pelican():
def benchmark_jekyll():
os.chdir("jekyll-benchmark")
start_timestamp = time.time()
output = subprocess.Popen([PATH_TO_JEKYLL, "build"], stdout=subprocess.PIPE)
output = subprocess.Popen(["bundle", "exec", PATH_TO_JEKYLL, "build"], stdout=subprocess.PIPE)
output.wait()
time_command = time.time() - start_timestamp
done_in_n_seconds_line = [line for line in output.stdout.read().decode("utf-8").split('\n') if line != ''][-2]
try:
done_in_n_seconds_line = [line for line in output.stdout.read().decode("utf-8").split('\n') if line != ''][-2]
except Exception as e:
print(output.stdout.read())
raise e
time_internal = float([ v for v in done_in_n_seconds_line.split(' ') if v != ''][2])
os.chdir("..")
return time_command, time_internal
......
Markdown is supported
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