bme


Namebme JSON
Version 1.4.4 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_time2024-08-27 09:14:09
maintainerNone
docs_urlNone
authorJiri Otoupal
requires_python<4,>=3.7
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": null,
    "docs_url": null,
    "requires_python": "<4,>=3.7",
    "maintainer_email": null,
    "keywords": "Bookmark My Executed Commands",
    "author": "Jiri Otoupal",
    "author_email": "jiri-otoupal@ips-database.eu",
    "download_url": "https://files.pythonhosted.org/packages/ad/df/19909045f36040006d46671f4a4a81da476fd57bbce263535ecaff873be2/bme-1.4.4.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.4",
    "project_urls": {
        "Homepage": "https://github.com/jiri-otoupal/bme"
    },
    "split_keywords": [
        "bookmark",
        "my",
        "executed",
        "commands"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70c9efc8df3c78616f0da8c390c69a14874c376d8bc5e601d5b9cb90a0c30377",
                "md5": "70f9d5c0e9f9121d928f5bf6dfb3b6b6",
                "sha256": "89ee552e1634951d4072443cd2a4cdf290531e2e25dfe569ef8a542e4589501c"
            },
            "downloads": -1,
            "filename": "bme-1.4.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "70f9d5c0e9f9121d928f5bf6dfb3b6b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 16734,
            "upload_time": "2024-08-27T09:14:08",
            "upload_time_iso_8601": "2024-08-27T09:14:08.083434Z",
            "url": "https://files.pythonhosted.org/packages/70/c9/efc8df3c78616f0da8c390c69a14874c376d8bc5e601d5b9cb90a0c30377/bme-1.4.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "addf19909045f36040006d46671f4a4a81da476fd57bbce263535ecaff873be2",
                "md5": "955e40079fe967be56363dd339afc87f",
                "sha256": "2a1066b6aed75652f1cd2b16dd2f5c67516a8ade33050a854e7b82368c72c01a"
            },
            "downloads": -1,
            "filename": "bme-1.4.4.tar.gz",
            "has_sig": false,
            "md5_digest": "955e40079fe967be56363dd339afc87f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 14995,
            "upload_time": "2024-08-27T09:14:09",
            "upload_time_iso_8601": "2024-08-27T09:14:09.711620Z",
            "url": "https://files.pythonhosted.org/packages/ad/df/19909045f36040006d46671f4a4a81da476fd57bbce263535ecaff873be2/bme-1.4.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-27 09:14:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jiri-otoupal",
    "github_project": "bme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "bme"
}
        
Elapsed time: 0.50380s