@@ -415,7 +415,7 @@ def populate_context(self, channel):
415
415
context ['PAGES' ] = PAGES
416
416
COMPILERS = '{\n '
417
417
COMPILERS += ''' "rest": ('.txt', '.rst'),''' + '\n '
418
- COMPILERS += ''' "markdown": ('.md', '.mdown', '.markdown')''' + '\n '
418
+ COMPILERS += ''' "markdown": ('.md', '.mdown', '.markdown'), ''' + '\n '
419
419
COMPILERS += ''' "html": ('.html', '.htm'),''' + '\n '
420
420
if self .use_wordpress_compiler :
421
421
COMPILERS += ''' "wordpress": ('.wp'),''' + '\n '
@@ -842,6 +842,10 @@ def process_item_if_attachment(self, item):
842
842
else :
843
843
LOGGER .warn ("Attachment #{0} ({1}) has no parent!" .format (post_id , files ))
844
844
845
+ def write_attachments_info (self , path , attachments ):
846
+ with io .open (path , "wb" ) as file :
847
+ file .write (json .dumps (attachments ).encode ('utf-8' ))
848
+
845
849
def process_item_if_post_or_page (self , item ):
846
850
wordpress_namespace , post_type , post_id , parent_id = self ._extract_item_info (item )
847
851
@@ -861,10 +865,6 @@ def process_item_if_post_or_page(self, item):
861
865
out_folder_slug [1 ] + ".attachments.json" )
862
866
self .write_attachments_info (destination , attachments )
863
867
864
- def write_attachments_info (self , path , attachments ):
865
- with io .open (path , "wb" ) as file :
866
- file .write (json .dumps (attachments ).encode ('utf-8' ))
867
-
868
868
def import_posts (self , channel ):
869
869
self .attachments = defaultdict (dict )
870
870
# First process attachments
0 commit comments