bme


Namebme JSON
Version 1.4.2 PyPI version JSON
download
home_pagehttps://github.com/jiri-otoupal/bme
SummaryNever use notepads or history for searching for your past commands. With BME you can bookmark your commands, search in your bookmarked commands and execute them with edit possibility before execution.
upload_time2023-03-22 10:40:12
maintainer
docs_urlNone
authorJiri Otoupal
requires_python>=3.7,<4
licenseMIT
keywords bookmark my executed commands
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BME

(Bookmark my Executions/Commands)

Never use notepads or history for searching for your past commands. With BME you can bookmark your commands, search in your bookmarked commands and
execute them with edit possibility before execution.

[![image](https://img.shields.io/pypi/v/bme.svg)](https://pypi.org/project/bme/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bme)](https://pypi.org/project/bme/)
[![Downloads](https://pepy.tech/badge/bme)](https://pepy.tech/project/bme)

### Supported

#### OS

No specific requirements here, whatever runs Python

## Requirements

### Python

* 3.7+

## Installing

### MacOS

On most MacOS machines there is `pip3` instead of `pip` **use pip3 for install**

Install and update using [pip](https://pip.pypa.io/en/stable/quickstart/):

```bash
pip install bme

or

pip3 install bme
```

## All your commands are saved in '~/.bme/bookmarks.json'

## Usage:

#### For adding bookmark:

_(Quotas can be used)_

```
bme add <your command>
```

#### For Removing bookmark:

_(Quotas can be used)_

```
bme rm <your command>
```

#### For List bookmarks:

_(Quotas can be used)_

```
bme list <searched>
```

* searched is optional, only if you want to list specific commands
* Regex, match case and full word flags are supported

#### For Executing bookmark:

Basic search `bme run <searched>`

Regex search `bme run <searched> -r <my-regex*>`

##### Formatting support:

You can format command from bookmark with python formatting as such

* Use {} to be placeholder for your tuple arguments
* Use {name} to be placeholder with key name for your dictionary arguments

**Mixing tuple and dict arguments is not supported!**

Example:

Tuple:

```
bme add echo "Hello {} !"
bme run ec Jiri
```

Dictionary arguments:

```
bme add echo "Hello {name} from {location}"
bme run ec name=Jiri location=Prague
```

**or**

```
bme run ec name=\"Jiri\" location=\"Prague\"
```

##### Optional flags:

`"-e" or "--edit"` for editing command before execution

`"-r <your-regex>" or "--regex <your-regex>"` for full word search only

`"-f" or "--full-word"` for full word search only

`"-m" or "--match-case"` for search with matching case

_(Quotas can be used)_

```
bme run <your command>
```

## Sequences

Sequences are like scripts, except you don't have to search for location and manage them with different `.bashrc` or different OS specific files.
Also thanks to this, you don't have to add them to PATH.

BME will take care of storing your sequences in your `~/.bme` folder and will help you to search in them.
These sequences work from everywhere and execution is always in your current working directory.

### Commands:

**Create Sequence**

`bme seq create {name}`

Example:

`bme seq create my_sequence`

**Remove Sequence**

`bme seq rm {name}`

Example

`bme seq rm my_sequence`

**Edit Sequence**

`bme seq edit`

This will display location of json with sequences

**Add Command to Sequence**

This will add command to sequence with use of variadic arguments

    bme seq add {sequence_name} {command...}

Example:

    bme seq add my_sequence ssh jiri@192.168.1.0

**Pop Command from Sequence**

This will pop command from sequence with use of variadic arguments

    bme seq pop {sequence_name} {command...}

Example:

    bme seq pop my_sequence ssh jiri@192.168.1.0

**Sequence Run**

Runs supplied sequence, and will do search for you if not found

    bme sequence run {sequence_name}

Sequence does support formatting of dynamic arguments same way as bookmarks
these arguments will be passed to every command for formatting

Example:

    bme sequence run my_sequence John

or

    bme sequence run my_sequence name=John

**Sequence Watch (!BETA!)**

Launches sequence on file modify

    bme sequence watch {sequence_name} {file_path}

**List Sequence**

This will list commands and sequences, if argument is used search in text is applied to results

Optional flags:

    "-r <your-regex>" or "--regex <your-regex>"` for full word search only
    "-f" or "--full-word" for full word search only
    "-m" or "--match-case" for search with matching case

Example Data:

    In sequence DB there is:
     'ssh jiri@192.168.1.0' command
     'ssh jiri@192.168.1.55' command
     'scp jiri@192.168.1.55' command

Command `bme sequence list` will list all the sequences and their commands

Specific listing format:

    bme sequence list <optional commands that match this to list>

Example:

    bme sequence list ssh

Output:

```        
'ssh jiri@192.168.1.0' command
'ssh jiri@192.168.1.55' command
```

<hr>
Did I made your life less painful ? 
<br>
<br>
Support my coffee addiction ;)
<br>
<a href="https://www.buymeacoffee.com/jiriotoupal" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy me a Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jiri-otoupal/bme",
    "name": "bme",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4",
    "maintainer_email": "",
    "keywords": "Bookmark My Executed Commands",
    "author": "Jiri Otoupal",
    "author_email": "jiri-otoupal@ips-database.eu",
    "download_url": "https://files.pythonhosted.org/packages/38/7f/91c9b8344a5159b3b9928c5312a313d8f1ad214c7ae70c35099defa93f59/bme-1.4.2.tar.gz",
    "platform": null,
    "description": "# BME\n\n(Bookmark my Executions/Commands)\n\nNever use notepads or history for searching for your past commands. With BME you can bookmark your commands, search in your bookmarked commands and\nexecute them with edit possibility before execution.\n\n[![image](https://img.shields.io/pypi/v/bme.svg)](https://pypi.org/project/bme/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bme)](https://pypi.org/project/bme/)\n[![Downloads](https://pepy.tech/badge/bme)](https://pepy.tech/project/bme)\n\n### Supported\n\n#### OS\n\nNo specific requirements here, whatever runs Python\n\n## Requirements\n\n### Python\n\n* 3.7+\n\n## Installing\n\n### MacOS\n\nOn most MacOS machines there is `pip3` instead of `pip` **use pip3 for install**\n\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\n\n```bash\npip install bme\n\nor\n\npip3 install bme\n```\n\n## All your commands are saved in '~/.bme/bookmarks.json'\n\n## Usage:\n\n#### For adding bookmark:\n\n_(Quotas can be used)_\n\n```\nbme add <your command>\n```\n\n#### For Removing bookmark:\n\n_(Quotas can be used)_\n\n```\nbme rm <your command>\n```\n\n#### For List bookmarks:\n\n_(Quotas can be used)_\n\n```\nbme list <searched>\n```\n\n* searched is optional, only if you want to list specific commands\n* Regex, match case and full word flags are supported\n\n#### For Executing bookmark:\n\nBasic search `bme run <searched>`\n\nRegex search `bme run <searched> -r <my-regex*>`\n\n##### Formatting support:\n\nYou can format command from bookmark with python formatting as such\n\n* Use {} to be placeholder for your tuple arguments\n* Use {name} to be placeholder with key name for your dictionary arguments\n\n**Mixing tuple and dict arguments is not supported!**\n\nExample:\n\nTuple:\n\n```\nbme add echo \"Hello {} !\"\nbme run ec Jiri\n```\n\nDictionary arguments:\n\n```\nbme add echo \"Hello {name} from {location}\"\nbme run ec name=Jiri location=Prague\n```\n\n**or**\n\n```\nbme run ec name=\\\"Jiri\\\" location=\\\"Prague\\\"\n```\n\n##### Optional flags:\n\n`\"-e\" or \"--edit\"` for editing command before execution\n\n`\"-r <your-regex>\" or \"--regex <your-regex>\"` for full word search only\n\n`\"-f\" or \"--full-word\"` for full word search only\n\n`\"-m\" or \"--match-case\"` for search with matching case\n\n_(Quotas can be used)_\n\n```\nbme run <your command>\n```\n\n## Sequences\n\nSequences are like scripts, except you don't have to search for location and manage them with different `.bashrc` or different OS specific files.\nAlso thanks to this, you don't have to add them to PATH.\n\nBME will take care of storing your sequences in your `~/.bme` folder and will help you to search in them.\nThese sequences work from everywhere and execution is always in your current working directory.\n\n### Commands:\n\n**Create Sequence**\n\n`bme seq create {name}`\n\nExample:\n\n`bme seq create my_sequence`\n\n**Remove Sequence**\n\n`bme seq rm {name}`\n\nExample\n\n`bme seq rm my_sequence`\n\n**Edit Sequence**\n\n`bme seq edit`\n\nThis will display location of json with sequences\n\n**Add Command to Sequence**\n\nThis will add command to sequence with use of variadic arguments\n\n    bme seq add {sequence_name} {command...}\n\nExample:\n\n    bme seq add my_sequence ssh jiri@192.168.1.0\n\n**Pop Command from Sequence**\n\nThis will pop command from sequence with use of variadic arguments\n\n    bme seq pop {sequence_name} {command...}\n\nExample:\n\n    bme seq pop my_sequence ssh jiri@192.168.1.0\n\n**Sequence Run**\n\nRuns supplied sequence, and will do search for you if not found\n\n    bme sequence run {sequence_name}\n\nSequence does support formatting of dynamic arguments same way as bookmarks\nthese arguments will be passed to every command for formatting\n\nExample:\n\n    bme sequence run my_sequence John\n\nor\n\n    bme sequence run my_sequence name=John\n\n**Sequence Watch (!BETA!)**\n\nLaunches sequence on file modify\n\n    bme sequence watch {sequence_name} {file_path}\n\n**List Sequence**\n\nThis will list commands and sequences, if argument is used search in text is applied to results\n\nOptional flags:\n\n    \"-r <your-regex>\" or \"--regex <your-regex>\"` for full word search only\n    \"-f\" or \"--full-word\" for full word search only\n    \"-m\" or \"--match-case\" for search with matching case\n\nExample Data:\n\n    In sequence DB there is:\n     'ssh jiri@192.168.1.0' command\n     'ssh jiri@192.168.1.55' command\n     'scp jiri@192.168.1.55' command\n\nCommand `bme sequence list` will list all the sequences and their commands\n\nSpecific listing format:\n\n    bme sequence list <optional commands that match this to list>\n\nExample:\n\n    bme sequence list ssh\n\nOutput:\n\n```        \n'ssh jiri@192.168.1.0' command\n'ssh jiri@192.168.1.55' command\n```\n\n<hr>\nDid I made your life less painful ? \n<br>\n<br>\nSupport my coffee addiction ;)\n<br>\n<a href=\"https://www.buymeacoffee.com/jiriotoupal\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy me a Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Never use notepads or history for searching for your past commands. With BME you can bookmark your commands, search in your bookmarked commands and execute them with edit possibility before execution.",
    "version": "1.4.2",
    "split_keywords": [
        "bookmark",
        "my",
        "executed",
        "commands"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e56ac3b729d1555af289e7a6036d46a135406c6b4f6a4673d06fff8820c2f0b",
                "md5": "eff0042dd44ca96babb8ca9db76eec16",
                "sha256": "3b910739a997ff9cf4a1b0a08b40038f66cd52e7d46c71696fac3cd5a2522bc2"
            },
            "downloads": -1,
            "filename": "bme-1.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eff0042dd44ca96babb8ca9db76eec16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4",
            "size": 16698,
            "upload_time": "2023-03-22T10:40:10",
            "upload_time_iso_8601": "2023-03-22T10:40:10.868873Z",
            "url": "https://files.pythonhosted.org/packages/7e/56/ac3b729d1555af289e7a6036d46a135406c6b4f6a4673d06fff8820c2f0b/bme-1.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "387f91c9b8344a5159b3b9928c5312a313d8f1ad214c7ae70c35099defa93f59",
                "md5": "7761fca5abf311a445ac150983c4a686",
                "sha256": "d89c93c6ab0885ac752bc499166ae7bff809aadd85e7246632fa2501e38af803"
            },
            "downloads": -1,
            "filename": "bme-1.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7761fca5abf311a445ac150983c4a686",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4",
            "size": 14857,
            "upload_time": "2023-03-22T10:40:12",
            "upload_time_iso_8601": "2023-03-22T10:40:12.050850Z",
            "url": "https://files.pythonhosted.org/packages/38/7f/91c9b8344a5159b3b9928c5312a313d8f1ad214c7ae70c35099defa93f59/bme-1.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-22 10:40:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "jiri-otoupal",
    "github_project": "bme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "bme"
}
        
Elapsed time: 0.04627s