Commit 8b6d540d authored by Denis Salem's avatar Denis Salem
Browse files

wip on rdf

parent ba42ce4d
......@@ -176,4 +176,6 @@
TODO | Print out what's going on while FTP transfert.
TODO | Fix gvim / -ex.
TODO | Warn about entry title duplicates.
TODO | Handle missing args in case of unknown number of args
TODO | Handle missing args in case of unknown number of args (Pattern).
TODO | Add configuration field type check.
TODO | Optimize modules importation.
......@@ -148,7 +148,6 @@ def export_blog(argv=list()):
# Set up of non-contextual patterns
processor = Processor()
for pattern_name in non_contextual_pattern_names_datastore.keys():
processor.set_function(pattern_name, getattr(datastore, non_contextual_pattern_names_datastore[pattern_name]))
......
......@@ -137,7 +137,8 @@ def new_blog(argv):
"markup_language": "Markdown",
"path_encoding": "utf-8",
"server_port": 8888,
"sort_by":"id"}
"sort_by":"id",
"enable_rdf":True}
for folder_name in argv:
try:
os.mkdir(folder_name)
......
......@@ -41,6 +41,8 @@ class DataStore:
def __init__(self):
notify(messages.loading_data)
self.blog_configuration = get_blog_configuration()
self.sort_by = self.blog_configuration["sort_by"]
self.enable_rdf = self.blog_configuration["enable_rdf"]
self.disable_threads = [thread_name.strip() for thread_name in self.blog_configuration["disable_threads"].split(',')]
self.entries = list()
self.entries_per_dates = list()
......@@ -146,6 +148,9 @@ class DataStore:
"weight": node.weight
})
def dseeker_get_metadata_from_entry_callback(self, metadata):
if self.
def get_chapters(self, argv):
key = ''.join(argv)
if not key in self.html_chapters.keys():
......@@ -197,7 +202,7 @@ class DataStore:
def sort_by(self, entry):
try:
return getattr(entry, self.blog_configuration["sort_by"])
return getattr(entry, self.sort_by)
except AttributeError:
return ''
......
......@@ -56,7 +56,8 @@ def get_blog_configuration():
"server_port",
"disable_rss_feed",
"disable_atom_feed",
"sort_by"
"sort_by",
"enable_dseeker"
]
everything_is_okay = True
......
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