Code Monkey home page Code Monkey logo

google-keep-csv's People

Contributors

jcontini avatar kbaikov avatar plnech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

google-keep-csv's Issues

Does not take into account all time formats

Keep/2018-12-06T21_15_37.264+01_00.html
Traceback (most recent call last):
File "/home/mick/projects/google-keep-scraper/keep.py", line 22, in
xlDate = datetime.strftime(parse(googDate), '%m/%d/%Y %H:%M')
File "/home/mick/.local/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 1358, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/home/mick/.local/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 649, in parse
raise ValueError("Unknown string format:", timestr)
ValueError: (u'Unknown string format:', u'6 dic. 2018 21:15:37')

Checkboxes are off by one line

From what @jcontini reported on jcontini/facebook-friends-map#2:

One thing I noticed - for notes with checkboxes, the output now puts the checkbox after the text instead of before.

After looking a bit further, it is due to the HTML structure of Google Takeout's notes:

<body>
    <div class="note">
        <div class="heading">7 avr. 2016 &agrave; 21:12:13</div>
        <div class="title">ToMake</div>
        <div class="content">
            <div class="listitem">
                <div class="bullet">&#9744;</div>
                <div class="text">URL Shortner</div>
            </div> 
            <div class="listitem">
                <div class="bullet">&#9744;</div>
                <div class="text">Torrent downloader</div>
            </div>
        </div>
    </div>
</body>

As you can see the bullet divs are placed before the text divs, which explains why getText() returns the checkboxes before the associated text. The checkboxes are not after their text, but actually at the end of the line before their text (this is why the first line has only a checkbox and the last line has none).

However, I see no change in jcontini/facebook-friends-map#2 that could have caused this change. I can't try the former version as my Takeout data is localised in French, but can you checkout 73a1f9e and run the script to see if the issue was there before my PR? I can't spend more time investigating this for now, but maybe this issue is anterior to those changes?

message to author, script request

by the way,
in "google keep archive" each note corresponds to one html file.

Could you please write a script that would save all these single html files (notes) into one big html file?
(while keeping the original CSS styles formatting)

It should be simple, just read that <div> where the note is, and append it to one file...
But I'm not a programmer, though.
Thanks.

Error in script

Hey @jcontini ,

Thanks for the great work on this. I was trying to implement the same, but at the last step, after running the "python keep.py" it shows this message.

Keep#Studioबिम्ब.html
Traceback (most recent call last):
File "C:\Users\user\Downloads\Keep Html\google-keep-csv-master\keep.py", line 42, in
writer.writerow([file, note["date"], note["title"], note["content"]])
File "c:\users\user\appdata\local\programs\python\python39\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 12-16: character maps to

Although a CSV file is generated, it is entirely empty. Could you suggest a workaround? Thanks! :)

UnicodeDecodeError

Hello,
I've got this error, not sure what it means:

Traceback (most recent call last):
  File "keep.py", line 21, in <module>
    soup = bs4.BeautifulSoup(page.read(), "html.parser")
  File "C:\Python\lib\encodings\cp1250.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x88 in position 11215: character maps to <undefined>

List index out of range

Hello,
MacOS 10.15.5
Python 3.8.1

I keep getting the following error. I tweaked things a bit but haven't been able to have the script working:

Keep/archive_browser.html Traceback (most recent call last): File "keep.py", line 24, in <module> googDate = soup.select(".heading")[0].getText().strip() IndexError: list index out of range

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.