Commit 75ae2767 authored by Denis Salem's avatar Denis Salem
Browse files

wip on linked list

parent a0fc8c19
......@@ -120,6 +120,7 @@
DONE | add entry preview / full content.
DONE | Support for video.
DONE | Support for audio.
WIP | Optimise entries set with linked list.
TODO | Fix: Import asset from external theme if necessary.
TODO | Allow disabling exportation of specific kind of thread.
TODO | Add more specific pattern to detect location (IfInCategories,IfInArchives,IfInFirstPage).
......@@ -131,8 +132,8 @@
TODO | Serv page.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
TODO | Split install and blog creation chapter in tutorial.
TODO | fix FAQ https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting
TODO | fix FAQ latex2mathml is incomplete
TODO | fix FAQ https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting.
TODO | fix FAQ latex2mathml is incomplete.
TODO | Change nomenclature: Most of the usual patterns are changed. Fix doc.
TODO | Add translation for Deutsch and Spanish.
TODO | Client-side search engine.
......
......@@ -64,8 +64,12 @@ class DataStore:
''' Entry index is different from entry id '''
entry_index = 0
for filename in yield_entries_content():
self.entries.append(Entry(filename))
if len(self.entries):
self.entries.append(Entry(filename, previous_entry=self.entries[-1]))
self.entries[-2].next_entry = self.entries[-1]
else:
self.entries.append(Entry(filename))
''' Update entriesPerDates '''
if self.blog_configuration["path"]["dates_directory_name"] != '':
formatted_date = self.entries[-1].date.strftime(self.blog_configuration["path"]["dates_directory_name"])
......
......@@ -53,7 +53,10 @@ class EntryWrapper:
die(messages.missing_entry_content_inclusion)
class Entry:
def __init__(self, filename):
def __init__(self, filename, previous_entry = None):
self.previous_entry = previous_entry
self.next_entry = None
# Loading
raw_data = open(os.getcwd()+"/entries/"+filename,'r').read()
......
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