{ "info": { "author": "Mike Miller", "author_email": "mixmastamyk@github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries", "Topic :: System :: Filesystems", "Topic :: Terminals" ], "description": "\nMike-rosoft Power File Renamer (c) 2003-2019\n==============================================\n\nA tool to rename large numbers of files, such as MP3s or images.\nRecently ported to Python 3.6+ from ancient untouched 2.0-era source complete\nwith silly name.\n\nBackground\n-----------------------\n\nThis tool does string updates on filenames in the order that\nthey occur on the command-line.\nThis is done so that results are consistent with expectations.\nIf modifications interact in unfortunate ways,\nthey may be reordered to suit.\nThis was a design goal.\n(The final rename happens once however.)\n\nConsequently, when performing many operations on a\n*absolutley huge* number of files,\nit might be less than instantaneous,\ndue to the inefficiencies of looping through the argument list for each file.\nIn such case you can run fewer operations per run, or change a subset of files\nat a time.\nAs many filesystems are unhappy with huge numbers of files in a single folder,\nthis limitation hasn't been found to be a problem in practice so far.\n\n\nNote that the term PRN (from *pro re nata* in Latin),\nis used in the medical industry as an abbreviation for *as needed*.\nTherefore use ``prn`` as needed and directed under the supervision of a\nphysician.\n\n *All information, content, and material of this website is for informational\n purposes only and are not intended to serve as a substitute for the\n consultation, diagnosis, and/or medical treatment of a qualified physician\n or healthcare provider.*\n\n *\"Do not taunt P.R.N. Accept no substitutes!\"*\n\n\nInstallen-Sie, Bitte\n-----------------------\n\n.. code-block:: shell\n\n \u23f5 pip3 install [--user] prn\n\n\nExamples\n-----------------------\n\nA quick start with something simple\u2014\\\nto replace underscores with spaces on some mp3s,\ntry this,\nis shown below:\n\n.. code-block:: shell\n\n \u23f5 prn --replace _ ' ' *.mp3\n\nDon't worry\u2014this will simply show a preview of the results and won't do\nanything until confirmed,\nas we'll see later.\nFeel free to experiment, help is available of course:\n\n.. code-block:: shell\n\n \u23f5 prn -h #\u00a0or --help\n\nNote: --longform options in the following examples have one-letter\nabbreviated aliases that are typically the first letter of the long form, e.g.:\n\u00a0``--replace`` becomes ``-r``.\n\nAlso, all options of ``prn`` can be passed multiple times,\nallowing more to be done in a single invocation and enabling relatively complex\nscenarios.\n\n\nFile Selection\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere are several ways to select files for renaming.\n\n- As seen above,\n one may select several files from a folder holding additional files,\n by simply placing them on the command-line,\n with or without shell wildcard expansion:\n\n .. code-block:: shell\n\n \u23f5 prn \u2026 foo.bar *.mp3\n\n- In a folder with large numbers of files,\n command-line limits may be bypassed with ``--match 'GLOB'`` as shown below:\n\n .. code-block:: shell\n\n \u23f5 prn --match '*.mp3' # OP1 OP2\u2026\n\n- As one may want to exclude some of the files gathered, filter is available::\n\n \u23f5 prn --filter 'Rick Astley*' # Never gonna\u2026\n\n Match and filter may be passed multiple times to add to or subtract from the\n selected file set.\n\n*\"You may dispense with the pleasantries Commander\u2026\"*\n\n- Additionally, if there are no extraneous files in the current folder,\n selection criteria may be omitted.\n A selection of all files in the current folder will be used instead:\n\n .. code-block:: shell\n\n \u23f5 prn --replace _ ' '\n\n\nRecursive Mode\n++++++++++++++++\n\nThis will find files in and below the current folder.\n\nWhen in recursive mode, note that currently folders aren't renamed. Too\nmany issues came up,\nso to rename folders you'll have to rename from each parent folder.\n\n.. code-block:: shell\n\n # all mp3s at or below this folder:\n \u23f5 prn -R --match '*.mp3' --replace _ ' '\n\n\nNote that the glob method oddly requires a ``'**/'`` before the folder you want\nto walk.\nPower renamer handles that for you when a relative path is passed to match.\nWhen an absolute path is passed, you must handle it yourself.\n\n\nRegular Expression Substitutions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen what you want to replace varies a bit between filenames,\nuse a regex:\n\n.. code-block:: shell\n\n # collapse consecutive whitespace to a single space\n \u23f5 prn --re-sub '\\s+' ' '\n\nNow you've got two problems, *wink.*\n\n\nPadding Frame Numbers\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis option is relatively inflexible but did the one thing I needed:\n\n.. code-block:: shell\n\n \u23f5 prn --zfill 4 *.tif\n\n foo.3.tif \u2502 foo.0003.tif\n foo.4.tif \u2502 foo.0004.tif\n\nPerhaps a more general pad function might be useful.\n\n\nSwapping Text Trick\n~~~~~~~~~~~~~~~~~~~~~~\n\nThe zfill operation above,\nfor example,\nmay be problematic if there are digits before the desired group:\n\n.. code-block:: shell\n\n \u23f5 prn -z 4 *.tif\n\n foo1.3.tif \u2502 foo0001.3.tif #\u00a0Oops\n foo1.4.tif \u2502 foo0001.4.tif\n\n\nDoh, one way to get around this (that can help in several other situations) is\nto hide the problem section by replacing it,\nthen later returning it to its original form:\n\n.. code-block:: shell\n\n # replace, pad, then return\n \u23f5 prn -r foo1 @ -z 4 -r @ foo1 *.tif\n\n foo1.3.tif \u2502 foo1.0003.tif\n foo1.4.tif \u2502 foo1.0004.tif\n\nThis works since operation arguments are processed in order from left to right.\nUse a character for substitution that is not being used in the filenames,\nof course.\nHere we used the \"``@``\" symbol.\n\n\nOperations\n~~~~~~~~~~~~~~\n\nNumerous helpful string operations are also available:\n\n- ``-c --capitalize``\n- ``-l --lower --lower-ext``\n- ``-u --upper``\n- ``-s --strip``\n- ``--insert STR --append STR --prepend STR``\n\nSee ``-h`` for further details.\n\n\nRefine It!\n~~~~~~~~~~~~~~\n\nAt this point,\nyou'll likely update the command-line a few times,\nuntil things are just to your liking,\nin terms of file selection and output filenames.\n\nHitting the up arrow in the shell often brings your last command-line back for\nediting,\nthen hitting enter to see the results is a simple\nmatter.\n\n\nCommit Changes\n-----------------------\n\nOnce happy with the changes,\nfinalize them with ``-e`` or ``--execute`` like so:\n\n.. code-block:: shell\n\n \u23f5 prn --OP1 --OP2\u2026 -e\n\n\n*Whoomp! There it is.*\n\n\nSafety\n--------\n\n``prn`` is written with safety in mind.\n\nIt won't make changes until you are happy with the results and pass the execute\nflag.\nIt won't rename files to destinations that already exist,\nand will notify you right away when they do.\nDespite its version number it has been used for (pushing two) decades now.\n\nHowever, as mentioned it was ported recently to Python3.\nThere is a test suite but it is not currently large.\nTherefore:\n\n*\u261b \u00a0Make a backup before trusting with large or important file collections. \u261a*\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mixmastamyk/prename", "keywords": "file files rename renamer", "license": "LGPL 3", "maintainer": "", "maintainer_email": "", "name": "prn", "package_url": "https://pypi.org/project/prn/", "platform": "", "project_url": "https://pypi.org/project/prn/", "project_urls": { "Homepage": "https://github.com/mixmastamyk/prename" }, "release_url": "https://pypi.org/project/prn/0.81/", "requires_dist": null, "requires_python": "", "summary": "A powerful script to rename files. Better, stronger, faster.", "version": "0.81" }, "last_serial": 5908786, "releases": { "0.80": [ { "comment_text": "", "digests": { "md5": "5a60619777aa414225f93b8e104cbe31", "sha256": "34564c091b921d5fdd84e407ce079d9a6a0d89beb3dd51a738faee782e768025" }, "downloads": -1, "filename": "prn-0.80-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5a60619777aa414225f93b8e104cbe31", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 20439, "upload_time": "2018-12-31T20:47:17", "url": "https://files.pythonhosted.org/packages/14/ea/038a50f1b0655c6db2d1a6ba8a11867c853a6d918a7987982b1a54923b12/prn-0.80-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ec6cf47cade7ca4a6473c6821a6fbd9", "sha256": "c08ea64df32b6c40902db911bc5f892242be6214fd4a174c1c0f85a3990ae1b9" }, "downloads": -1, "filename": "prn-0.80.tar.gz", "has_sig": false, "md5_digest": "5ec6cf47cade7ca4a6473c6821a6fbd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8309, "upload_time": "2018-12-31T20:47:15", "url": "https://files.pythonhosted.org/packages/d2/fd/b13a7fdd96d696d0d581c322a4676daa63c65a9ff5b1760e584f7690571d/prn-0.80.tar.gz" } ], "0.81": [ { "comment_text": "", "digests": { "md5": "0fc65fc4e4619ad6112ca47129df3489", "sha256": "a020ee253b193fdf29e3edd8e4d862ad5675bcaf631337adc9b2bfebd9dcd563" }, "downloads": -1, "filename": "prn-0.81-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0fc65fc4e4619ad6112ca47129df3489", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 21727, "upload_time": "2019-09-30T20:18:10", "url": "https://files.pythonhosted.org/packages/8c/df/1961b07870adbaa16e85b81ef316f8faf0faa083a17d785b043d5e76f921/prn-0.81-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27348dba26443075e337afd0c44beba7", "sha256": "556bd93fd1aa873dd0baced7ea7a86a98dd7d6b922ff1853f9656ddda97086ad" }, "downloads": -1, "filename": "prn-0.81.tar.gz", "has_sig": false, "md5_digest": "27348dba26443075e337afd0c44beba7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9568, "upload_time": "2019-09-30T20:18:08", "url": "https://files.pythonhosted.org/packages/cd/7a/bc70b53e71d0a6640b49d4655b1042b57bbe62dedf011ec5703eea43897a/prn-0.81.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0fc65fc4e4619ad6112ca47129df3489", "sha256": "a020ee253b193fdf29e3edd8e4d862ad5675bcaf631337adc9b2bfebd9dcd563" }, "downloads": -1, "filename": "prn-0.81-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0fc65fc4e4619ad6112ca47129df3489", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 21727, "upload_time": "2019-09-30T20:18:10", "url": "https://files.pythonhosted.org/packages/8c/df/1961b07870adbaa16e85b81ef316f8faf0faa083a17d785b043d5e76f921/prn-0.81-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27348dba26443075e337afd0c44beba7", "sha256": "556bd93fd1aa873dd0baced7ea7a86a98dd7d6b922ff1853f9656ddda97086ad" }, "downloads": -1, "filename": "prn-0.81.tar.gz", "has_sig": false, "md5_digest": "27348dba26443075e337afd0c44beba7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9568, "upload_time": "2019-09-30T20:18:08", "url": "https://files.pythonhosted.org/packages/cd/7a/bc70b53e71d0a6640b49d4655b1042b57bbe62dedf011ec5703eea43897a/prn-0.81.tar.gz" } ] }