+ self.token_file = "./google_keep_token.json"
+ if os.path.exists(self.token_file):
+ logger.debug("Attempting to reuse persisted Google Keep login token...")
+ try:
+ with open(self.token_file, "r") as rf:
+ token = "".join(rf.readlines()).strip()
+ self.keep.resume(secrets.google_keep_username, token)
+ logger.debug("Successfully reused existing login token.")
+ except gkeepapi.exception.LoginException:
+ logger.warning("Invalid token, attempting to re-login.")
+
+ if not self.keep.login(