File: TODO

package info (click to toggle)
renameutils 0.12.0-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,840 kB
  • sloc: ansic: 35,308; sh: 4,874; makefile: 118; sed: 16
file content (147 lines) | stat: -rw-r--r-- 3,976 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
run valgrind to look for memory leaks

from Nick Pope: qmv & imv should create directories as needed, so that you can rename into subdirs (like mkdir -p)

from Nick Pope: coloring if the terminal supports it
  [*] Using --command='svn mv'
  [D] mammal/
  [D] mammal/canine/
  [M] mammal_canine_labrador.pdf -> mammal/canine/labrador.pdf
  [-] unmodified_file.txt
  [!] Invalid plan.
legend:
  [D] = created directory = yellow
  [M] = moved file = green (for qmv)
  [C] = copied file = green (for qcp)
  [-] = an unmodified file = normal colour (could only show this with verbosity)
  [*] = information = magenta
  [!] = an error occurred = red

add utf2iso?

now/later? add --import/-I?
test import command

check license (--version/version_etc != README, GPLv2)

---

fix incomplete list in AUTHORS
is use of mv(1) in qcmd completely problem free?
fix all quoting (quote,quotearg) and some error messages

Support -f and -i for imv. (If -f, then don't ask to overwrite and pass mv -f as well.
If -i, then ask to overwrite and pass mv -i as well.)

Merge ac_lib_readline.m4 from microdc

(dual-column) Make option to control minimum accepted number of
spaces between source and destination name.
this will affect even when autowidth is enabled (in that case
it would set the default number of spaces between names).

(editing.c) If input fails, we're left in a bit unsure mode.
what should we do?

Verify multiple arguments with ls (after CHDIR changes)

New option:
-C, --confirm			ask if changes really are to be made
(This is done before calling apply_plan)

Maybe add `help' to format option help?

Deal with more errors:
wrong escape (\ ) sequences in format
renaming dirs - rename no longer exists?
permission in source directory
permission to source file
permission in destination directory
permission to destination file
...

Write replacement wordexp to handle "", wildcards and ~.

Short-hand aliases for all edit-format options:
w for width, etc.

Include `dpat' and `spat' similar utilities?
Include `rename' (perl) clone written in C?

Rename utility:
-w wildcard/glob pattern: two arguments: *.bar *.baz
-r POSIX regular expression: single: s/(.*)\.bar$/$1\.baz/
-t translate characters like perl tr//: "tr/abc/ABC/"
-l lowercase all characters
-u uppercase all characters
-U[WORD-DELIM] uppercase first characters, lowercase rest

Substitution renaming in qmv like perl rename(1)?

---

history
  Displays history in format
   [I..]I YYYY-MM-DD HH:MM S f1 f2..
   I=index, 1-
   S=status: complete (C), partially complete (P), no changed (0)

plan [I]
  Show plan. Also change plan if I is specified.

apply
  Apply changes.

revert
  Revert changes.

list FILE..
  List files

edit
  Edit files in text editor.

---

State diagram

        NoFiles Files   Edited  Partial Complete
ls      *>*>>>>>*>*
edit            *>>>>>>>*>*
apply                   *>*>>>>>*>*>>>>>*>*
revert                  *<*<<<<<*<*<<<<<*<*
plan                    *       *       *

Note that you can never go from Edited to Files/NoFiles!
Once edited, a plan is created. This plan can be serialized.
You'll have to edit again (and lose the plan). So there needs
to be a way to deduce the original file set from the plan.
Therefore the plan is separate from the change set.

State data:
  struct { char *oldname; char *newname; } edit[n]
  struct { char *oldname; char *newname; } plan[m]
  n <= m

---

Rename out-of-dirs is perfectly OK as long as destination file
does not exist. Do not check this ahead of time?
If not checked ahead of time, then we are assuming we are moving
within one filesystems (due to time cost of moving back and
forth).

---

unlist          list
unedit          edit
undo            apply

        NoFiles Files   Edited  Partial Complete
list    +>>>>>>>+
unlist  +<<<<<<<+
edit            >>>>>>>>+
unedit          +<<<<<<<+
apply                   +>>>>>>>+>>>>>>>+
undo                    +<<<<<<<+<<<<<<<+
status  +       +       +       +       +