dirmarks


Namedirmarks JSON
Version 0.1.6 PyPI version JSON
download
home_page
SummaryBookmarks for the filesystem
upload_time2023-12-08 11:03:16
maintainer
docs_urlNone
authorMeir Michanie
requires_python>=3.9,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Dirmarks
Dirmarks is a directory bookmarking tool that allows you to easily manage, navigate, and switch between directories using bookmarks. This tool can save you time and make working with the command line more efficient.


## Installation
Install the Markdirs package using pip:

```
pip install dirmarks
```

## Shell Function Setup
To enable the dir command for changing directories using bookmarks, add the following shell function to your .profile, .bashrc, or .zshrc file, depending on your shell:

```
#!/bin/bash
dir() {
if [ "$#" -eq 0 ]; then
    dirmarks list
    exit $?
fi
OPT=$1;
shift;
case $OPT in
        -l)
        dirmarks list
        ;;
        -h)
        dirmarks help
        ;;
        -d)
        dirmarks delete $1
        ;;
        -m)
        dirmarks add $1 $PWD
        ;;
        -u)
        dirmarks update $1 $2
        ;;
        -a)
        dirmarks add $1 $2
        ;;
        -p)
        GO=`dirmarks get $1`;
        if [ "X$GO" != "X" ]; then
                echo $GO;
        fi
        ;;
        *)
        GO=`dirmarks get $OPT`;
        if [ "X$GO" != "X" ]; then
                cd $GO;
        fi
        ;;
esac
}
```

Or add a file .functions in your home directory and source it in .bashrc

```
echo "source ~/.functions" >> ~/.bashrc
```
## Setup dirmarks for all users 

```
mkdir -p /etc/bash.functions 
cp data/marks.function /etc/bsh.fucntions
```

### Append the following line in /etc/bash.bashrc

```
if [ -d /etc/bash.functions ]; then
        for i in /etc/bash.functions/*;do 
                source $i
        done
fi
```

## Usage:

```
dir -h   ------------------ prints this help
dir -l	------------------ list marks
dir <[0-9]+> -------------- dir to mark[x] where is x is the index
dir <name> ---------------- dir to mark where key=<shortname>
dir -a <name> <path> ------ add new mark
dir -d <name>|[0-9]+ ------ delete mark
dir -u <name> <path> ------ update mark
dir -m <name> ------------- add mark for PWD
dir -p <name> ------------- prints mark
```

## Usage example

```
majam@dirose:~$ dir -l
0 => meirm:/net/xen/mnt/sdb1/meirm
1 => edonkey:/net/xen/mnt/sdb1/majam/aMule/Incoming
2 => init:/etc/init.d
3 => majam:/net/xen/mnt/sdb1/majam

majam@dirose:~$ dir 1
majam@dirose:/net/xen/mnt/sdb1/majam/aMule/Incoming$ 

majam@dirose:/etc/init.d$ dir majam
majam@dirose:/net/xen/mnt/sdb1/majam$ 

majam@dirose:~$ dir -d 2
majam@dirose:~$
```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dirmarks",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Meir Michanie",
    "author_email": "meirm@riunx.com",
    "download_url": "https://files.pythonhosted.org/packages/07/65/3cedfbcb2da628d4110f04a0e8d7f8d1155206da72dbecd99e66c35043d8/dirmarks-0.1.6.tar.gz",
    "platform": null,
    "description": "# Dirmarks\nDirmarks is a directory bookmarking tool that allows you to easily manage, navigate, and switch between directories using bookmarks. This tool can save you time and make working with the command line more efficient.\n\n\n## Installation\nInstall the Markdirs package using pip:\n\n```\npip install dirmarks\n```\n\n## Shell Function Setup\nTo enable the dir command for changing directories using bookmarks, add the following shell function to your .profile, .bashrc, or .zshrc file, depending on your shell:\n\n```\n#!/bin/bash\ndir() {\nif [ \"$#\" -eq 0 ]; then\n    dirmarks list\n    exit $?\nfi\nOPT=$1;\nshift;\ncase $OPT in\n        -l)\n        dirmarks list\n        ;;\n        -h)\n        dirmarks help\n        ;;\n        -d)\n        dirmarks delete $1\n        ;;\n        -m)\n        dirmarks add $1 $PWD\n        ;;\n        -u)\n        dirmarks update $1 $2\n        ;;\n        -a)\n        dirmarks add $1 $2\n        ;;\n        -p)\n        GO=`dirmarks get $1`;\n        if [ \"X$GO\" != \"X\" ]; then\n                echo $GO;\n        fi\n        ;;\n        *)\n        GO=`dirmarks get $OPT`;\n        if [ \"X$GO\" != \"X\" ]; then\n                cd $GO;\n        fi\n        ;;\nesac\n}\n```\n\nOr add a file .functions in your home directory and source it in .bashrc\n\n```\necho \"source ~/.functions\" >> ~/.bashrc\n```\n## Setup dirmarks for all users \n\n```\nmkdir -p /etc/bash.functions \ncp data/marks.function /etc/bsh.fucntions\n```\n\n### Append the following line in /etc/bash.bashrc\n\n```\nif [ -d /etc/bash.functions ]; then\n        for i in /etc/bash.functions/*;do \n                source $i\n        done\nfi\n```\n\n## Usage:\n\n```\ndir -h   ------------------ prints this help\ndir -l\t------------------ list marks\ndir <[0-9]+> -------------- dir to mark[x] where is x is the index\ndir <name> ---------------- dir to mark where key=<shortname>\ndir -a <name> <path> ------ add new mark\ndir -d <name>|[0-9]+ ------ delete mark\ndir -u <name> <path> ------ update mark\ndir -m <name> ------------- add mark for PWD\ndir -p <name> ------------- prints mark\n```\n\n## Usage example\n\n```\nmajam@dirose:~$ dir -l\n0 => meirm:/net/xen/mnt/sdb1/meirm\n1 => edonkey:/net/xen/mnt/sdb1/majam/aMule/Incoming\n2 => init:/etc/init.d\n3 => majam:/net/xen/mnt/sdb1/majam\n\nmajam@dirose:~$ dir 1\nmajam@dirose:/net/xen/mnt/sdb1/majam/aMule/Incoming$ \n\nmajam@dirose:/etc/init.d$ dir majam\nmajam@dirose:/net/xen/mnt/sdb1/majam$ \n\nmajam@dirose:~$ dir -d 2\nmajam@dirose:~$\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Bookmarks for the filesystem",
    "version": "0.1.6",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2102dfb50c896edc85ec6b9e65cbda7137f208660ce8bea14b2c9f5425768f1a",
                "md5": "8a78c955c8edfb2d8b684e9ac4484696",
                "sha256": "b16ccc5fea887145ce37fbed57c502711ff3cfc7b1c719a238154496adec490c"
            },
            "downloads": -1,
            "filename": "dirmarks-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a78c955c8edfb2d8b684e9ac4484696",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 5777,
            "upload_time": "2023-12-08T11:03:14",
            "upload_time_iso_8601": "2023-12-08T11:03:14.542677Z",
            "url": "https://files.pythonhosted.org/packages/21/02/dfb50c896edc85ec6b9e65cbda7137f208660ce8bea14b2c9f5425768f1a/dirmarks-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07653cedfbcb2da628d4110f04a0e8d7f8d1155206da72dbecd99e66c35043d8",
                "md5": "8efde6d969629eea77089704f60c16f7",
                "sha256": "8050e363db9e3f1da8771838e7384398527fcf902157e18947c0c5b657f7ab93"
            },
            "downloads": -1,
            "filename": "dirmarks-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "8efde6d969629eea77089704f60c16f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 4489,
            "upload_time": "2023-12-08T11:03:16",
            "upload_time_iso_8601": "2023-12-08T11:03:16.163478Z",
            "url": "https://files.pythonhosted.org/packages/07/65/3cedfbcb2da628d4110f04a0e8d7f8d1155206da72dbecd99e66c35043d8/dirmarks-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-08 11:03:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "dirmarks"
}
        
Elapsed time: 0.15083s