clifs


Nameclifs JSON
Version 1.6.0 PyPI version JSON
download
home_page
SummaryCommand line interface for basic file system operations.
upload_time2024-02-27 20:42:32
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords command line file system
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Lint](https://github.com/Don-Felice/clifs/workflows/Lint/badge.svg)
![Test](https://github.com/Don-Felice/clifs/workflows/Test/badge.svg)

# clifs

Multi-platform command line interface for file system operations.

For installation run:

```powershell
pip install clifs
```

After installation all functionality can be accessed typing `clifs` in the command line, which alone will show a list of installed plugins.

To implement your own plugin best inherit from the `clifs.ClifsPlugin` class.

# Plugins installed by default:

## Rename (`ren`)

Rename files or directories using regular expressions. Supports options such as selecting files and folders by sub-string filter, time of the last modification or creation/change, or by list. Type `clifs ren --help` for a list of options. By default a preview mode is running to prevent unpleasant surprises.

### Example:

Command:

```powershell
clifs ren ".\some_dir" --recursive --pattern "(?<!_suffix)\.(.*)" --replacement "_suffix.\1"
```

Output:

<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_ren.png" width="800"/>

## Disc Usage (`du`)

Show disc usage for one or more directories.

### Example:

Command:

```powershell
clifs du "some\dir\on\some_drive" "some\other\dir\on\some_other_drive" "some\other\dir\on\yet_another_drive"
```

Output:

<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_du.png" width="800"/>

## Directory Tree (`tree`)

Show a directory tree including sizes of folders and files. Supports options such as controlling the tree depth or showing folders only. Type `clifs tree --help` for a list of options.

### Example:

Command:

```powershell
clifs tree .\clifs --depth 2
```

Output:

<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_tree.png" width="800"/>

## Streaming Editor (`sed`)

Edit text files using regular expressions. Runs line by line and gives a preview of the changes by default. Supports options such as picking lines by number, selection of files by sub-string filter, time of the last modification or creation/change, or by list. Type `clifs sed --help` for a list of options.

You can e.g. remove specific lines choosing `-pt ".*[\r\n]+" -l 5` or add lines in specific locations using `-pt "[\r\n]+" -rp "\nadded line\n" -l 3,4"`.

### Example:

```powershell
clifs sed ".\some\place" --pattern "(s\w*)" --replacement "no \1"  --lines 4-6 --recursive
```

Output:

<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_sed.png" width="800"/>

## Copy (`cp`)

Copy files from one location to the other.
Supports selection of files and folders by sub-string filter, time of the last modification or creation/change, or by list. Also supports flattening the folder hierarchy. Type `clifs cp --help` for a full list of options.

### Example:

Command:

```powershell
clifs cp ".\some_source_dir" ".\some_dest_dir" --recursive --flatten --keep_all
```

Output:

<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_cp.png" width="800"/>

## Move (`mv`)

Move files from one location to the other.
Supports selection of files and folders by sub-string filter, time of the last modification or creation/change, or by list. Also supports flattening the folder hierarchy. Type `clifs mv --help` for a full list of options.

### Example:

Command:

```powershell
clifs mv ".\some_source_dir" ".\some_dest_dir" --recursive --skip_existing
```

Output:
<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_mv.png" width="800"/>

## Delete (`del`)

Delete files from the drive.
Supports options such as selecting files and folders by sub-string filter, time of the last modification or creation/change, or by list. Type `clifs del --help` for a full list of options.

### Example:

Command:

```powershell
clifs del ".\some_dir" --recursive --filterstring ".py"
```

Output:

<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_del.png" width="800"/>

## Backup (`backup`)

Back up files and folders. Supports backing up via a config file giving multiple source/target pairs and the option to delete files which are not present in the source directory from the corresponding target directory.
Type `clifs backup --help` for a full list of options.

### Example:

Command:

```powershell
clifs backup --dir_source ".\some_source_dir" --dir_dest ".\some_dest_dir" --delete --verbose
```

Output:

<img src="https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_backup.png" width="800"/>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "clifs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "command line,file system",
    "author": "",
    "author_email": "Felix Segerer <don.felice@gmx.net>",
    "download_url": "https://files.pythonhosted.org/packages/a2/b4/230ddaac1f4e4e712c8d4eb68d91d4638b4d6d3a22d284eb88db49381414/clifs-1.6.0.tar.gz",
    "platform": null,
    "description": "![Lint](https://github.com/Don-Felice/clifs/workflows/Lint/badge.svg)\n![Test](https://github.com/Don-Felice/clifs/workflows/Test/badge.svg)\n\n# clifs\n\nMulti-platform command line interface for file system operations.\n\nFor installation run:\n\n```powershell\npip install clifs\n```\n\nAfter installation all functionality can be accessed typing `clifs` in the command line, which alone will show a list of installed plugins.\n\nTo implement your own plugin best inherit from the `clifs.ClifsPlugin` class.\n\n# Plugins installed by default:\n\n## Rename (`ren`)\n\nRename files or directories using regular expressions. Supports options such as selecting files and folders by sub-string filter, time of the last modification or creation/change, or by list. Type `clifs ren --help` for a list of options. By default a preview mode is running to prevent unpleasant surprises.\n\n### Example:\n\nCommand:\n\n```powershell\nclifs ren \".\\some_dir\" --recursive --pattern \"(?<!_suffix)\\.(.*)\" --replacement \"_suffix.\\1\"\n```\n\nOutput:\n\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_ren.png\" width=\"800\"/>\n\n## Disc Usage (`du`)\n\nShow disc usage for one or more directories.\n\n### Example:\n\nCommand:\n\n```powershell\nclifs du \"some\\dir\\on\\some_drive\" \"some\\other\\dir\\on\\some_other_drive\" \"some\\other\\dir\\on\\yet_another_drive\"\n```\n\nOutput:\n\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_du.png\" width=\"800\"/>\n\n## Directory Tree (`tree`)\n\nShow a directory tree including sizes of folders and files. Supports options such as controlling the tree depth or showing folders only. Type `clifs tree --help` for a list of options.\n\n### Example:\n\nCommand:\n\n```powershell\nclifs tree .\\clifs --depth 2\n```\n\nOutput:\n\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_tree.png\" width=\"800\"/>\n\n## Streaming Editor (`sed`)\n\nEdit text files using regular expressions. Runs line by line and gives a preview of the changes by default. Supports options such as picking lines by number, selection of files by sub-string filter, time of the last modification or creation/change, or by list. Type `clifs sed --help` for a list of options.\n\nYou can e.g. remove specific lines choosing `-pt \".*[\\r\\n]+\" -l 5` or add lines in specific locations using `-pt \"[\\r\\n]+\" -rp \"\\nadded line\\n\" -l 3,4\"`.\n\n### Example:\n\n```powershell\nclifs sed \".\\some\\place\" --pattern \"(s\\w*)\" --replacement \"no \\1\"  --lines 4-6 --recursive\n```\n\nOutput:\n\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_sed.png\" width=\"800\"/>\n\n## Copy (`cp`)\n\nCopy files from one location to the other.\nSupports selection of files and folders by sub-string filter, time of the last modification or creation/change, or by list. Also supports flattening the folder hierarchy. Type `clifs cp --help` for a full list of options.\n\n### Example:\n\nCommand:\n\n```powershell\nclifs cp \".\\some_source_dir\" \".\\some_dest_dir\" --recursive --flatten --keep_all\n```\n\nOutput:\n\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_cp.png\" width=\"800\"/>\n\n## Move (`mv`)\n\nMove files from one location to the other.\nSupports selection of files and folders by sub-string filter, time of the last modification or creation/change, or by list. Also supports flattening the folder hierarchy. Type `clifs mv --help` for a full list of options.\n\n### Example:\n\nCommand:\n\n```powershell\nclifs mv \".\\some_source_dir\" \".\\some_dest_dir\" --recursive --skip_existing\n```\n\nOutput:\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_mv.png\" width=\"800\"/>\n\n## Delete (`del`)\n\nDelete files from the drive.\nSupports options such as selecting files and folders by sub-string filter, time of the last modification or creation/change, or by list. Type `clifs del --help` for a full list of options.\n\n### Example:\n\nCommand:\n\n```powershell\nclifs del \".\\some_dir\" --recursive --filterstring \".py\"\n```\n\nOutput:\n\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_del.png\" width=\"800\"/>\n\n## Backup (`backup`)\n\nBack up files and folders. Supports backing up via a config file giving multiple source/target pairs and the option to delete files which are not present in the source directory from the corresponding target directory.\nType `clifs backup --help` for a full list of options.\n\n### Example:\n\nCommand:\n\n```powershell\nclifs backup --dir_source \".\\some_source_dir\" --dir_dest \".\\some_dest_dir\" --delete --verbose\n```\n\nOutput:\n\n<img src=\"https://github.com/Don-Felice/clifs/raw/v1.6.0/doc/imgs/example_backup.png\" width=\"800\"/>\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Command line interface for basic file system operations.",
    "version": "1.6.0",
    "project_urls": {
        "Source code": "https://github.com/Don-Felice/clifs"
    },
    "split_keywords": [
        "command line",
        "file system"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ca26db85ff2daad01278447ef575188964b21de6090a941e4423fe5c9048de6",
                "md5": "129e2e76534e34d7e88e04d507342424",
                "sha256": "a38caef0d7e73a50cd0516c9925fb4cb35bbd059c4a0d84e7f63c03909c2899c"
            },
            "downloads": -1,
            "filename": "clifs-1.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "129e2e76534e34d7e88e04d507342424",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 39143,
            "upload_time": "2024-02-27T20:42:30",
            "upload_time_iso_8601": "2024-02-27T20:42:30.119240Z",
            "url": "https://files.pythonhosted.org/packages/1c/a2/6db85ff2daad01278447ef575188964b21de6090a941e4423fe5c9048de6/clifs-1.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a2b4230ddaac1f4e4e712c8d4eb68d91d4638b4d6d3a22d284eb88db49381414",
                "md5": "e7107f0db621f676291ed7172d57af08",
                "sha256": "0839a8a16699907014fe1c944ca6356bef6df8b19b943dc8708d2bc3a938690e"
            },
            "downloads": -1,
            "filename": "clifs-1.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e7107f0db621f676291ed7172d57af08",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 694525,
            "upload_time": "2024-02-27T20:42:32",
            "upload_time_iso_8601": "2024-02-27T20:42:32.067562Z",
            "url": "https://files.pythonhosted.org/packages/a2/b4/230ddaac1f4e4e712c8d4eb68d91d4638b4d6d3a22d284eb88db49381414/clifs-1.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-27 20:42:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Don-Felice",
    "github_project": "clifs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "clifs"
}
        
Elapsed time: 0.18643s