<commit_before>h1. "OkCupid-Message-Downloader":https://github.com/lehrblogger/OkCupid-Message-Downloader

A script for downloading your sent and received "OkCupid":https://www.okcupid.com/ messages to a text file.



h2. Usage

Requires @python2.7@, "@virtualenv@":https://virtualenv.pypa.io/ and "@pip@":https://pip.pypa.io/. To use it, run it from the command line like this:

bc. okcmd -u your_username -p your_password -f 'output_message_file.txt'


h3. Thunderbird

You can add the @-t@ flag to get the output as a possibly-Thunderbird-compatible file rather than the default plaintext format, but I haven't really tested this. Put the file in a @Local@ folder, and hopefully Thunderbird can read/process it from there. Let me know if it works!


h3. Advanced usage

@--autologin@ can be used instead of @--password@. Supply it with a link that will automatically log you in to OkCupid; you can find these links in emails sent to you from Okcupid. One example is the logotype in top/new matches emails - right click and choose "copy link", then use it with the @--autologin@ argument. Usage requires that _auto login from emails_ is enabled; check your privacy settings on the OKCupid web site.

@--debug@ only downloads the first page of messages, but shows _a lot_ more output including HTML for the entire page and each message. You probably want to pipe the output to a separate file: @okcmd --debug --username ... &> debug.txt@

The @okcmd@ command uses @python2.7@ and wraps execution in a virtual environment installed using @virtualenv@ and @pip@. After version upgrades of the dependencies or tools there might be problems or bugs; try to delete the folder @.okcmd-virtualenv/@ to reinstall the virtual environment. If that doesn't work for you, try running @python okc_arrow_fetcher.py@ directly.



h2. History

The time has come to deactivate my OkCupid account, but I was slightly unhappy about leaving all my messages in a locked silo, as they contained a nontrivial amount of emotionally significant correspondence. I googled around a bit for scripts that other people had written to do download them, and found one "written for Greasemonkey":http://mkay.saverpigeeks.com/FetchOK.xhtml and another "written in Java":http://mkay.saverpigeeks.com/FetchOK.xhtml, but neither seemed to be recent enough to be able to handle the current OkC HTML. I _strongly_ prefer the "BeautifulSoup":http://www.crummy.com/software/BeautifulSoup/ Python library for dealing with HTML, so decided to write my own instead of modifying either of those.

*Find it here! Use it quickly* to download and archive your own messages! I probably won't update it as the site updates, but feel free to send a pull request :)



h2. Related projects

If you are interested in this project, chances are that the following project(s) might also be worth a look.<commit_msg>Update README with mention of pip installation #28<commit_after>h1. "OkCupid-Message-Downloader":https://github.com/lehrblogger/OkCupid-Message-Downloader

A script for downloading your sent and received "OkCupid":https://www.okcupid.com/ messages to a text file.


h2. Usage

The script requires @python2.7@. You can install it from "PyPI":https://pypi.python.org/pypi with either "@pip@":https://pip.pypa.io/ or "@easy_install@":https://pythonhosted.org/setuptools/easy_install.html, or you can clone the repository and it will create a "@virtualenv@":https://virtualenv.pypa.io and use "@pip@":https://pip.pypa.io/ to install its requirements. Either way, run the script from the command line like this:

bc. okcmd -u your_username -p your_password -f 'message_output_file.txt'


h3. Thunderbird

You can add the @-t@ flag to get the output as a possibly-Thunderbird-compatible file rather than the default plaintext format, but I haven't really tested this. Put the file in a @Local@ folder, and hopefully Thunderbird can read/process it from there. Let me know if it works!


h3. Advanced usage

@--autologin@ can be used instead of @--password@. Supply it with a link that will automatically log you in to OkCupid; you can find these links in emails sent to you from Okcupid. One example is the logotype in top/new matches emails - right click and choose "copy link", then use it with the @--autologin@ argument. Usage requires that _auto login from emails_ is enabled; check your privacy settings on the OKCupid web site.

@--debug@ only downloads the first page of messages, but shows _a lot_ more output including HTML for the entire page and each message. You probably want to pipe the output to a separate file: @okcmd --debug --username ... &> debug.txt@

The @okcmd@ command uses @python2.7@ and wraps execution in a virtual environment installed using @virtualenv@ and @pip@. After version upgrades of the dependencies or tools there might be problems or bugs; try to delete the folder @.okcmd-virtualenv/@ to reinstall the virtual environment. If that doesn't work for you, try running @python okc_arrow_fetcher.py@ directly.


h2. History

The time has come to deactivate my OkCupid account, but I was slightly unhappy about leaving all my messages in a locked silo, as they contained a nontrivial amount of emotionally significant correspondence. I googled around a bit for scripts that other people had written to do download them, and found one "written for Greasemonkey":http://mkay.saverpigeeks.com/FetchOK.xhtml and another "written in Java":http://mkay.saverpigeeks.com/FetchOK.xhtml, but neither seemed to be recent enough to be able to handle the current OkC HTML. I _strongly_ prefer the "BeautifulSoup":http://www.crummy.com/software/BeautifulSoup/ Python library for dealing with HTML, so decided to write my own instead of modifying either of those.

*Find it here! Use it quickly* to download and archive your own messages! I probably won't update it as the site updates, but feel free to send a pull request :)


h2. Related projects

If you are interested in this project, chances are that the following project(s) might also be worth a look.
{'fraction_non_alphanumeric': 0.07109711634073583, 'fraction_numerical': 0.003646005966191581, 'mean_word_length': 4.398032200357782, 'pattern_counts': {'":': 17, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 11, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2075060', 'n_tokens_mistral': 1671, 'n_tokens_neox': 1606, 'n_words': 855}