Commit bf134731 authored by vermeul's avatar vermeul
Browse files


parent e3a94fce
......@@ -91,7 +91,7 @@ import os
import re
def my_sort(val, coll):
def my_sort(coll):
def my_coll_sort(val):
match ='\d+_Ms_{}_(?P<page>\d+)'.format(coll), val)
if match:
......@@ -100,7 +100,7 @@ def my_sort(val, coll):
return 0
return my_coll_sort
def my_filter(val, coll):
def my_filter(coll):
def my_coll_filter(val):
match ='^\d+_Ms_{}.*?xml$'.format(coll), val)
return match
......@@ -112,8 +112,8 @@ collection = '229'
path = os.path.join('/Users/vermeul/semper-tei', collection)
for root, dirs, files in os.walk(path):
for filename in sorted(
filter( my_filter(val=filename, coll=collection), files),
key=my_sort(val=filename, coll=collection)
filter( my_filter(coll=collection), files),
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