Sha256: e3bfe92a0bde76abc38b06084a967ffc982f03bb6c1e5fdf944b2c1f326e2e98
Contents?: true
Size: 1.32 KB
Versions: 7
Compression:
Stored size: 1.32 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true # encoding: UTF-8 # (c) ANB Andrew Bizyaev module PhTools tool_name = File.basename(__FILE__) require tool_name.to_s file_type = FILE_TYPE_IMAGE + FILE_TYPE_VIDEO + FILE_TYPE_AUDIO usage = <<~DOCOPT *************************************************** phtools - *Keep Your Photos In Order* (c) ANB *************************************************** #{tool_name} changes an input file's modify-date according to the date encoded in the filename (date-time-in-the-name). Therefore the file should be renamed to phtools Standard Name before using this command (use phrename for this). #{tool_name} acts as a 'filter' program meaning it expects the input files to be passed to STDIN and after the job is done it produces STDOUT with the list of processed files. In other words this command is intended to be used with other programs connected via pipes, e.g.: phls | phrename -a anb | #{tool_name} | phmove ~/targed/folder Usage: #{tool_name} [-D] #{tool_name} -h | --help #{tool_name} -v | --version Options: -D --debug Turn on debugging (verbose) mode -h --help Show this screen. -v --version Show version. DOCOPT PhTools.const_get(tool_name.capitalize).new(usage, file_type).run! end
Version data entries
7 entries across 7 versions & 1 rubygems