MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / older_than

Function older_than

utils/src/utils.py:78–89  ·  view source on GitHub ↗
(filepath, seconds: int = 10, wait: bool = False)

Source from the content-addressed store, hash-verified

76
77
78def older_than(filepath, seconds: int = 10, wait: bool = False):
79 if not os.path.exists(filepath):
80 while wait:
81 print("waiting for:", filepath)
82 sleep(1)
83 if os.path.exists(filepath):
84 sleep(seconds)
85 return True
86 return False
87 file_creation_time = os.path.getctime(filepath)
88 current_time = time()
89 return seconds < (current_time - file_creation_time)
90
91
92def edit_distance(text1: str, text2: str):

Callers 5

parse_pdfsFunction · 0.90
prepare_ppt_folderFunction · 0.90
do_inductFunction · 0.90
do_generateFunction · 0.90
pptx2imagesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected