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

done with preview / full content

parent 2c2aeb6a
......@@ -117,7 +117,7 @@
DONE | Add reStructuredText support, remove do_not_use_markdown option.
DONE | Improve reStructuredText integration with VenC.
DONE | Quit gracefully when ftp timeout error.
WIP | add entry preview / full content.
DONE | add entry preview / full content.
TODO | Support for video.
TODO | Add relevant templates for themes.
TODO | Add categories tree in entry.
......
......@@ -42,7 +42,6 @@ from venc2.patterns.processor import PreProcessor
from venc2.threads.categories import CategoriesThread
from venc2.threads.dates import DatesThread
from venc2.threads.main import MainThread
from venc2.threads.entries import EntriesThread
# Initialisation of environment
datastore = DataStore()
......@@ -120,7 +119,6 @@ def export_blog(argv=list()):
theme = Theme(theme_folder)
# Set up of non-contextual patterns
processor = Processor()
......@@ -147,8 +145,9 @@ def export_blog(argv=list()):
except AttributeError:
markup_language = datastore.blog_configuration["markup_language"]
entry.preview = PreProcessor(processor.batch_process(entry.preview, entry.filename).process_markup_language(markup_language, entry.filename))
entry.content = PreProcessor(processor.batch_process(entry.content, entry.filename).process_markup_language(markup_language, entry.filename))
print("THERE 2", entry.preview.sub_strings)
entry.html_wrapper = deepcopy(theme.entry)
entry.html_wrapper.above = PreProcessor(''.join(processor.batch_process(entry.html_wrapper.above, "entry.html", False).sub_strings))
entry.html_wrapper.below = PreProcessor(''.join(processor.batch_process(entry.html_wrapper.below, "entry.html", False).sub_strings))
......@@ -174,8 +173,6 @@ def export_blog(argv=list()):
thread.do()
thread = CategoriesThread(messages.export_categories, datastore, theme, contextual_pattern_names)
thread.do()
thread = EntriesThread("EXPORTATION des publications individuel, message à remplacer.", datastore, theme, contextual_pattern_names)
thread.do()
# Copy assets and extra files
......
......@@ -100,7 +100,7 @@ class DataStore:
node.count +=1
node.related_to.append(entry_index)
root = node.childs
entry_index += 1
''' Setup BlogDates Data '''
......@@ -140,10 +140,8 @@ class DataStore:
for metadata in self.entries_per_dates:
if value == metadata.value:
return index
index += 1
def get_entries_for_given_date(self, value, reverse):
index = 0
for metadata in self.entries_per_dates:
......@@ -176,6 +174,7 @@ class DataStore:
def get_entry_year(self, argv=list()):
return self.entries[self.requested_entry_index].date.year
def get_entry_month(self, argv=list()):
return self.entries[self.requested_entry_index].date.month
......
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