ffw

command module
v0.1.1-0...-6916117 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 6 Imported by: 0

README

ffw - Friendly Files for the Web

Easily rename files from a folder to be compatible with the web

Run ffw and that's it!

Installation

  • on macOs
brew tap neonima/ffw
brew install ffw
  • with golang
go get github.com/neonima/fftw
  • 👉 for other platform go the release page and download the binaries you'll need

Usage

Problem

Say that you have these crappy png named files in ./src/images

- src/images/Le fichier galère à renommer 1.png
- src/images/Le fichier galère à renommer 2.png
- src/images/Le fichier galère à renommer 3.png
- src/images/Le fichier galère à renommer 4.png

Solution

simply run cd src/images && ffw or with the source (-s) flag ffw -s ./src/images

- src/images/le_fichier_galere_a_renommer_1.png
- src/images/le_fichier_galere_a_renommer_2.png
- src/images/le_fichier_galere_a_renommer_3.png
- src/images/le_fichier_galere_a_renommer_4.png

Problem

Say that you received crappy png named files alongside files you do not wish to rename

- src/images/mon fichier custom.jeanclaudevandamn
- src/images/Le fichier galère à renommer 1.png
- src/images/Le fichier galère à renommer 2.png
- src/images/Le fichier galère à renommer 3.png
- src/images/Le fichier galère à renommer 4.png

Solution

Add -e=[.your_extension1,.your_extension2]

simply run cd src/images && ffw -e=.png or ffw -s ./src/images -e=.png

- src/images/mon fichier custom.jeanclaudevandamn
- src/images/le_fichier_galere_a_renommer_1.png
- src/images/le_fichier_galere_a_renommer_2.png
- src/images/le_fichier_galere_a_renommer_3.png
- src/images/le_fichier_galere_a_renommer_4.png

How can I check how the files will be changed?

For dry run use -d flag

Help page

NAME:
   ffw - A dead simple tool to rename your file for smooth web access!

USAGE:
   main [global options] command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --recursive, -r               Use this flag is you want to rename files recursively (default: false)
   --extensions value, -e value  Only rename the specified extensions
   --source value, -s value      source path where to rename files
   --dry, -d                     shows all the file that will be modified with their new name (default: false)
   --help, -h                    show help (default: false)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL