take-note-cli


Nametake-note-cli JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/wsinned/take-note
SummaryCreate and open notes in your favourite editor.
upload_time2024-01-21 08:22:10
maintainer
docs_urlNone
authorwsinned
requires_python>=3.8,<4.0
licenseMIT
keywords note tool utility cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Take Note

**Create and open notes in your favourite editor.**

## Features

- Written in Python with no runtime dependencies.
  - Works on Python 3.8 - 3.11.
- Open notes files for specified week using the `code` command line for VS Code.
  - --thisWeek, --lastWeek and --nextWeek are supported.
- Organises notes in a date based folder structure from your root notes folder, e.g. 2023/08
  - set the root notes folder using --notesFolder
- Choose which editor to use with --editor
- Specify a VS Code workspace to open along with the note file with --workspace
  - This will override the --editor setting to `code`
- Specify a template file relative to the root notes folder to use when a new file is created using --template. This also performs a simple replacement of the text HEADER_DATE with the date formatted as "%A %d %B %Y" to use in the document title.
- Support for batch creation of files in advance. This is useful if you use a device where you can edit files, but can't easily create them. Use --batch 5 along with any of the --*Week options to create that week and the following 4 weeks too.

## Future features

- Support for daily notes options.

## Installation

### pipx

The recommended way to install the published package is through [pipx](https://pypa.github.io/pipx/).

```bash
# from PyPI
pipx install take-note-cli

# direct from github
pipx install git+https://github.com/wsinned/take-note
```

## Usage

### Command Line

Specify a folder using the --notesFolder option, otherwise $HOME/Notes will be used
A week option must be supplied from --thisWeek, --lastWeek or --nextWeek

```bash
take-note --notesFolder=$HOME/MyNotes --thisWeek
```

A note will be created in the under the MyNotes/YYYY/mm folder named with the date of the Monday of this week, e.g. 2023-08-07-Weekly-log.md

### Aliases

Setting up aliases in you preferred shell is a great way to make accessing your notes quick and easy.

```bash
notes_folder="$HOME/SomePath/MyNotes"
args="--notesFolder $notes_folder --workspace notes.code-workspace --template Home-weekly-log-template.md"

alias thisWeek="take-note --thisWeek $args"
alias nextWeek="take-note --nextWeek $args"
alias lastWeek="take-note --lastWeek $args"
```

All you have to do now is type one of the following to open the desired note file.

```bash
> thisWeek
> lastWeek
> nextWeek
```

## Other Installation Methods

### Virtual Environment

```bash
python -m venv venv 

source venv/bin/activate

venv/bin/pip install -r requirements.txt

# install with tests as editable src
venv/bin/pip install -e .

```

## Development

### Nix & NixOS

The supplied shell.nix definition provides support for entering a nix-shell directly in the repository with all dependencies.

```zsh
nix-shell --run zsh # ensure using zsh over default bash session

# only needed once, or to recreate the virtual environment
python -m venv venv 

source venv/bin/activate

# install with tests as editable src
venv/bin/pip install -e '.[test]'

# run the tests
pytest

# close the virtual environment and exit the shell when done
deactivate
exit
```

### Other Linux or macOS

```zsh
# only needed once, or to recreate the virtual environment
python -m venv venv 

source venv/bin/activate

venv/bin/pip install -r requirements.txt -r requirements.dev.txt

# install with tests as editable src
venv/bin/pip install -e '.[test]'

# run the tests
venv/bin/pytest

# close the virtual environment when done
deactivate
```

## Linting

The project uses [ruff](https://github.com/charliermarsh/ruff) for linting and optionally for formatting.

```bash
venv/bin/ruff . --config pyproject.toml
```

## Build & Publish

From an installed and tested venv, do the following:

```bash
# check the version:
cat src/takenote/__version__.py

# build the package
venv/bin/pyproject-build

# publish the package
venv/bin/twine upload dist/*
```

Credentials for twine should be either:
    - stored in .pypirc in the [pypi] section
    - entered at the prompt, username = **token** and password = your_api_key

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wsinned/take-note",
    "name": "take-note-cli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "note,tool,utility,cli",
    "author": "wsinned",
    "author_email": "wsinned@tutanota.com",
    "download_url": "https://files.pythonhosted.org/packages/70/c3/cba3655a8ea81166fb948e43653483c8cc4d3af0ff8c0c360db6d308ee4f/take_note_cli-1.2.0.tar.gz",
    "platform": null,
    "description": "# Take Note\n\n**Create and open notes in your favourite editor.**\n\n## Features\n\n- Written in Python with no runtime dependencies.\n  - Works on Python 3.8 - 3.11.\n- Open notes files for specified week using the `code` command line for VS Code.\n  - --thisWeek, --lastWeek and --nextWeek are supported.\n- Organises notes in a date based folder structure from your root notes folder, e.g. 2023/08\n  - set the root notes folder using --notesFolder\n- Choose which editor to use with --editor\n- Specify a VS Code workspace to open along with the note file with --workspace\n  - This will override the --editor setting to `code`\n- Specify a template file relative to the root notes folder to use when a new file is created using --template. This also performs a simple replacement of the text HEADER_DATE with the date formatted as \"%A %d %B %Y\" to use in the document title.\n- Support for batch creation of files in advance. This is useful if you use a device where you can edit files, but can't easily create them. Use --batch 5 along with any of the --*Week options to create that week and the following 4 weeks too.\n\n## Future features\n\n- Support for daily notes options.\n\n## Installation\n\n### pipx\n\nThe recommended way to install the published package is through [pipx](https://pypa.github.io/pipx/).\n\n```bash\n# from PyPI\npipx install take-note-cli\n\n# direct from github\npipx install git+https://github.com/wsinned/take-note\n```\n\n## Usage\n\n### Command Line\n\nSpecify a folder using the --notesFolder option, otherwise $HOME/Notes will be used\nA week option must be supplied from --thisWeek, --lastWeek or --nextWeek\n\n```bash\ntake-note --notesFolder=$HOME/MyNotes --thisWeek\n```\n\nA note will be created in the under the MyNotes/YYYY/mm folder named with the date of the Monday of this week, e.g. 2023-08-07-Weekly-log.md\n\n### Aliases\n\nSetting up aliases in you preferred shell is a great way to make accessing your notes quick and easy.\n\n```bash\nnotes_folder=\"$HOME/SomePath/MyNotes\"\nargs=\"--notesFolder $notes_folder --workspace notes.code-workspace --template Home-weekly-log-template.md\"\n\nalias thisWeek=\"take-note --thisWeek $args\"\nalias nextWeek=\"take-note --nextWeek $args\"\nalias lastWeek=\"take-note --lastWeek $args\"\n```\n\nAll you have to do now is type one of the following to open the desired note file.\n\n```bash\n> thisWeek\n> lastWeek\n> nextWeek\n```\n\n## Other Installation Methods\n\n### Virtual Environment\n\n```bash\npython -m venv venv \n\nsource venv/bin/activate\n\nvenv/bin/pip install -r requirements.txt\n\n# install with tests as editable src\nvenv/bin/pip install -e .\n\n```\n\n## Development\n\n### Nix & NixOS\n\nThe supplied shell.nix definition provides support for entering a nix-shell directly in the repository with all dependencies.\n\n```zsh\nnix-shell --run zsh # ensure using zsh over default bash session\n\n# only needed once, or to recreate the virtual environment\npython -m venv venv \n\nsource venv/bin/activate\n\n# install with tests as editable src\nvenv/bin/pip install -e '.[test]'\n\n# run the tests\npytest\n\n# close the virtual environment and exit the shell when done\ndeactivate\nexit\n```\n\n### Other Linux or macOS\n\n```zsh\n# only needed once, or to recreate the virtual environment\npython -m venv venv \n\nsource venv/bin/activate\n\nvenv/bin/pip install -r requirements.txt -r requirements.dev.txt\n\n# install with tests as editable src\nvenv/bin/pip install -e '.[test]'\n\n# run the tests\nvenv/bin/pytest\n\n# close the virtual environment when done\ndeactivate\n```\n\n## Linting\n\nThe project uses [ruff](https://github.com/charliermarsh/ruff) for linting and optionally for formatting.\n\n```bash\nvenv/bin/ruff . --config pyproject.toml\n```\n\n## Build & Publish\n\nFrom an installed and tested venv, do the following:\n\n```bash\n# check the version:\ncat src/takenote/__version__.py\n\n# build the package\nvenv/bin/pyproject-build\n\n# publish the package\nvenv/bin/twine upload dist/*\n```\n\nCredentials for twine should be either:\n    - stored in .pypirc in the [pypi] section\n    - entered at the prompt, username = **token** and password = your_api_key\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Create and open notes in your favourite editor.",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/wsinned/take-note",
        "Repository": "https://github.com/wsinned/take-note"
    },
    "split_keywords": [
        "note",
        "tool",
        "utility",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "afc3dd49b7b346fb15e0baeeb8561b664426189ec2b2bf895ae624cd0146cd9f",
                "md5": "a8578faf1a7d3d53af39f6cb5db70a9b",
                "sha256": "64bf913abdbf1c9e8916c514b8163c8163ab4944b07fae8dba5eb0c276b05959"
            },
            "downloads": -1,
            "filename": "take_note_cli-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a8578faf1a7d3d53af39f6cb5db70a9b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 7426,
            "upload_time": "2024-01-21T08:22:09",
            "upload_time_iso_8601": "2024-01-21T08:22:09.003904Z",
            "url": "https://files.pythonhosted.org/packages/af/c3/dd49b7b346fb15e0baeeb8561b664426189ec2b2bf895ae624cd0146cd9f/take_note_cli-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70c3cba3655a8ea81166fb948e43653483c8cc4d3af0ff8c0c360db6d308ee4f",
                "md5": "39dc6f7b8522a2f305d04729cf00bd1c",
                "sha256": "873b95425a23ff366d5976c0776019e92e6a5374273484935e8cf5ddcaf04cbe"
            },
            "downloads": -1,
            "filename": "take_note_cli-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "39dc6f7b8522a2f305d04729cf00bd1c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 5621,
            "upload_time": "2024-01-21T08:22:10",
            "upload_time_iso_8601": "2024-01-21T08:22:10.960554Z",
            "url": "https://files.pythonhosted.org/packages/70/c3/cba3655a8ea81166fb948e43653483c8cc4d3af0ff8c0c360db6d308ee4f/take_note_cli-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-21 08:22:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wsinned",
    "github_project": "take-note",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "take-note-cli"
}
        
Elapsed time: 0.17224s