2017-09-07

rate

sort files into directories with numerical names

installation

download

alternatively see releases

or run "git clone git://git.sph.mn/sph-rate"

link or copy the script files into a directory which is in the environment variable $PATH

dependencies

guile

sph-lib

command-line programs

they all take care not to overwrite files

rate

parameters
  options ... number path ...
description
  this program "rates" files by moving them into a numerically named directory.
  first it searches upwards to see if a numeric directory name exists in path, if yes, the
  relative directory structure of the given path is moved on that level into a directory named like the given number.
  if no numeric directory exists in path, and the current working directory is in path, a directory named like the given number is created
  in the current working directory and the given path is moved there. otherwise nothing happens.
  examples:
  rate 2 /a/0/b/c -> /a/2/b/c
  cwd: /a/b
  rate 2 /a/b/c -> /a/b/2/c
  cwd: /
  rate 2 /a/b/c -> /2/a/b/c
options
  --help | -h
  --interface

searches upwards until it finds a directory with a numerical name, then it inserts all files given as arguments at that level into a directory with the given rating-name. the directory does not need to previously exist. the directory structure below the rating-name directory is preserved

example

file: 0/test/a

command: rate 2 a

the file is moved to 2/test/a

rate-modify

parameters
  options ... direction difference path ...
description
  this program changes the rating of files relative to their current one.
  direction can be "up" or "down".
  a rating is designated by a numeric directory in the path unequal to the current path.
  see the "rate" program for more information
options
  --help | -h
  --interface

like "rate" but subtracts from or adds to the current relative numeric rating-directory to create the target path

example

rate-modify down 1 afile

gui-versions

suited to be used as custom right-click commands on file selections, for example with "thunar"

they take additional input from a graphical dialog window

gui-move

enter a directory-name, which does not need to exist

the files given as arguments will be moved into a directory with the given name

example of right-click commands in thunar


tags: application program overview start computer rate