@@ -707,7 +707,12 @@ def start(**kwargs):
707
707
'codefiles' : [],
708
708
'inputfiles' : [],
709
709
'keywords' : [],
710
- 'license' : 'cc-by' , # default
710
+ 'license' : {
711
+ 'text' : 'cc-by' , # default
712
+ 'code' : None ,
713
+ 'data' : None ,
714
+ 'uibindings' : None
715
+ },
711
716
'access_right' : 'open' , # default
712
717
'paperLanguage' : [],
713
718
'paperSource' : None ,
@@ -725,7 +730,8 @@ def start(**kwargs):
725
730
'temporal' : {'begin' : None , 'end' : None },
726
731
'title' : None ,
727
732
'upload_type' : 'publication' , # default
728
- 'viewfile' : [],
733
+ 'viewfiles' : [],
734
+ 'viewfile' : None ,
729
735
'version' : None }
730
736
bagit_txt_file = None
731
737
global compare_extracted
@@ -786,7 +792,7 @@ def start(**kwargs):
786
792
'filepath' : get_rel_path (full_file_path ),
787
793
'rdata_preview' : get_rdata (full_file_path )})
788
794
elif file_extension == '.html' :
789
- MASTER_MD_DICT ['viewfile ' ].append (get_rel_path (full_file_path ))
795
+ MASTER_MD_DICT ['viewfiles ' ].append (get_rel_path (full_file_path ))
790
796
else :
791
797
parse_spatial (full_file_path , file_extension )
792
798
status_note ('' .join ((str (nr ), ' files processed' )))
@@ -831,18 +837,18 @@ def start(**kwargs):
831
837
if 'publicationDate' in MASTER_MD_DICT :
832
838
if MASTER_MD_DICT ['publicationDate' ] is None :
833
839
MASTER_MD_DICT ['publicationDate' ] = datetime .datetime .today ().strftime ('%Y-%m-%d' )
834
- # \ Add viewfile if mainfile rmd exists
835
- if 'viewfile ' in MASTER_MD_DICT :
840
+ # \ Add viewfiles if mainfile rmd exists
841
+ if 'viewfiles ' in MASTER_MD_DICT :
836
842
# find main file name without ext
837
- if not MASTER_MD_DICT ['viewfile ' ]:
843
+ if not MASTER_MD_DICT ['viewfiles ' ]:
838
844
if 'file' in MASTER_MD_DICT :
839
845
if 'filepath' in MASTER_MD_DICT ['file' ]:
840
846
if MASTER_MD_DICT ['file' ]['filepath' ] is not None :
841
847
if MASTER_MD_DICT ['file' ]['filepath' ].lower ().endswith ('.rmd' ):
842
848
if os .path .isfile (MASTER_MD_DICT ['file' ]['filepath' ]):
843
849
main_file_name , file_extension = os .path .splitext (MASTER_MD_DICT ['file' ]['filepath' ])
844
850
if os .path .isfile ('' .join ((main_file_name , '.html' ))):
845
- MASTER_MD_DICT ['viewfile ' ].append ('' .join ((main_file_name , '.html' )))
851
+ MASTER_MD_DICT ['viewfiles ' ].append ('' .join ((main_file_name , '.html' )))
846
852
# \ Fix and complete paperSource element, if existing:
847
853
if 'paperSource' in MASTER_MD_DICT :
848
854
MASTER_MD_DICT ['paperSource' ] = guess_paper_source ()
0 commit comments