mvb 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/exe/mvb +15 -1
- data/lib/mvb/version.rb +1 -1
- metadata +6 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f52946fe658cc5bcd3a37a90dbc0fad9c334c25dad48dab750f1bd084a6438cd
|
|
4
|
+
data.tar.gz: 27740c082628cedc8e9d5bf40a8519b1172527a48a5e5dc768b494261668aa0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 905eea5055c13151a502cc6f3d6984bd23e4a82ebd3ff49f6129fa3729126d33cd7642c8d7d4a3dc005d723c66d0c62ca05a22852437a0462b2a3d91a50b00f1
|
|
7
|
+
data.tar.gz: 4f88e22c25b5d1cc5081b106abde06eef3fa0e5ef52f98a19e27a6d5e13e4280d111028fbc631e116fa848611acd74480d59a3e6886cec81c3ade78b96a20914
|
data/exe/mvb
CHANGED
|
@@ -73,7 +73,7 @@ EXAMPLES OF USAGE:
|
|
|
73
73
|
book3.txt --> libro3.txt
|
|
74
74
|
book4.txt --> libro4.txt
|
|
75
75
|
|
|
76
|
-
EXAMPLE 3 - Dry-run of replacement
|
|
76
|
+
EXAMPLE 3 - Dry-run of replacement, with sequential numbering
|
|
77
77
|
|
|
78
78
|
$ mvb "book\\d" "libro#3"
|
|
79
79
|
book1.txt --> libro3.txt
|
|
@@ -81,6 +81,15 @@ EXAMPLES OF USAGE:
|
|
|
81
81
|
book3.txt --> libro5.txt
|
|
82
82
|
book4.txt --> libro6.txt
|
|
83
83
|
|
|
84
|
+
EXAMPLE 4 - Dry-run of replacement, with sequential numbering and increments of 2
|
|
85
|
+
|
|
86
|
+
$ mvb "book\d" "libro#3" -i 2
|
|
87
|
+
book1.txt --> libro3.txt
|
|
88
|
+
book2.txt --> libro5.txt
|
|
89
|
+
book3.txt --> libro7.txt
|
|
90
|
+
book4.txt --> libro9.txt
|
|
91
|
+
|
|
92
|
+
|
|
84
93
|
EOM
|
|
85
94
|
|
|
86
95
|
opt_parser = OptionParser.new do |opts|
|
|
@@ -108,6 +117,11 @@ opt_parser = OptionParser.new do |opts|
|
|
|
108
117
|
exit
|
|
109
118
|
end
|
|
110
119
|
|
|
120
|
+
opts.on("-v", "--version", "Show gem version") do
|
|
121
|
+
puts "mvb version: #{Mvb::VERSION}"
|
|
122
|
+
exit
|
|
123
|
+
end
|
|
124
|
+
|
|
111
125
|
end
|
|
112
126
|
|
|
113
127
|
# Parse the options and store remaining arguments as positional
|
data/lib/mvb/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,31 +1,23 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mvb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Manuel Fuenmayor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-10-
|
|
11
|
+
date: 2024-10-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
|
-
This is a simple-to-use command-line gem to rename batch of files (or folders) using regex patterns. Sequential numbering feature is also added to re-define (or
|
|
14
|
+
This is a simple-to-use command-line gem to rename batch of files (or folders) using regex patterns. Sequential numbering feature is also added to re-define (or establish) numbered files.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
mvb [-s,--search] "REGEX_PATTERN" [-r,--replacement] ["REPLACEMENT"] [-f,--force] [-i,--step N] [-h, --help]
|
|
18
|
-
|
|
19
|
-
The "search" and "replacement" arguments can be entered based on position (i.e. no need for a tag).
|
|
20
|
-
|
|
21
|
-
Structure using positional arguments:
|
|
22
|
-
mvb "REGEX_PATTERN" ["REPLACEMENT"] [tag options...]
|
|
23
|
-
|
|
24
|
-
Supported regex syntax follows PCRE convention, which is very similar to the one used by VS Code.
|
|
16
|
+
Supported regex follows PCRE convention which is very similar to the one used by VSCode.
|
|
25
17
|
|
|
26
18
|
At this stage, this program is designed to rename files located at root folder. Therefore, you would need first to change directory to the location of the files to use mvb.
|
|
27
19
|
|
|
28
|
-
For
|
|
20
|
+
For full documentation, use "mvb -h".
|
|
29
21
|
email: manuel.fuenmayor98@gmail.com
|
|
30
22
|
executables:
|
|
31
23
|
- mvb
|
|
@@ -57,6 +49,5 @@ requirements: []
|
|
|
57
49
|
rubygems_version: 3.5.20
|
|
58
50
|
signing_key:
|
|
59
51
|
specification_version: 4
|
|
60
|
-
summary: A
|
|
61
|
-
capabilities.
|
|
52
|
+
summary: A gem to rename batch of files using regex, with sequential numbering capabilities.
|
|
62
53
|
test_files: []
|