import gkeepapi # type: ignore
-import constants
+import kiosk_constants
import file_writer
import renderer
import kiosk_secrets as secrets
}
self.keep = gkeepapi.Keep()
success = self.keep.login(
- secrets.google_keep_username, secrets.google_keep_password
+ secrets.google_keep_username,
+ secrets.google_keep_password,
+ secrets.google_keep_mac,
)
if success:
logger.debug("Connected with gkeep.")
def periodic_render(self, key: str) -> bool:
strikethrough = re.compile("(\u2611[^\n]*)\n", re.UNICODE)
- linkify = re.compile(r".*(https?:\/\/\S+).*")
+ #linkify = re.compile(r".*(https?:\/\/\S+).*")
self.keep.sync()
result_list = self.keep.find(labels=[self.keep.findLabel("kiosk")])
num_lines = len(individual_lines)
contents = ""
for x in individual_lines:
- length = len(x)
leading_spaces = len(x) - len(x.lstrip(" "))
leading_spaces //= 2
leading_spaces = int(leading_spaces)
<HR style="border-top:3px solid white;">
"""
)
- if num_lines >= 12:
+ if num_lines >= 10:
logger.debug(
f"{num_lines} lines: two column mode"
)
f.write("</DIV>")
else:
logger.debug(f"Note is empty, deleting {filename}.")
- _ = os.path.join(constants.pages_dir, filename)
+ _ = os.path.join(kiosk_constants.pages_dir, filename)
try:
os.remove(_)
except: