Giter Site home page Giter Site logo

fmutils's Introduction

                                FMUtils

FMUtils are a set of POSIX scripts that implement some handy file
management utilities.  Each script has its respective manual page.

The scripts are the following.
• bulkrename: Bulk rename files with your text editor.
• pick:       Interactivelly select options.
• preview:    Generate text preview of a file to be used by lf(1) or ranger(1).
• skel:       Create a template file in the current directory.
• trash:      Move files to trash following XDG trash specification.
• untrash:    Remove files from trash following XDG trash specification.
• unpack:     Unarchive archived files (.zip, .rar, .tar.gz, etc).
• xopen:      Open file or URL with an application.


§ Installation

First, edit ./config.mk to match your local setup.

Since FMUtils are just script, they do not need to be built.

By default, FMUtils are installed into the /usr/local prefix.  Enter the
following command to install FMUtils (if necessary as root).  This command
installs the scripts into the ${PREFIX}/bin/ directory, and the manual
pages into the ${MANPREFIX}/man1/ directory.

	make install


§ Running FMUtils

The following are examples of how to use FMUtils.

Bulk rename all files in the current directory:
	$ ls | bulkrename

Bulk rename all .jpg files in the ~/Downloads directory:
	$ bulkrename ~/Downloads/*.jpg

Pick can be used to interactivelly remove files with rm(1).  This
example is equivalent to `rm -i`, but can be used with other commands
that, unlike rm(1), does not provide a -i option.
	$ rm $(pick *)

The previous example rely on the condition that each filename does not
contain space on it.  The following example avoid this by using a
quotion option, such as -q on pick(1), and a pipe into xargs(1):
	$ pick -q * | xargs rm

Add the following line to your ~/.config/lf/lfrc to use preview(1) as
file previewer.
	set previewer preview

Move all .jpg files to trash:
	$ trash *.jpg

Remove all .jpg files from trash (the environment variable $TRASH is
supposed to have the path of the trash)
	$ untrash $TRASH/files/*.jpg

Extract the content of file.zip into your home directory.
	$ unpack file.zip $HOME

Open a file with the default application specified, as specified in the
file whose path is in the environment variable $MIMEFILE.
	$ xopen file.jpg


§ License

This software is in public domain and is provided AS IS, with NO WARRANTY.

fmutils's People

Contributors

phillbush avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.