vHanda/google-keep-exporter

Converted 0 notes

andre68723 opened this issue · 8 comments

Hi,

created a ZIP today and tried to run it, it converted 0 notes

node ~/git/google-keep-exporter-master/dist/main.js takeout-20190517T130852Z-001.zip output/
Unzipping ...
Converted 0 notes
Output Dir: output/

Unzipped it manually, the Archive has a number of german Umlaute

e.g. Österreich 2019.html or Archiv_Übersicht.html inside . Could that be the root cause?

Thanks, Andre

Hey. The google takeout format seemed to have changed. I've fixed the issue, if it still doesn't work please re-open the issue!

Hey Vishesh,

thanks for looking into, it's still the same unfortunately.

Structure inside the zip, first entries only

takeout-20190517T130852Z-001.zip

├── Takeout
│   ├── Archiv_?\234bersicht.html
│   └── Google\ Notizen
│       ├── 1Firstnote.html
│       ├── 2018-03-17T09_57_41.059+01_00.jpg

@vHanda please reopen the issue

Hello. Apologies from the delay. It's quite clear what the issue is - I explicitly check for the presence of a a folder called 'Google Keep'. It seems to not be called that in German. I'm not 100% sure on how to fix this issue. I see some possible solutions -

  1. Hardcode the name for various different languages.
  2. Just look for .html files and convert all of them.
  3. Look for .html files which are in a similar format which Google Keep generates.

(3) seems like the best solution, but it's more time consuming. Either way, I'll try to fix this issue this week. Cheers!

Thanks Vishesh. I gave it a try by changing default language to English and created a new takeout. Export changed, but conversion still no change, despite the name is now

 tree -r
.
├── archive_browser.html
└── Keep
    ├── ?\226sterreich.html

Regarding option 3, well, all my exports were actual notes besides that one overview file in root

Thanks

Thanks Vishesh. I gave it a try by changing default language to English and created a new takeout. Export changed, but conversion still no change, despite the name is now

 tree -r
.
├── archive_browser.html
└── Keep
    ├── ?\226sterreich.html

Regarding option 3, well, all my exports were actual notes besides that one overview file in root

Thanks

It is working for me by recompiling the source code. (note that the available linux executable v1.1.0 was not working). In the source code, it is looking for the Keep folder. in src/main.ts

  var files = fs.readdirSync(inputDir);
  if (files.indexOf("Keep") != -1) {
    inputDir += "/Keep";
    files = fs.readdirSync(inputDir);
}

If you use Google in German, you can unzip the takeout, rename to "Keep" and zip again...

thanks @lmontigny , renameing + rezipping and build from source it works

Could you reopen the issue and and some documentation about this issue on the main page?
Some instruction how this could work in different languages, for example

this program works only for english file structure, which should be:
`Takeout\Keep'

if this is not the case then please:

  • unzip
  • rename your folder structure to `Takeout\Keep'
  • create a new zip
  • try again

You could also implement an command line argument to be able to assign a different filename

or you could allow also a folder and not only a zip file to use the just unzipped folder

my tree in the zip archive is

takeout-20200529T160432Z-001_keep\Takeout\Google Notizen

but even when renaming the folder I get an error:

D:\Backup\google>google-keep-exporter-win.exe takeout-keep-renamed.zip keep_markdown
Unzipping ...
(node:1149600) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir 'C:\Users\ggoer\AppData\Local\Temp\tmp-1149600UUQKO2A7RIR4/Takeout'
    at Object.fs.readdirSync (fs.js:895:3)
    at Object.fs.readdirSync (pkg/prelude/bootstrap.js:780:35)
    at C:\snapshot\google-keep-exporter\dist\main.js:0:0
    at Generator.next (<anonymous>)
    at fulfilled (C:\snapshot\google-keep-exporter\dist\main.js:0:0)
(node:1149600) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1149600) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

D:\Backup\google>

an nothing was exported