Commit f5b198a20c8c337ac3670f2f2b07008c1af63fc7
Committed by
OrysiaDrabych
1 parent
ff8bed5c
Add get_id_from_doc_name function
Showing
1 changed file
with
4 additions
and
0 deletions
@@ -478,6 +478,10 @@ def get_object_index_by_id(data, object_id): | @@ -478,6 +478,10 @@ def get_object_index_by_id(data, object_id): | ||
478 | return index | 478 | return index |
479 | 479 | ||
480 | 480 | ||
481 | +def get_id_from_doc_name(name): | ||
482 | + return re.match(r'd\-[0-9a-fA-F]{8}', name).group(0) | ||
483 | + | ||
484 | + | ||
481 | def get_object_by_id(data, given_object_id, slice_element, object_id): | 485 | def get_object_by_id(data, given_object_id, slice_element, object_id): |
482 | """ | 486 | """ |
483 | data: object to slice | 487 | data: object to slice |
Please
register
or
login
to post a comment