<commit_before><!-- badges/ -->
[![Build Status](https://secure.travis-ci.org/kvz/baseamp.png?branch=master)](http://travis-ci.org/kvz/baseamp "Check this project's build status on TravisCI")
[![NPM version](http://badge.fury.io/js/baseamp.png)](https://npmjs.org/package/baseamp "View this project on NPM")
[![Dependency Status](https://david-dm.org/kvz/baseamp.png?theme=shields.io)](https://david-dm.org/kvz/baseamp)
[![Development Dependency Status](https://david-dm.org/kvz/baseamp/dev-status.png?theme=shields.io)](https://david-dm.org/kvz/baseamp#info=devDependencies)
<!-- /badges -->

# baseamp

Convert your Markdown todo lists to Basecamp Todolists and back

## Install

Being a commandline tool primarily, Baseamp prefers to be installed globally:

```bash
npm install -g baseamp
```

## Use

First set these environment keys:

```
export BASECAMP_USERNAME="<your private username>"
export BASECAMP_PASSWORD="<<PASSWORD>>"
export BASECAMP_ACCOUNT_ID="<your private account id (1st number in urls)>"
export BASECAMP_PROJECT_ID="<your private project id (2nd number in urls)>"
```

**WARNING: Use a test Project first, Baseamp will overwrite todos in existing projects!**

To download (from Basecamp API -> local markdown):

```bash
$ baseamp download -
## Bugs (this list should always be emptied first) (#21402412)

 - [ ] TIK Big file upload lists can exceed the assemblies.files database field length: http://support.transloadit.com/discussions/problems/13485-problem-with-assemblies-page-files-display (#133063190)
 - [ ] TIK result: false is ignored if step is piped into a storage step (#133071595)

## Documentation (#21403029)

 - [ ] Add ffmpeg new stack lists, link them, show lists which formats they support and which not directly in the docs, when one should use which and then also show the preset contents for each stack version (#133067237)

...etc...
```

To upload (from local markdown -> Basecamp API):

To download (from Basecamp API -> local markdown):

```bash
$ baseamp sync ./Our-Todos.md
```

## Sync Behavior & Limitations

When uploading, Baseamp:

 - creates lists & todos that do not exists
 - updates lists & todos that we already track the `(#id)` of in markdown text
 - never deletes something that exist on Basecamp, but not in local markdown, as someone else may have added this item online.

When downloading, Baseamp:

 - Extracts full Todolists of a project, and saves them to a markdown file (or STDOUT), overwriting anything that was already there.

When syncing, Baseamp:

 - Does a *download* after an *upload*, in order to save the IDs locally of newly created todos. Recommended mode of operation. Only works against a local `.md` file, not with STDIN/OUT

Baseamp cannot sync a todo's attachments or contents, but also won't override them, so you can safely use the webinterface to enrich todos.

There is no concept of sub-todos.

Keep in mind that if you remove 1 item from a list, it can result in `position` updates for siblings in that list.

During a sync, when there are conflicting values, the local Markdown file is leading. However, Baseamp does not uncomplete remotely completed items as the usecase for that is limited, and this allows people to check off items online.

If you want to avoid having other values overwritten, keep your Markdown file in Git, and do a download before editting & syncing.

## Todo

 - [ ] Support for rate limiter (500 req/10 minutes)
 - [ ] Remove unnecessary fat arrows
 - [ ] Tests for upload<commit_msg>Limitations<commit_after><!-- badges/ -->
[![Build Status](https://secure.travis-ci.org/kvz/baseamp.png?branch=master)](http://travis-ci.org/kvz/baseamp "Check this project's build status on TravisCI")
[![NPM version](http://badge.fury.io/js/baseamp.png)](https://npmjs.org/package/baseamp "View this project on NPM")
[![Dependency Status](https://david-dm.org/kvz/baseamp.png?theme=shields.io)](https://david-dm.org/kvz/baseamp)
[![Development Dependency Status](https://david-dm.org/kvz/baseamp/dev-status.png?theme=shields.io)](https://david-dm.org/kvz/baseamp#info=devDependencies)
<!-- /badges -->

# baseamp

Convert your Markdown todo lists to Basecamp Todolists and back

## Install

Being a commandline tool primarily, Baseamp prefers to be installed globally:

```bash
npm install -g baseamp
```

## Use

First set these environment keys:

```
export BASECAMP_USERNAME="<your private username>"
export BASECAMP_PASSWORD="<<PASSWORD>>"
export BASECAMP_ACCOUNT_ID="<your private account id (1st number in urls)>"
export BASECAMP_PROJECT_ID="<your private project id (2nd number in urls)>"
```

**WARNING: Use a test Project first, Baseamp will overwrite todos in existing projects!**

To download (from Basecamp API -> local markdown):

```bash
$ baseamp download -
## Bugs (this list should always be emptied first) (#21402412)

 - [ ] TIK Big file upload lists can exceed the assemblies.files database field length: http://support.transloadit.com/discussions/problems/13485-problem-with-assemblies-page-files-display (#133063190)
 - [ ] TIK result: false is ignored if step is piped into a storage step (#133071595)

## Documentation (#21403029)

 - [ ] Add ffmpeg new stack lists, link them, show lists which formats they support and which not directly in the docs, when one should use which and then also show the preset contents for each stack version (#133067237)

...etc...
```

To upload (from local markdown -> Basecamp API):

To download (from Basecamp API -> local markdown):

```bash
$ baseamp sync ./Our-Todos.md
```

## Sync Behavior & Limitations

Because our two datasources (a markdown file and the basecamp api) weren't really designed to run in sync, Baseamps syncing is far from perfect.

Here are pointers on behavior and things to watch out for.

When uploading, Baseamp:

 - creates lists & todos that do not exists
 - updates lists & todos that we already track the `(#id)` of in markdown text
 - never deletes something that exist on Basecamp, but not in local markdown, as someone else may have added this item online.

When downloading, Baseamp:

 - Extracts full Todolists of a project, and saves them to a markdown file (or STDOUT), overwriting anything that was already there.

When syncing, Baseamp:

 - Does a *download* after an *upload*, in order to save the IDs locally of newly created todos. Recommended mode of operation. Only works against a local `.md` file, not with STDIN/OUT

Baseamp cannot sync a todo's attachments or contents, but also won't override them, so you can safely use the webinterface to enrich todos.

There is no concept of sub-todos.

Keep in mind that if you remove 1 item from a list, it can result in `position` updates for siblings in that list.

During a sync, when there are conflicting values, the local Markdown file is leading. However, Baseamp does not uncomplete remotely completed items as the usecase for that is limited, and this allows people to check off items online.

If you want to avoid having other values overwritten, keep your Markdown file in Git, and do a download before editting & syncing.

## Todo

 - [ ] Support for rate limiter (500 req/10 minutes)
 - [ ] Remove unnecessary fat arrows
 - [ ] Tests for upload
{'fraction_non_alphanumeric': 0.09844703272323904, 'fraction_numerical': 0.01552967276760954, 'mean_word_length': 4.447885196374623, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5656727', 'n_tokens_mistral': 2255, 'n_tokens_neox': 2057, 'n_words': 900}