tempren


Nametempren JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/idle-code/tempren
SummaryTemplate-based renaming utility
upload_time2024-04-13 11:08:00
maintainerNone
docs_urlNone
authorPaweł Żukowski
requires_python<4.0,>=3.8
licenseGPL-3.0-or-later
keywords batch-renaming cli filename
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Tempren - template-based file renaming utility

![run-tests](https://github.com/idle-code/tempren/actions/workflows/run-tests.yml/badge.svg)
[![codecov](https://codecov.io/gh/idle-code/tempren/branch/develop/graph/badge.svg?token=1CR2PX6GYB)](https://codecov.io/gh/idle-code/tempren)
[![Maintainability](https://api.codeclimate.com/v1/badges/d67f6ebe698b79d75279/maintainability)](https://codeclimate.com/github/idle-code/tempren/maintainability)
[![PyPI version](https://badge.fury.io/py/tempren.svg)](https://badge.fury.io/py/tempren)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/idle-code/tempren/develop.svg)](https://results.pre-commit.ci/latest/github/idle-code/tempren/develop)

[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/tempren)

`tempren` is a powerful file renaming utility that uses flexible template expressions to generate names for your files.\
Tag templates can modify original filename, extract metadata from the files or anything in between.\
A rich library of built-in tags helps with working with many common file types out-of-the-box.

Whether you need to organize your files, standardize naming conventions, or perform complex renaming tasks, `tempren` can help you get the job done efficiently.

## Features
- Template-based filename/path generation
- Built-in Audio/Video/Images metadata extraction tags
- Ad-hoc tags to leverage external programs for metadata extraction
- Configurable, metadata-based file selection (filtering) and sorting

## Installation and documentation
For comprehensive documentation, including [installation instructions](MANUAL.md#installation), all features, advanced usage, and troubleshooting, please visit the [Manual](MANUAL.md) page.

<!--
## [Quickstart](QUICKSTART.md)
For quick, five-minute introduction to the most of `tempren` features please refer to the [quickstart](QUICKSTART.md) page.
You can also take a look on the following examples.
-->

## Examples
**Note: When experimenting on your own please use `--dry-run` flag!** \
**`tempren` will not override your files by default but invalid template can mangle their names.**

<details>
<summary>Cleaning up names for sensitive (e.g. FAT32) filesystems</summary>

```commandline
$ tempren --recursive --name "%Strip(){%Base()|%Unidecode()|%Sanitize()|%Collapse()}%Ext()" ./Some\ OST/
Renamed: Disk 1/14 - 接近.flac
     to: Disk 1/14 - Jie Jin.flac
Renamed: Disk 1/02 - なつのあお.flac
     to: Disk 1/02 - natsunoao.flac
Renamed: Disk 1/11 - 灯火-re.flac
     to: Disk 1/11 - Deng Huo -re.flac
Renamed: Disk 1/05 - 記録.flac
     to: Disk 1/05 - Ji Lu.flac
Renamed: Disk 1/10 - むかしむかし、あるところに.flac
     to: Disk 1/10 - mukashimukashi, arutokoroni.flac
Renamed: Disk 1/09 - 阿良句のテーマ(ハイ).flac
     to: Disk 1/09 - A Liang Ju notema(hai).flac
...
```
</details>

<details>
<summary>Adding resolution to the image files</summary>

```commandline
$ tempren --name "%Base()_%Image.Width()x%Image.Height()%Ext()" ~/Pictures/Wallpapers
Renamed: 0sa5yfiskqr21.jpg
     to: 0sa5yfiskqr21_3728x4660.jpg
Renamed: rkgjq6883fp81.jpg
     to: rkgjq6883fp81_3024x4032.jpg
Renamed: lcrkvphf28911.jpg
     to: lcrkvphf28911_4016x4684.jpg
Renamed: y6nzcv55k3851.jpg
     to: y6nzcv55k3851_3784x5670.jpg
Renamed: 1211740803547.jpg
     to: 1211740803547_1200x1109.jpg
...
```
</details>

<details>
<summary>Sorting files into directories based on their MIME type</summary>

```commandline
$ tempren -dr --path "%Capitalize(){%Mime(subtype)}/%Name()" ~/Downloads
Renamed: dotnet-install.sh
     to: X-shellscript/dotnet-install.sh
Renamed: openrgb_0.7_amd64_buster_6128731.deb
     to: Vnd.debian.binary-package/openrgb_0.7_amd64_buster_6128731.deb
Renamed: prometheus-2.26.0.linux-amd64.tar.gz
     to: Gzip/prometheus-2.26.0.linux-amd64.tar.gz
Renamed: nldb remote.zip
     to: Zip/nldb remote.zip
Renamed: artifacts.zip
     to: Zip/artifacts.zip
Renamed: 2021-06-11_12-09-34.webm
     to: X-matroska/2021-06-11_12-09-34.webm
Renamed: antlr-4.9.2-complete.jar
     to: Java-archive/antlr-4.9.2-complete.jar
...
```
</details>

<details>
<summary>Adding checksums to the names of the audio files</summary>

```commandline
$ tempren --filter-template "%IsMime('audio')" --name "%Base() [%Upper(){%Crc32()}]%Ext()" ./Roger\ Subirana\ Mata\ -\ Point\ of\ no\ return
Renamed: 10-169205-Roger Subirana Mata-Island of light.mp3
     to: 10-169205-Roger Subirana Mata-Island of light [08E46C33].mp3
Renamed: 12-169207-Roger Subirana Mata-Tales of trees.mp3
     to: 12-169207-Roger Subirana Mata-Tales of trees [33EFEC5E].mp3
Renamed: 11-169206-Roger Subirana Mata-Requiem.mp3
     to: 11-169206-Roger Subirana Mata-Requiem [5E48759B].mp3
Renamed: 05-168950-Roger Subirana Mata-The mask.mp3
     to: 05-168950-Roger Subirana Mata-The mask [045DBC19].mp3
Renamed: 03-168948-Roger Subirana Mata-Thryst.mp3
     to: 03-168948-Roger Subirana Mata-Thryst [5D23E43B].mp3
...
```
</details>


## Contributing
If you noticed a bug or have an idea for a new tag please open an issue with appropriate (GitHub) tags.
If you would like to contribute to the development you can visit [contributing page](CONTRIBUTING.md) designed specially for that.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/idle-code/tempren",
    "name": "tempren",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "batch-renaming, cli, filename",
    "author": "Pawe\u0142 \u017bukowski",
    "author_email": "p.z.idlecode@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/57/a1/fb9644bfda2fbf4d0974d92cdc97da15a68e6545da17d69526995fc78025/tempren-1.1.1.tar.gz",
    "platform": null,
    "description": "# Tempren - template-based file renaming utility\n\n![run-tests](https://github.com/idle-code/tempren/actions/workflows/run-tests.yml/badge.svg)\n[![codecov](https://codecov.io/gh/idle-code/tempren/branch/develop/graph/badge.svg?token=1CR2PX6GYB)](https://codecov.io/gh/idle-code/tempren)\n[![Maintainability](https://api.codeclimate.com/v1/badges/d67f6ebe698b79d75279/maintainability)](https://codeclimate.com/github/idle-code/tempren/maintainability)\n[![PyPI version](https://badge.fury.io/py/tempren.svg)](https://badge.fury.io/py/tempren)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/idle-code/tempren/develop.svg)](https://results.pre-commit.ci/latest/github/idle-code/tempren/develop)\n\n[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/tempren)\n\n`tempren` is a powerful file renaming utility that uses flexible template expressions to generate names for your files.\\\nTag templates can modify original filename, extract metadata from the files or anything in between.\\\nA rich library of built-in tags helps with working with many common file types out-of-the-box.\n\nWhether you need to organize your files, standardize naming conventions, or perform complex renaming tasks, `tempren` can help you get the job done efficiently.\n\n## Features\n- Template-based filename/path generation\n- Built-in Audio/Video/Images metadata extraction tags\n- Ad-hoc tags to leverage external programs for metadata extraction\n- Configurable, metadata-based file selection (filtering) and sorting\n\n## Installation and documentation\nFor comprehensive documentation, including [installation instructions](MANUAL.md#installation), all features, advanced usage, and troubleshooting, please visit the [Manual](MANUAL.md) page.\n\n<!--\n## [Quickstart](QUICKSTART.md)\nFor quick, five-minute introduction to the most of `tempren` features please refer to the [quickstart](QUICKSTART.md) page.\nYou can also take a look on the following examples.\n-->\n\n## Examples\n**Note: When experimenting on your own please use `--dry-run` flag!** \\\n**`tempren` will not override your files by default but invalid template can mangle their names.**\n\n<details>\n<summary>Cleaning up names for sensitive (e.g. FAT32) filesystems</summary>\n\n```commandline\n$ tempren --recursive --name \"%Strip(){%Base()|%Unidecode()|%Sanitize()|%Collapse()}%Ext()\" ./Some\\ OST/\nRenamed: Disk 1/14 - \u63a5\u8fd1.flac\n     to: Disk 1/14 - Jie Jin.flac\nRenamed: Disk 1/02 - \u306a\u3064\u306e\u3042\u304a.flac\n     to: Disk 1/02 - natsunoao.flac\nRenamed: Disk 1/11 - \u706f\u706b-re.flac\n     to: Disk 1/11 - Deng Huo -re.flac\nRenamed: Disk 1/05 - \u8a18\u9332.flac\n     to: Disk 1/05 - Ji Lu.flac\nRenamed: Disk 1/10 - \u3080\u304b\u3057\u3080\u304b\u3057\u3001\u3042\u308b\u3068\u3053\u308d\u306b.flac\n     to: Disk 1/10 - mukashimukashi, arutokoroni.flac\nRenamed: Disk 1/09 - \u963f\u826f\u53e5\u306e\u30c6\u30fc\u30de(\u30cf\u30a4).flac\n     to: Disk 1/09 - A Liang Ju notema(hai).flac\n...\n```\n</details>\n\n<details>\n<summary>Adding resolution to the image files</summary>\n\n```commandline\n$ tempren --name \"%Base()_%Image.Width()x%Image.Height()%Ext()\" ~/Pictures/Wallpapers\nRenamed: 0sa5yfiskqr21.jpg\n     to: 0sa5yfiskqr21_3728x4660.jpg\nRenamed: rkgjq6883fp81.jpg\n     to: rkgjq6883fp81_3024x4032.jpg\nRenamed: lcrkvphf28911.jpg\n     to: lcrkvphf28911_4016x4684.jpg\nRenamed: y6nzcv55k3851.jpg\n     to: y6nzcv55k3851_3784x5670.jpg\nRenamed: 1211740803547.jpg\n     to: 1211740803547_1200x1109.jpg\n...\n```\n</details>\n\n<details>\n<summary>Sorting files into directories based on their MIME type</summary>\n\n```commandline\n$ tempren -dr --path \"%Capitalize(){%Mime(subtype)}/%Name()\" ~/Downloads\nRenamed: dotnet-install.sh\n     to: X-shellscript/dotnet-install.sh\nRenamed: openrgb_0.7_amd64_buster_6128731.deb\n     to: Vnd.debian.binary-package/openrgb_0.7_amd64_buster_6128731.deb\nRenamed: prometheus-2.26.0.linux-amd64.tar.gz\n     to: Gzip/prometheus-2.26.0.linux-amd64.tar.gz\nRenamed: nldb remote.zip\n     to: Zip/nldb remote.zip\nRenamed: artifacts.zip\n     to: Zip/artifacts.zip\nRenamed: 2021-06-11_12-09-34.webm\n     to: X-matroska/2021-06-11_12-09-34.webm\nRenamed: antlr-4.9.2-complete.jar\n     to: Java-archive/antlr-4.9.2-complete.jar\n...\n```\n</details>\n\n<details>\n<summary>Adding checksums to the names of the audio files</summary>\n\n```commandline\n$ tempren --filter-template \"%IsMime('audio')\" --name \"%Base() [%Upper(){%Crc32()}]%Ext()\" ./Roger\\ Subirana\\ Mata\\ -\\ Point\\ of\\ no\\ return\nRenamed: 10-169205-Roger Subirana Mata-Island of light.mp3\n     to: 10-169205-Roger Subirana Mata-Island of light [08E46C33].mp3\nRenamed: 12-169207-Roger Subirana Mata-Tales of trees.mp3\n     to: 12-169207-Roger Subirana Mata-Tales of trees [33EFEC5E].mp3\nRenamed: 11-169206-Roger Subirana Mata-Requiem.mp3\n     to: 11-169206-Roger Subirana Mata-Requiem [5E48759B].mp3\nRenamed: 05-168950-Roger Subirana Mata-The mask.mp3\n     to: 05-168950-Roger Subirana Mata-The mask [045DBC19].mp3\nRenamed: 03-168948-Roger Subirana Mata-Thryst.mp3\n     to: 03-168948-Roger Subirana Mata-Thryst [5D23E43B].mp3\n...\n```\n</details>\n\n\n## Contributing\nIf you noticed a bug or have an idea for a new tag please open an issue with appropriate (GitHub) tags.\nIf you would like to contribute to the development you can visit [contributing page](CONTRIBUTING.md) designed specially for that.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Template-based renaming utility",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/idle-code/tempren"
    },
    "split_keywords": [
        "batch-renaming",
        " cli",
        " filename"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7520cac49b8e7927f3f8907be6fdffe4db613d9f2fc901591f847d9169f5bd1",
                "md5": "ee49cacc1cd2a3de41d7d5250085db58",
                "sha256": "eff3bf5a49539ae9d39bfb95b677bf4fc8e66b54e57ba8d7a00dccf8a0ad145c"
            },
            "downloads": -1,
            "filename": "tempren-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ee49cacc1cd2a3de41d7d5250085db58",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 68846,
            "upload_time": "2024-04-13T11:07:58",
            "upload_time_iso_8601": "2024-04-13T11:07:58.044307Z",
            "url": "https://files.pythonhosted.org/packages/f7/52/0cac49b8e7927f3f8907be6fdffe4db613d9f2fc901591f847d9169f5bd1/tempren-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57a1fb9644bfda2fbf4d0974d92cdc97da15a68e6545da17d69526995fc78025",
                "md5": "1d52c2ffbb1fa0bb2ccb919d83ebe073",
                "sha256": "cf423fc09be6123f4f40e12b01c0bc026cbdce80fcd17a524b89d781218027fb"
            },
            "downloads": -1,
            "filename": "tempren-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1d52c2ffbb1fa0bb2ccb919d83ebe073",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 57633,
            "upload_time": "2024-04-13T11:08:00",
            "upload_time_iso_8601": "2024-04-13T11:08:00.158480Z",
            "url": "https://files.pythonhosted.org/packages/57/a1/fb9644bfda2fbf4d0974d92cdc97da15a68e6545da17d69526995fc78025/tempren-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-13 11:08:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "idle-code",
    "github_project": "tempren",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "tempren"
}
        
Elapsed time: 0.24631s