Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukewatts/rename-for-web
Python script which when ran within a directory replaces whitespace with hyphens and makes everything lowercase.
https://github.com/lukewatts/rename-for-web
Last synced: 4 days ago
JSON representation
Python script which when ran within a directory replaces whitespace with hyphens and makes everything lowercase.
- Host: GitHub
- URL: https://github.com/lukewatts/rename-for-web
- Owner: lukewatts
- License: mit
- Created: 2015-12-28T01:51:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-21T01:11:38.000Z (almost 8 years ago)
- Last Synced: 2025-01-10T21:19:28.060Z (5 days ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rename for Web
Python script which when ran within a directory replaces whitespace with hyphens and makes everything lowercase.If the argument `append-dims` is passed, the dimensions of any images will be appended to the end of the file name.
## Features
- Leaves directories unchanged.
- Leaves underscores intact
- Non recursive (only renames files in the directory it is in)## Usage
Given a folder with the following files:```
Product Descriptions 2017.pdf
Product Descriptions 2017.docx
T-Shirt_Large_Red_Design Front and Back.JPG
Long-Sleeve Shirt_Grey_Design on Front.jpg
```### Standard Usage
Running:
```
py rename-for-web.py
```Results in:
```
product-descriptions-2017.pdf
product-descriptions-2017.docx
t-shirt_large_red_design-on-front-and-back.jpg
long-sleeve-shirt_grey_design-on-front.jpg
```### Append dimensions
Running:
```
py rename-for-web.py append-dims
```Results in:
```
product-descriptions-2017.pdf
product-descriptions-2017.docx
t-shirt_large_red_design-on-front-and-back_400x600.jpg
long-sleeve-shirt_grey_design-on-front_800x1200.jpg
```## License
(c) 2017 Luke WattsThis software is licensed under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.