metaclean 4.2.0 → 4.3.1
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/README.md +4 -1
- data/SECURITY.md +4 -1
- data/lib/metaclean/cli.rb +2 -3
- data/lib/metaclean/display.rb +8 -5
- data/lib/metaclean/runner.rb +5 -2
- data/lib/metaclean/version.rb +1 -1
- data/lib/metaclean.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c428b3f2958e89cf07a3cc42602ec6f4716cc30cd7d83ca248830f46884a38a6
|
|
4
|
+
data.tar.gz: b9e573fb8bf73fd0a593ad251d7f38109a38b4c45544774e3f7176d389968bc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38c1773439adfceb3903fa989494813995a84f023c7ac7effe9122d3c603896133635fa9c9ba900cdb65f47ee7efaeb28ede85e9543c74b54ea09efcd520fcad
|
|
7
|
+
data.tar.gz: 23a2d419fd75ee953188252b3ba0ea95e27e6f888fd5a26895e267117e77d6b8d9015220bb5d9f1bc58ed18b84d833e3e4c4a7889883601d333e06be4dce1613
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# metaclean
|
|
2
2
|
|
|
3
|
-
```
|
|
3
|
+
```text
|
|
4
4
|
███╗ ███╗███████╗████████╗ █████╗ ██████╗██╗ ███████╗ █████╗ ███╗ ██╗
|
|
5
5
|
████╗ ████║██╔════╝╚══██╔══╝██╔══██╗██╔════╝██║ ██╔════╝██╔══██╗████╗ ██║
|
|
6
6
|
██╔████╔██║█████╗ ██║ ███████║██║ ██║ █████╗ ███████║██╔██╗ ██║
|
|
@@ -253,6 +253,9 @@ git push origin vX.Y.Z
|
|
|
253
253
|
unverified candidates all exit non-zero.
|
|
254
254
|
- When stdout is redirected, metadata values are redacted by default. Use
|
|
255
255
|
`--show-values` only when the destination log is trusted.
|
|
256
|
+
- Warnings and errors are written to stderr, so privacy notes (surviving tags,
|
|
257
|
+
the `.bak` reminder) stay visible even when normal output is piped or sent
|
|
258
|
+
to a file.
|
|
256
259
|
- External tool versions are recorded in CI and shown by `metaclean --version`.
|
|
257
260
|
Keep OS packages updated; release tests exercise the supported Ruby range and
|
|
258
261
|
capability-check qpdf/ffmpeg output rather than trusting version strings.
|
data/SECURITY.md
CHANGED
|
@@ -46,7 +46,10 @@ clean while such metadata survives is a security issue.
|
|
|
46
46
|
|
|
47
47
|
A non-standard ICC profile (one whose description is not a recognized standard
|
|
48
48
|
color space) blocks commit unless the user explicitly accepts its identifying
|
|
49
|
-
fields with `--allow-icc-metadata`; standard color spaces clean without it.
|
|
49
|
+
fields with `--allow-icc-metadata`; standard color spaces clean without it. This
|
|
50
|
+
determination trusts the profile's own `ProfileDescription`: a profile whose
|
|
51
|
+
description matches a recognized color space is treated as non-identifying, so
|
|
52
|
+
its remaining ICC fields are not flagged.
|
|
50
53
|
|
|
51
54
|
## Supported versions
|
|
52
55
|
|
data/lib/metaclean/cli.rb
CHANGED
|
@@ -25,7 +25,6 @@ module Metaclean
|
|
|
25
25
|
|
|
26
26
|
def run
|
|
27
27
|
parse!
|
|
28
|
-
Display.configure(quiet: @options[:quiet], redact_values: @options[:redact_values])
|
|
29
28
|
Metaclean.ensure_tools!(in_place: @options[:in_place])
|
|
30
29
|
runner = Runner.new(@options)
|
|
31
30
|
if @options[:inspect_only]
|
|
@@ -104,8 +103,8 @@ module Metaclean
|
|
|
104
103
|
|
|
105
104
|
o.separator ''
|
|
106
105
|
o.separator 'Other:'
|
|
107
|
-
o.on('-h', '--help')
|
|
108
|
-
o.on('-v', '--version') do
|
|
106
|
+
o.on('-h', '--help', 'Show this help and exit') { Display.banner; puts o; exit }
|
|
107
|
+
o.on('-v', '--version', 'Show metaclean and tool versions, then exit') do
|
|
109
108
|
Display.banner
|
|
110
109
|
puts "metaclean #{Metaclean::VERSION}"
|
|
111
110
|
puts " exiftool: #{Display.printable(Exiftool.version || 'not found')}"
|
data/lib/metaclean/display.rb
CHANGED
|
@@ -43,10 +43,13 @@ module Metaclean
|
|
|
43
43
|
def color?
|
|
44
44
|
return @color if defined?(@color)
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
@color = if !ENV['NO_COLOR'].to_s.empty?
|
|
47
|
+
false
|
|
48
|
+
elsif !ENV['FORCE_COLOR'].to_s.empty?
|
|
49
|
+
true
|
|
50
|
+
else
|
|
51
|
+
$stdout.tty?
|
|
52
|
+
end
|
|
50
53
|
end
|
|
51
54
|
|
|
52
55
|
def c(text, color)
|
|
@@ -73,7 +76,7 @@ module Metaclean
|
|
|
73
76
|
def section(text); puts c("▸ #{text}", :cyan) unless quiet?; end
|
|
74
77
|
def info(text); puts c(" #{text}", :gray) unless quiet?; end
|
|
75
78
|
def success(text); puts c("✓ #{text}", :green) unless quiet?; end
|
|
76
|
-
def warning(text);
|
|
79
|
+
def warning(text); warn c("⚠ #{text}", :yellow);end
|
|
77
80
|
|
|
78
81
|
def error(text); c("✗ #{text}", :red); end
|
|
79
82
|
|
data/lib/metaclean/runner.rb
CHANGED
|
@@ -159,9 +159,12 @@ module Metaclean
|
|
|
159
159
|
Display.warning "Privacy-relevant tags still present (#{residual.size}):"
|
|
160
160
|
unless Display.quiet?
|
|
161
161
|
residual.each do |key, value|
|
|
162
|
-
|
|
162
|
+
warn " #{Display.c(key, :yellow)} = #{Display.truncate(Display.visible_value(value), 60)}"
|
|
163
163
|
end
|
|
164
164
|
end
|
|
165
|
+
if residual.keys.all? { |key| key.to_s.start_with?('ICC') }
|
|
166
|
+
Display.warning 'Only ICC profile text remains — review it and pass --allow-icc-metadata to accept it.'
|
|
167
|
+
end
|
|
165
168
|
residual
|
|
166
169
|
end
|
|
167
170
|
|
|
@@ -296,7 +299,7 @@ module Metaclean
|
|
|
296
299
|
if summary[:unsupported].positive?
|
|
297
300
|
Display.warning "Unsupported (not cleaned): #{summary[:unsupported]} file(s)"
|
|
298
301
|
end
|
|
299
|
-
|
|
302
|
+
warn Display.error("Failed: #{summary[:failed]}") if summary[:failed].positive?
|
|
300
303
|
Display.info "Total embedded tags removed: #{summary[:removed_total]}"
|
|
301
304
|
if summary[:residual_files].positive?
|
|
302
305
|
Display.warning "Files with privacy residual: #{summary[:residual_files]}"
|
data/lib/metaclean/version.rb
CHANGED
data/lib/metaclean.rb
CHANGED
|
@@ -118,7 +118,7 @@ module Metaclean
|
|
|
118
118
|
missing << 'exiftool' unless Exiftool.available?
|
|
119
119
|
missing << 'mat2' unless Mat2.available?
|
|
120
120
|
missing << 'qpdf' unless Qpdf.available?
|
|
121
|
-
missing << 'ffmpeg'
|
|
121
|
+
missing << 'ffmpeg (with ffprobe)' unless Ffmpeg.available?
|
|
122
122
|
missing << 'cp with metadata preservation' if in_place && !FileOps.metadata_copy_supported?
|
|
123
123
|
return if missing.empty?
|
|
124
124
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metaclean
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Laurent Zogaj
|
|
@@ -42,6 +42,7 @@ licenses:
|
|
|
42
42
|
metadata:
|
|
43
43
|
allowed_push_host: https://rubygems.org
|
|
44
44
|
bug_tracker_uri: https://github.com/26zl/metaclean/issues
|
|
45
|
+
changelog_uri: https://github.com/26zl/metaclean/releases
|
|
45
46
|
documentation_uri: https://github.com/26zl/metaclean#readme
|
|
46
47
|
source_code_uri: https://github.com/26zl/metaclean
|
|
47
48
|
rubygems_mfa_required: 'true'
|