<commit_before># superclip.py 
## for Evernote

Use **Evernote Web Clipper**? Wish you could split a **single** web page into **multiple** notes at once? Now you can!

# Example

## Command line

	python superclip.py webpage.html "/html/body/div[@id='wholePage']/"

    python superclip.py webpage.html \
    /html/body/div[@id='wholePage']/div[@id='overallContent']/div/div/div/div[2]/span/@class \
    -p /html/body/div[@id='wholePage']/div[@id='overallContent']/div/div/div/div[2]/a \
    -s

Output: A new Evernote note is created for each matching *span* in the file.

# Parameters 

## Required 

An HTML file and one xpath is required. 

    python superclip.py webpage.html xpath1

## Options

### -p 

Additional xpaths can be given. 

    python superclip.py webpage.html xpath1 -p xpath2 -p xpath3

### -s 
Strip out HTML tags and formatting before creating the note. 

    python superclip.py webpage.html xpath1 -s

    python superclip.py webpage.html xpath1 -p xpath2 -s

# License 

Copyright <NAME>

# Contributors

<NAME>

# More 
[More information](http://wraithmonster.com "Click for m****ore information")<commit_msg>Completely revised the README to reflect the simpler project goal.<commit_after># kindleclip
## for Evernote

---

# Problem
- You love reading your **Kindle**, and you make lots of highlights to review later. 
- You also use **Evernote** to remember... well, just about everything. 
- You can save [your Kindle highlights](https://kindle.amazon.com/your_highlights "https://kindle.amazon.com/your_highlights") as one long note with **Evernote Web Clipper**, but Evernote [can't split a note into multiple notes](http://discussion.evernote.com/topic/21855-splitting-a-note-into-multiple-notes/, "Evernote Discussion Forum"), and you really want to save each highlight *separately*. 
- You can save [your Kindle highlights](https://kindle.amazon.com/your_highlights "https://kindle.amazon.com/your_highlights") into separate notes with **Evernote Web Clipper**, but that's too tedious. 

# Solution

**kindleclip** uses your Gmail account to create separate Evernote notes for all of your Kindle highlights. 

---

# Example

## Command Line

	python kindleclip.py highlights.html <EMAIL> gmailpassword <EMAIL>

Output: a new Evernote note for each highlight in *highlights.html*

---

# Instructions

It's recommended that you save a copy of the highlights page you want to process; your Kindle account pages won't load all of your highlights immediately. Instead, you must manually scroll to trigger the loading of more highlights (or use a plugin to scroll while you get yourself a drink). 

## Get the Highlights File

### All Your Highlights

1. Visit [https://kindle.amazon.com](https://kindle.amazon.com). 
2. Click "Your Highlights". 
2. Scroll ALL the way down the page by holding *PgDn* until the page stops loading more highlights, or by using a plugin like [Chrome Auto Scroll](https://chrome.google.com/webstore/detail/auto-scroll/eochlhpceohhhfogfeladaifggikcjhk). 
4. Save the page. 

### Highlights from a Single Book

Highlights for individual books are displayed differently, so the approach is slightly different. 

1. Using [Google Chrome](http://google.com/chrome), visit [https://kindle.amazon.com](https://kindle.amazon.com). 
2. Click "Your Books". 
3. Click on a book title. 
4. Click "View Your Notes & Highlights". 
5. Within the pop-up, scroll down until you see a link to "Load More Notes & Highlights". Click it, then scroll again, repeating until you see "**No** More Notes & Highlights".
6. Right-click and select "Inspect Element". 
7. Right-click on the `html` node in the *Inspector* (starting with `<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/"...`) and select "Copy as HTML". 
8. Open a text editor.
9. Paste the copied text. 
10. Save the file. 

## Send Each Highlight to Evernote

Open a terminal and run kindleclip... 

    python kindleclip.py highlights.html <EMAIL> gmailpassword <EMAIL>

...where...

1. `highlights.html` is the file saved in the previous steps. 
2. `<EMAIL>` is your Gmail account
3. `<PASSWORD>` is your account password 
4. `<EMAIL>` is the email address assigned to you by Evernote

---

# License 

Copyright <NAME>

# Contributors

<NAME>

# More 
[Wishlist, rationale, etc.](http://wraithmonster.com "More information")

- Take a URL also
- Flexible; not just Kindle highlights
- Spit it out as JSON, etc. not just Evernote

## References
http://stackoverflow.com/q/174968/154065
{'fraction_non_alphanumeric': 0.11346578366445915, 'fraction_numerical': 0.011037527593818985, 'mean_word_length': 3.9196525515743756, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 14, 'https://': 9, 'lorem ipsum': 0, 'www.': 1, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1946139', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1351, 'n_words': 529}