|#Import a directory of text files as google keep notes.|
|#Text Filename is used for the title of the note.|
|import gkeepapi, os|
|username = 'firstname.lastname@example.org'|
|password = 'your app password'|
|keep = gkeepapi.Keep()|
|success = keep.login(username,password)|
|dir_path = os.path.dirname(os.path.realpath(__file__))|
|for fn in os.listdir(dir_path):|
|if os.path.isfile(fn) and fn.endswith('.txt'):|
|with open(fn, 'r') as mf:|
Thanks for the script! On my Jupyter notebook on Windows I encountered the following problems:
Then, it did its job perfectly!
For me, it raises a login exception, if someone could help I'd be really thankful.
Thanks for the code, it helpt me import over 400 txt files.