renumber 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -15
- data/bin/renumber +6 -2
- data/lib/renumber/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9654aa59b77f3dbdecddd4c6b3778f78a09d3da1
|
4
|
+
data.tar.gz: 3f7bcf9d1babdf44771b51777e0d70ecbcaa197a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7095d390584635847311ffb7db425b09e80485393291de11bb8abb8c73f28c91e7441cb45442c43c7eaec0b4d326d54ffc008d3ecd728f928be2230ae46dbc2
|
7
|
+
data.tar.gz: fcd33e53b2c24f5fad06c354b91d7f8c9f57c47d47d3bfd9f150f9958e34670148cd2530be6c9dff77e8b86f4b61e7a8ca53fed148517ca1b00565e6ce1cc45c
|
data/README.md
CHANGED
@@ -1,30 +1,21 @@
|
|
1
1
|
# Renumber
|
2
2
|
|
3
3
|
This simple utility allows renaming non-sequential files to be sequentially numbered.
|
4
|
-
For example given input files: input00.txt, input03.txt, input99.txt it changes their
|
5
|
-
name to: f0.text, f1.text, f2.text
|
6
4
|
|
7
|
-
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'renumber'
|
13
|
-
```
|
5
|
+
For example given input files: `input00.txt`, `input03.txt`, `input99.txt` it can change their
|
6
|
+
names to: `f0.text`, `f1.text`, `f2.text`
|
14
7
|
|
15
|
-
|
16
|
-
|
17
|
-
$ bundle
|
8
|
+
## Installation
|
18
9
|
|
19
|
-
|
10
|
+
Add the command line utility using Ruby's gem command:
|
20
11
|
|
21
12
|
$ gem install renumber
|
22
13
|
|
23
14
|
## Usage
|
24
15
|
|
25
|
-
|
16
|
+
From the command line specify a directory name and optional prefix and suffix:
|
26
17
|
|
27
|
-
$ renumber directory_name [prefix] [suffix]
|
18
|
+
$ renumber directory_name [prefix] [suffix]
|
28
19
|
|
29
20
|
## Contributing
|
30
21
|
|
data/bin/renumber
CHANGED
@@ -4,6 +4,10 @@ require 'renumber'
|
|
4
4
|
|
5
5
|
include Renumber
|
6
6
|
|
7
|
-
puts 'Usage: renumber directory_name [prefix] [suffix]' unless ARGV[0]
|
7
|
+
puts 'Usage: renumber directory_name [prefix] [suffix]' and return unless ARGV[0]
|
8
8
|
|
9
|
-
|
9
|
+
begin
|
10
|
+
change_files ARGV[0], ARGV[1], ARGV[2]
|
11
|
+
rescue ArgumentError => e
|
12
|
+
puts e.message
|
13
|
+
end
|
data/lib/renumber/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Aschenbach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|