File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
__pycache__ /
4
4
.vscode /
5
5
digital_manuscript.json
6
+ Pipfile.lock
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ def generate_entries(directory) -> List[entry.Entry]:
99
99
entries .append (entry .Entry (xml , folio = clean_folio (folio ), identity = clean_id (identity )))
100
100
101
101
print (f"Generated { len (entries )} entr{ 'y' if len (entries )== 1 else 'ies' } ." )
102
- return entries
102
+ return list ( sorted ( entries , key = lambda e : e . identity ))
103
103
104
104
def generate_folios (directory ) -> List [entry .Entry ]:
105
105
"""Given the path to a directory of XML files, generate a list of Entry objects by loading each file as its own entry.
@@ -109,7 +109,7 @@ def generate_folios(directory) -> List[entry.Entry]:
109
109
for filename in files :
110
110
print (f"Generating folio from file { ignore_data_path (os .path .join (root , filename ))} ..." )
111
111
folios .append (entry .Entry .from_file (os .path .join (root , filename ), folio = clean_folio (extract_folio (filename ))))
112
- return folios
112
+ return list ( sorted ( folios , key = lambda e : e . folio ))
113
113
114
114
class Manuscript ():
115
115
def __init__ (self , entries = {}, folios = {}):
You can’t perform that action at this time.
0 commit comments