MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / write_cursor

Function write_cursor

archivebox/parsers/readwise_reader_api.py:71–82  ·  view source on GitHub ↗
(username: str, since: str)

Source from the content-addressed store, hash-verified

69
70
71def write_cursor(username: str, since: str):
72 if not API_DB_PATH.exists():
73 atomic_write(API_DB_PATH, "")
74
75 since_file = ConfigParser()
76 since_file.optionxform = str
77 since_file.read(API_DB_PATH)
78
79 since_file[username] = {"since": since}
80
81 with open(API_DB_PATH, "w+") as new:
82 since_file.write(new)
83
84
85def read_cursor(username: str) -> Optional[str]:

Callers 1

Calls 1

atomic_writeFunction · 0.85

Tested by

no test coverage detected