Renamer 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,142 @@
1
+ = Renamer - The perfect tool to easily rename your files
2
+
3
+
4
+ === Renamer 0.4.0
5
+
6
+ 2006-01-07 Nicolas Cavigneaux <nico@bounga.org>
7
+
8
+ * Corrected renaming files in subdirectories bug
9
+ * Added a function that can do recursive actions on filenames
10
+ * Added Unit Tests
11
+ * Updated README, TODO and Renamer documentation files
12
+ * Added french translation
13
+
14
+ 2006-01-05 Nicolas Cavigneaux <nico@bounga.org>
15
+
16
+ * Updated copyright in all files
17
+ * Updated FSF address in all files
18
+ * Corrected various bugs in capitalize_words method
19
+ * Corrected various bugs in ext method
20
+
21
+ 2005-12-25 Nicolas Cavigneaux <nico@bounga.org>
22
+
23
+ * Added Unit Tests
24
+
25
+ 2005-12-22 Nicolas Cavigneaux <nico@bounga.org>
26
+
27
+ * Error mesages are now print using warn to easily handle verbosity levels
28
+
29
+ 2005-12-22 Nicolas Cavigneaux <nico@bounga.org>
30
+
31
+ * Improved MO creation rake task
32
+ * Updated TODO file
33
+
34
+ 2005-12-16 Nicolas Cavigneaux <nico@bounga.org>
35
+
36
+ * Localized strings using Ruby-GetText
37
+ * Created a Rakefile to easily handle common tasks (see rake -T)
38
+
39
+ 2005-12-15 Nicolas Cavigneaux <nico@bounga.org>
40
+
41
+ * Moved from procedural to OO-code
42
+ * License is now in a constant not in a dediacted function anymore
43
+ * Moved lib/functions.rb to lib/renamer.rb
44
+ * Converted AUTHORS, BUGS, TODO plain-text files to rdoc format
45
+ * Commented code using rdoc
46
+ * Updated renamer.gemspec
47
+ * Updated TODO file
48
+
49
+ 2005-12-13 Nicolas Cavigneaux <nico@bounga.org>
50
+
51
+ * Switched command-line parsing from GetOptLong to OptParse
52
+ * Removed help() function since itsn't needed anymore (lib/functions.rb)
53
+ * Updated TODO file
54
+
55
+ 2005-12-08 Nicolas Cavigneaux <nico@bounga.org>
56
+
57
+ * Corrected typo in help() (lib/functions.rb)
58
+ * Switched renamer documentation (doc/renamer) to rdoc format
59
+ * Updated renamer documentation (doc/renamer)
60
+
61
+ 2005-12-08 Nicolas Cavigneaux <nico@bounga.org>
62
+
63
+ * Converted FAQ, HACKING, README plain-text files to rdoc format
64
+ * Updated AUTHORS, README, FAQ and TODO files
65
+ * Removed timestamps since it's SCM job to track files
66
+ * Added HACKING file
67
+
68
+ 2005-11-21 Nicolas Cavigneaux <nico@bounga.org>
69
+
70
+ * Added one level to release numbers (X.X.X) to be able to release
71
+ often
72
+ * Moved from tar/makefile to Gem packaging system
73
+ * Updated const.rb
74
+
75
+ 2005-05-12 Nicolas Cavigneaux <nico@bounga.org>
76
+
77
+ * Updated my information (website, email) in all files
78
+ * Converted all files to UTF-8 encoding
79
+
80
+ 2005-01-12 Nicolas Cavigneaux <nico@bounga.ath.cx>
81
+
82
+ * Modified ProcBN, renaming using a basename now creates
83
+ filenames using a 4 digits number at the end (0000 up to 9999)
84
+ * Added src/const.rb to easily share constants
85
+ * Updated Makefile to handle src/const.rb
86
+ * Updated src/renamer and src/functions.rb to use Const module
87
+
88
+ 2005-01-05 Nicolas Cavigneaux <nico@bounga.ath.cx>
89
+
90
+ * Updated copyright informations for year 2005
91
+
92
+ 2004-12-30 Nicolas Cavigneaux <nico@bounga.ath.cx>
93
+
94
+ * Added "capitalize", "each word capitalize" and "underscores to
95
+ withespaces" functions
96
+ * Updated man page
97
+ * Corrected "renamer -e '' files*" bug that left a dot at the end
98
+ of filenames
99
+ * Cleaned-up the code, it's now much more maintainable
100
+
101
+ 2004-12-29 Nicolas Cavigneaux <nico@bounga.ath.cx>
102
+
103
+ * Libraries are now stored in /usr/lib/renamer/ according to
104
+ FHS recommendations
105
+ * "#!/usr/bin/ruby -w" was removed from src/functions.rb since
106
+ it mustn't be run alone
107
+
108
+ 2004-12-28 Nicolas Cavigneaux <nico@bounga.ath.cx>
109
+
110
+ * Added version informations (-v trigger)
111
+ * Added doc/renamer.1.gz (Man page) file
112
+ * Removed GPL, INSTALL files
113
+ * Updated AUTHORS, BUGS, COPYING, ChangeLog.gz, FAQ , README, TODO
114
+ files to use the same standard as my other projects
115
+ * Corrected typo of doc/renamer_fr.texi
116
+ * Updated Makefile to handle the structure changes
117
+ * ChangeLog is now "gzip -9"
118
+
119
+ === Renamer 0.3
120
+
121
+ 2004-05-29 Nicolas Cavigneaux <nico@bounga.ath.cx>
122
+
123
+ * Added file permissions handling
124
+ * Error messages are now redirected to stderr
125
+ * Added a function to rename files from an extension to another one
126
+ (renamer -e *.html *.php)
127
+ * Fixed case where the user doesn't give any option on the command-line
128
+
129
+ === Renamer 0.2
130
+
131
+ 2004-03-12 Nicolas Cavigneaux <nico@bounga.ath.cx>
132
+
133
+ * Created the Makefile to automate the installation
134
+ * Added a function to rename files based on file-base-name
135
+
136
+ === Renamer 0.1
137
+
138
+ 2004-02-09 Nicolas Cavigneaux <nico@bounga.ath.cx>
139
+
140
+ * Lowercase the filenames
141
+ * Uppercase the filenames
142
+ * Delete spaces in the filenames
data/doc/FAQ ADDED
@@ -0,0 +1,98 @@
1
+ = Renamer - The perfect tool to easily rename your files
2
+
3
+ <em>Last Modified: 2005-12-08</em>
4
+
5
+
6
+ == 1. Installing
7
+
8
+ === 1.1. I don't understand how to compile Renamer.
9
+
10
+ No problem ! :-)
11
+
12
+ You don't have to compile Renamer because it is written in Ruby. Ruby is a
13
+ scripting language. It means that all the code is interpreted at run time by
14
+ the Ruby interpretor. So to use it, you just have to type :
15
+
16
+ <tt>$ renamer --help</tt>
17
+
18
+ on the command-line if it is well installed.
19
+
20
+ === 1.2. How do I install Renamer on my system?
21
+
22
+ To install Renamer from the official gem, you just must have the Gem packaging
23
+ system installed (http://rubygems.rubyforge.org) and type
24
+
25
+ <tt># gem install -r --source http://download.gna.org/renamer/</tt>
26
+
27
+ and if you've already downloaded the gem, you have to type :
28
+
29
+ <tt># gem install Renamer-X.X.X.gem</tt>
30
+
31
+ where <em>X.X.X</em> has to be replace by the gem version number.
32
+
33
+ This will install all the required files in the good directories. That's all, you can now type :
34
+
35
+ <tt>$ renamer --help</tt>
36
+
37
+
38
+ == 2. Using Renamer
39
+
40
+ === 2.1. Why using Renamer ?
41
+
42
+ Because Renamer makes it easy to rename any number of files on any filesystem
43
+ without knowing anything about shell scripting or regular expressions (regexp).
44
+ Renamer is able to lowercase, uppercase, delete white-spaces and a lot more on
45
+ all file systems.
46
+
47
+ === 2.2. I've launched Renamer, but I'm lost, what can I do?
48
+
49
+ Renamer is very easy to use, if you don't know how to use it you can type :
50
+
51
+ <tt>$ renamer --help</tt>
52
+
53
+ It will show you some help about the possible options and how to use them.
54
+
55
+
56
+ == 3. Development
57
+
58
+ === 3.1. How should I report bugs?
59
+
60
+ You have 4 ways to report bugs:
61
+ * You can submit your bug at this url: http://gna.org/bugs/?func=additem&group=renamer
62
+ * You can subscribe to the "help" mailing-list and send your question to it. See http://gna.org/mail/?group=renamer for more information.
63
+ * You can join us on IRC: <em>irc.freenode.net</em>, and try to contact a developer. If no one can help you (huh?), try another way.
64
+ * You can mail your problem to a developer. Look at the support page for developer's mails: http://gna.org/project/memberlist.php?group=renamer
65
+
66
+ === 3.2. How should I submit patches?
67
+
68
+ There is 3 ways to submit patches:
69
+ * You can submit your patch at this url: http://gna.org/patch/?func=additem&group=renamer
70
+ * You can join us on IRC: <em>irc.freenode.net</em>, and try to contact a developer. If no one can help you (huh?), try another way.
71
+ * You can mail your patch, look at support page for developer's mails: http://gna.org/project/memberlist.php?group=renamer
72
+
73
+ === 3.3. How should I submit new feature request?
74
+
75
+ There is 4 ways to submit your feature request:
76
+ * You can join us on IRC: <em>irc.freenode.net</em>, and try to contact a developer. If no one can help you (huh?), try another way.
77
+ * You can submit your request at this url: http://gna.org/task/?func=additem&group=renamer
78
+ * You can subscribe to the "help" mailing-list and send your request to it. See http://gna.org/mail/?group=renamer for more information.
79
+ * You can mail your feature request, look at support page for developer's mails: http://gna.org/project/memberlist.php?group=renamer
80
+
81
+ === 3.4. Will Renamer be ported to *BSD, QNX, MacOS X, Microsoft Windows ?
82
+
83
+ Yes. In fact, it's surely already usable for these OS and all OS that have a
84
+ Ruby interpreter. Ruby is very portable and we don't have to modify the source
85
+ code to allow it to run on various OS. You have to know that developers use
86
+ Unix-like OS so it's was not tested on Microsoft Windows.
87
+
88
+ === 3.5. I want to help Renamer developers. What can I do?
89
+
90
+ There's many tasks to do (code, documentation, ...). Please contact us
91
+ using IRC or e-mail, and look at this page: http://gna.org/task/?group=renamer.
92
+ It lists all the pending tasks. You can also look at the TODO and BUGS files
93
+ available in the package.
94
+
95
+ === 3.6. Can I give money or other things to Renamer developers?
96
+
97
+ If you really want to do this you can. You should contact a developer to know
98
+ what to do.
@@ -0,0 +1,36 @@
1
+ = Renamer - The perfect tool to easily rename your files
2
+
3
+ In order to keep the code nice and clean we have a few requirements you'll
4
+ need to stick to in order to get your patches accepted.
5
+
6
+ == General Rules
7
+
8
+ * All text files should use Unix-style text format
9
+ * All text files should use UTF-8 as charset
10
+ * All code files should use the .rb extension
11
+ * All existing copyright notices must be retained. You can add your own if necessary
12
+ * All strings should be translatable (Using Ruby-GetText[http://ponx.s5.xrea.com/hiki/ruby-gettext.html])
13
+
14
+ == Coding Style
15
+
16
+ It can be a little annoying to change your coding style if you're used to
17
+ something else, but we need to use only one style to allow people to read
18
+ the code and understand it easily.
19
+
20
+ * Use 4-space tabs for indentation and expand tabs to spaces (if you use VIM, <tt>set ts=4</tt> and <tt>set et</tt>). Don't use tabs at all.
21
+ * Join words of class names by capitalizing the first letter of each word (CamelCase)
22
+ * Join words of method names and variables with underscores
23
+ * Constants should always be in uppercase and should have words separated by undescores
24
+ * Use plural names for arrays, hashes, ...
25
+ * Methods and functions should always have sensible defaults if possible
26
+ * Strings should be defined using double quotes where possible
27
+ * Space should be used liberally - don't be afraid to spread things out a little to gain some clarity. Generally, there should be one space between brackets and normal statements, but no space between brackets and variables, methods or functions
28
+ * For code blocks, use <tt>{ ... }</tt> when they can be written into a single line, otherwise use <tt>do ... end</tt>
29
+ * When setting properties of objects, always use foo= instead of set_foo
30
+ * When a method returns a boolean, always use foo?
31
+
32
+ == Patches
33
+
34
+ * Always provide patches in unified form (diff -u) and with a ChangeLog entry
35
+
36
+ If you think that your patch sticks these requirements you can send it using: http://gna.org/patch/?func=additem&group=renamer
@@ -0,0 +1,23 @@
1
+ = Renamer - The perfect tool to easily rename your files
2
+
3
+ == To Do List
4
+
5
+ Send suggestions for this list to mailto:nico@bounga.org or on
6
+ the mailto:renamer-dev@gna.org mailing list.
7
+
8
+
9
+ === Before next release
10
+
11
+ * Verbose/Quiet modes
12
+ * Overwrite mode
13
+ * Add a method to lowercase/uppercase extensions only
14
+ * Improve "run" method, we should work on absolute pathnames
15
+ * Improve "rename_fs" method (add a random number to the tmp file)
16
+ * Improve execution speed (Benchmark and profile)
17
+
18
+
19
+ === Future releases
20
+
21
+ * Nothing yet ! Any idea ?
22
+
23
+ (Doned items are moved to ChangeLog file)
@@ -0,0 +1,123 @@
1
+ = Renamer - The perfect tool to easily rename your files
2
+
3
+ <b>Documentation for Renamer v0.4</b>
4
+
5
+ <em>Last Modified: 2006-01-07</em>
6
+
7
+ <em>Copyright (c) 2004-2006 by Nicolas Cavigneaux <nico@bounga.org></em>
8
+
9
+ Permission is granted to copy, distribute and/or modify this document
10
+ under the terms of the {GNU General Public License}[http://www.gnu.org/copyleft/gpl.html], Version 2 or later.
11
+
12
+ Last release of this documentation can be downloaded at: http://renamer.bounga.org/index.php?page=doc
13
+
14
+ == Introduction
15
+
16
+ === Description
17
+
18
+ Renamer is a tool that makes it easy to rename any number of files on any filesystem without knowing anything about shell scripting or regular expressions (regexp). Renamer is fast, light and is always evolving.
19
+
20
+ Its main features are :
21
+ * lowercase filenames
22
+ * uppercase filenames
23
+ * delete white-spaces from filenames
24
+ * capitalize filenames
25
+ * capitalize each words in filenames
26
+ * delete spaces in filenames
27
+ * replace underscores by spaces in filenames
28
+ * rename filenames using the specified basename followed by an incremental number
29
+ * rename filenames from their actual extension to the specified one
30
+ * recursive actions
31
+ * run on various operating systems (Gnu/Linux, *BSD, Microsoft Windows, ...)
32
+ * 100% GPL, freesoftware
33
+
34
+ Renamer official website is available at: http://renamer.bounga.org
35
+
36
+ === What you need
37
+
38
+ To install Renamer, you must have:
39
+ * An operating system where a Ruby interpretor (>= 1.8) is available (http://www.ruby-lang.org)
40
+ * RubyGem packaging system (>= 0.8.0) (http://rubygems.rubyforge.org)
41
+ * "root" privileges on your system
42
+
43
+
44
+ == Installation
45
+
46
+ Renamer package can be downloaded at: http://download.gna.org/renamer/Renamer.gem. This link always points to
47
+ the latest stable release of Renamer.
48
+
49
+ Two options are offer to you. You can download the gem and install it using the gem command:
50
+
51
+ <tt>$ su</tt>
52
+
53
+ <tt># gem install Renamer-X.X.X.gem</tt>
54
+
55
+ where <em>X.X.X</em> has to be replace by the gem version number.
56
+
57
+ Or you can use gem to automatically download and install the lastest release of Renamer with the following commands :
58
+
59
+ <tt>$ su</tt>
60
+
61
+ <tt># gem install -r --source http://download.gna.org/renamer/</tt>
62
+
63
+ Developers can be interested in downloading the CVS sources to be able to try or code on the latest
64
+ version of Renamer. But take care, these sources are development files and are reserved to advanced
65
+ users. Using these sources Renamer could be very instable or even unusable. To get the CVS sources,
66
+ use the following command:
67
+
68
+ <tt>cvs -d:pserver:anonymous@cvs.gna.org:/cvs/renamer co renamer</tt>
69
+
70
+
71
+ == Usage
72
+
73
+ To use Renamer, you just have to type the following command in a shell:
74
+
75
+ <tt>$ renamer [OPTION] filename</tt>
76
+
77
+ Available options are described in the next section. You can give one or more filenames as parameter and
78
+ you can use regexp and globs if your shell support it.
79
+
80
+ === Command-line options
81
+
82
+ Available options for Renamer are:
83
+ * -d, --downcase : Downcase filenames
84
+ * -u, --upcase : Upcase filenames
85
+ * -c, --capitalize : Capitalize filenames
86
+ * -w, --word : Capitalize each words in filenames
87
+ * -s, --space : Delete spaces in filenames
88
+ * -U, --underscore : Replace underscores by spaces in filenames
89
+ * -b, --basename : Rename filenames using the specified basename followed by an incremental number
90
+ * -e, --ext : Rename filenames from their actual extension to the specified one
91
+ * -h, --help : Show some help
92
+ * -v, --version : Show Renamer version
93
+ * -l, --license : Show some information about Renamer license
94
+
95
+
96
+ == Authors / Support
97
+
98
+ === Authors
99
+
100
+ Renamer is developed by :
101
+ * Nicolas Cavigneaux <nico@bounga.org> - http://www.bounga.org
102
+
103
+ === Get support
104
+
105
+ Before asking for any support, please consider reading the Renamer documentation and the FAQ.
106
+ The documentation and the FAQ are available in the gem package and on the {official website}[http://renamer.bounga.org].
107
+
108
+ * IRC support:
109
+ - server : irc.freenode.net
110
+ - channel : #bounga
111
+ * Mailing-list support:
112
+ - to subscribe/unsubscribe: http://mail.gna.org/listinfo/renamer-help
113
+ - to send a mail to the list, send it to: renamer-help@gna.org
114
+ - archives of the list are available at: http://mail.gna.org/public/renamer-help/
115
+ * More details are available on the Renamer website support page: http://renamer.bounga.org/index.php?page=support
116
+
117
+ === Copyright
118
+
119
+ This manual documents Renamer software, it's part of Renamer.
120
+
121
+ Copyright (c) 2004-2006 Nicolas Cavigneaux <nico@bounga.org>
122
+
123
+ This document can be use under the terms of the {GNU General Public License}[http://www.gnu.org/copyleft/gpl.html], Version 2 or later.
Binary file
@@ -0,0 +1,39 @@
1
+ =begin
2
+ Copyright (c) 2004-2006 by Nicolas Cavigneaux <nico@bounga.org>
3
+ See COPYING for License detail.
4
+
5
+ This program is free software; you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation; either version 2 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program; if not, write to the Free Software
17
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
+ =end
19
+
20
+ module Const
21
+ NAME = "Renamer"
22
+ VER = "0.4.0"
23
+ LICENSE = "
24
+ Copyright (c) 2004-2006 by Nicolas Cavigneaux <nico@bounga.org>
25
+ See COPIYNG for License detail.
26
+
27
+ This program is free software; you can redistribute it and/or modify
28
+ it under the terms of the GNU General Public License as published by
29
+ the Free Software Foundation; version 2 of the License.
30
+
31
+ This program is distributed in the hope that it will be useful, but
32
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
33
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
34
+ more details.
35
+
36
+ You should have received a copy of the GNU General Public License along with
37
+ this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
38
+ St, Fifth Floor, Boston, MA 02110-1301 USA"
39
+ end