diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-12 13:24:49 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-12 13:27:07 +0200 |
commit | 03d827e2fbc409ef97829f25b8eeca5204f81a3c (patch) | |
tree | 6099f0feb9adf3425fba87549b164043e18bd0c7 /doc | |
parent | 45cddd072119c5abd7ec076cf28d51ee01f125b7 (diff) | |
download | xutil-03d827e2fbc409ef97829f25b8eeca5204f81a3c.tar.gz |
Re-organize files
Diffstat (limited to 'doc')
-rw-r--r-- | doc/cpy.1 | 48 | ||||
-rw-r--r-- | doc/ep.1 | 33 | ||||
-rw-r--r-- | doc/f.1 | 27 | ||||
-rw-r--r-- | doc/mkmv.1 | 35 | ||||
-rw-r--r-- | doc/ord.1 | 51 | ||||
l--------- | doc/pst.1 | 1 |
6 files changed, 195 insertions, 0 deletions
diff --git a/doc/cpy.1 b/doc/cpy.1 new file mode 100644 index 0000000..3b23b8b --- /dev/null +++ b/doc/cpy.1 @@ -0,0 +1,48 @@ +.Dd $Mdocdate$ +.Dt cpy 1 +.Os +. +.Sh NAME +.Nm cpy +.Nd copy text +. +.Sh SYNOPSIS +.Nm cpy +.Op Ar suffix +.Nm pst +.Op Fl d +.Op Ar suffix +. +.Sh DESCIPTION +.Pp +.Nm cpy +copies text on standard input to /tmp/cpy using +.Nm tee . +.Nm pst +writes the contents of /tmp/cpy on standard output. +If +.Fl d +is present, +.Nm pst +deletes /tmp/cpy after reading it. +.Pp +If +.Ar suffix +is present, +.Nm cpy +and +.Nm pst +append that suffix to the file name. +For example, setting +.Ar suffix +to +.Ql 1 +will copy to and paste from the file /tmp/cpy1. +. +.Sh AUTHORS +.Pp +.Nm cpy +and +.Nm pst +are written by John Ankarström +.Aq Mt john (at) ankarstrom.se . diff --git a/doc/ep.1 b/doc/ep.1 new file mode 100644 index 0000000..95e992d --- /dev/null +++ b/doc/ep.1 @@ -0,0 +1,33 @@ +.Dd $Mdocdate$ +.Dt ep 1 +.Os +. +.Sh NAME +.Nm ep +.Nd edit pipe +. +.Sh SYNOPSIS +.Nm +. +.Sh DESCIPTION +.Pp +.Nm +redirects standard input to a temporary file, +opens it in +.Ev EDITOR +(or +.Xr vi 1 , +if none is set) +and prints the contents of the (edited) file on standard output. +.Pp +.Nm +can be used as a versatile option selector. +The following sequence is a quick way to delete all lines but the current in +.Xr vi 1 : +.Dl :.w! +. +.Sh AUTHORS +.Pp +.Nm +is written by John Ankarström +.Aq Mt "john (at) ankarstrom.se" . @@ -0,0 +1,27 @@ +.Dd $Mdocdate$ +.Dt f 1 +.Os +. +.Sh NAME +.Nm f +.Nd fmt but with new sentence on new line +. +.Sh SYNOPSIS +.Nm f +.Op Ar arg ... +. +.Sh DESCIPTION +.Pp +.Nm +runs +.Xr fmt 1 +with any given +.Ar arg +in a way such that each new sentence begins on a new line. +Sentence breaks are recognized if the period in the original text +is followed by two spaces or a newline. +.Sh AUTHORS +.Pp +.Nm +is written by John Ankarström +.Aq Mt john (at) ankarstrom.se . diff --git a/doc/mkmv.1 b/doc/mkmv.1 new file mode 100644 index 0000000..7087769 --- /dev/null +++ b/doc/mkmv.1 @@ -0,0 +1,35 @@ +.Dd $Mdocdate$ +.Dt mkmv 1 +.Os +. +.Sh NAME +.Nm mkmv +.Nd move files to new directory +. +.Sh SYNOPSIS +.Nm +.Fl t Ar target +.Ar file ... +. +.Sh DESCIPTION +.Pp +.Nm +moves the specified files into a new directory named +.Ar target . +It correctly handles the (not uncommon) case +where one of the moved files has the same name +as the target directory. + +Note that +.Nm +does not support the argument syntax of +.Xr mv 1 . +The explicit +.Fl t +flag is obligatory. +. +.Sh AUTHORS +.Pp +.Nm +is written by John Ankarström +.Aq Mt john (at) ankarstrom.se . diff --git a/doc/ord.1 b/doc/ord.1 new file mode 100644 index 0000000..9ab54a5 --- /dev/null +++ b/doc/ord.1 @@ -0,0 +1,51 @@ +.Dd $Mdocdate$ +.Dt ord 1 +.Os +. +.Sh NAME +.Nm ord +.Nd re-order files with numeric indices +. +.Sh SYNOPSIS +.Nm +.Op Fl n Ar "number width" +.Op Fl s Ar separator +.Ar file ... +. +.Sh DESCIPTION +.Pp +.Nm +is a convenient utility for re-ordering numerically indexed files, i.e. files with names beginning with +.Ql 01.\ , +.Ql 02.\ +and so forth. +Among other things, it is useful for managing disk-based playlists. + +Given any number of files as arguments, +.Nm +will open a temporary text file in your +.Ev EDITOR , +in which you can re-order the files by re-ordering lines. +Save the file and exit the text editor to change the names of the files to reflect the new order. + +The +.Fl n +and +.Fl s +control the format of the numeric indices expected and created by +.Nm . +Their respective default values are 2 and +.Ql .\ . + +Note that +.Fl n +and +.Fl s +cannot be used to change the format of existing numeric indices. +Such functionality is not provided by +.Nm . +.Sh AUTHORS +.Pp +.Nm +is written by John Ankarström +.Aq Mt john (at) ankarstrom.se . diff --git a/doc/pst.1 b/doc/pst.1 new file mode 120000 index 0000000..0ececb2 --- /dev/null +++ b/doc/pst.1 @@ -0,0 +1 @@ +cpy.1
\ No newline at end of file |