<commit_before>DailyMile.com History Puller
============================

Uses the Go compiler (http://golang.org/)

The command line help isn't working yet so here's a quick run-down...

    dm user <username>
    dm sync

The initial sync will probably take minutes depending on number of entries.  Future syncs will be incremental and should only take a few seconds.  It'll tell you if it was "Already up-to-date" or how many new entries it pulled down.  One thing it does NOT handle are deletes.  If you sync and then delete an entry on the website it will remain in your local copy of the data unless you delete and do a full sync. 

If you're on some flavor of unix, your data should be stored in ~/.dailymile_cli/<username>/entries.json.  You can use your favorite browser plugin or editor to view the JSON pretty-printed.  Or, if you have python 2.6+ installed...

    cat ~/.dailymile_cli/<username>/entries.json | python -mjson.tool | less

I also started adding basic search capability.  Still tinkering with this... not sure where or how far it's headed.  Not even sure it works correctly!  Here are the basics...

    dm find [-s start date] [-e end date] [-p regex pattern]

All of this year's entries in JSON:
    dm find -s 14/1/1

All of this year's entries in an abridged CSV format (needs work):
    dm find -s 14/1/1 -csv

All of this year's entries in a column layout (Linux):
    dm find -s 14/1/1 -csv | column -t -s,

All of last year's interval workouts in JSON:
    dm find -s 13/1/1 -e 13/12/31 -p "(?i)interval"

Search for patterns like "8 x 400", "10x800", "10 x 1600m":
    dm find -s 13/1/1 -e 13/12/31 -p "(?i)\d{1,2} *x *\d{3,4}"

Count ALL of your entries on Linux:
    dm find -csv | wc -l<commit_msg>Please, github, let the README markdown look right this time.<commit_after>DailyMile.com History Puller
============================

Uses the Go compiler (http://golang.org/)

The command line help isn't working yet so here's a quick run-down...

    dm user <username>
    dm sync

The initial sync will probably take minutes depending on number of entries.  Future syncs will be incremental and should only take a few seconds.  It'll tell you if it was "Already up-to-date" or how many new entries it pulled down.  One thing it does NOT handle are deletes.  If you sync and then delete an entry on the website it will remain in your local copy of the data unless you delete and do a full sync. 

If you're on some flavor of unix, your data should be stored in ~/.dailymile_cli/<username>/entries.json.  You can use your favorite browser plugin or editor to view the JSON pretty-printed.  Or, if you have python 2.6+ installed...

    cat ~/.dailymile_cli/<username>/entries.json | python -mjson.tool | less

I also started adding basic search capability.  Still tinkering with this... not sure where or how far it's headed.  Not even sure it works correctly!  Here are the basics...

    dm find [-s start date] [-e end date] [-p regex pattern]

All of this year's entries in JSON:

    dm find -s 14/1/1

All of this year's entries in an abridged CSV format (needs work):

    dm find -s 14/1/1 -csv

All of this year's entries in a column layout (Linux):

    dm find -s 14/1/1 -csv | column -t -s,

All of last year's interval workouts in JSON:

    dm find -s 13/1/1 -e 13/12/31 -p "(?i)interval"

Search for patterns like "8 x 400", "10x800", "10 x 1600m":

    dm find -s 13/1/1 -e 13/12/31 -p "(?i)\d{1,2} *x *\d{3,4}"

Count ALL of your entries on Linux:

    dm find -csv | wc -l
{'fraction_non_alphanumeric': 0.10345804988662131, 'fraction_numerical': 0.030045351473922902, 'mean_word_length': 3.0987224157955864, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6355642', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1061, 'n_words': 562}