viewworkbook 1.0 → 1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf982468005b8fada83fa4ab8bec2977fcf98c4d5758233aa58f86608396de36
4
- data.tar.gz: efdb779b9b3f8431fada873ec0644af79b84de2f5a1f23253179dc73e8de6f30
3
+ metadata.gz: 85b7c9328b02b372b95e8381b81bf5bb759715a7dc808401465f2d9cad87270c
4
+ data.tar.gz: 451a5a49bca0f59daace157bfee46330079c27726f708c50653c228010504688
5
5
  SHA512:
6
- metadata.gz: 74c90225643b12b3ad80eb2e600f01fc8b2d840f89d4cc4c6e59feb1aa9bb57e459a4953a3f3be1342eca935bff15cdd851aa982875d03cebf0e4cdd5288308c
7
- data.tar.gz: 0f6e429179e1e87ea7a571ee9e6fa569bbff0e0d11090c1bc1ec0be8c942666a32ef7f0cd75adf7a23fb5350cf3cab91e03a9b1d443135f6e5dab176104bc031
6
+ metadata.gz: faf90e01169b447c1e58f04c27d7de25fcb8744a0d06ba379f1e33de8a1843b64aea0521d290f9d24dcaa9b6eebac59d0b56780d5fec081640db262181a0b2ed
7
+ data.tar.gz: 6885f8edb5e6cf4c21a32ca56d3e8c2ffb6dfaff4459e0824080fb00c59c15e7803c1145eed05e2dc1515f6d88db1b7acc13d17e037e424f06338f2874776c61
data/bin/viewworkbook CHANGED
@@ -25,9 +25,19 @@ BasicLogging::set_level BasicLogging::INFO
25
25
  # BasicLogging::set_target "/tmp/viewworkbook.log"
26
26
  # BasicLogging::set_level BasicLogging::DEBUG
27
27
 
28
+ def usage
29
+ msg = '' << 'Usage: '
30
+ msg << yellow("\n\tviewworkbook [file]")
31
+ msg << "\n\tWhere \"file\" is a spreadsheet file."
32
+ puts msg
33
+ end
34
+
28
35
  if(ARGV.compact.empty?)
29
36
  puts purple("\n\tYou must name a valid spreadsheet file! Aborting\n")
37
+ usage
30
38
  puts
31
39
  exit false
32
40
  end
33
41
  ViewWorkBook.new(ARGV[0])
42
+
43
+
data/changes.txt ADDED
@@ -0,0 +1,5 @@
1
+ V. 1.2
2
+ Missing dependency added to gemfile: io-console
3
+
4
+ V. 1.1
5
+ Ruby-FileMagic replaced by Marcel
@@ -1,67 +1,30 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
3
  <head>
4
- <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.8.0
4
+ <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.9.20
5
5
  "/>
6
6
  <meta charset="utf-8" />
7
+ <link rel="preload" as="font" crossorigin="" href=
8
+ "https://www.uplawski.eu/fonts/Classica/Classica-Book.ttf" type=
9
+ "font/ttf" />
10
+ <link rel="preload" as="font" crossorigin="" href=
11
+ "https://www.uplawski.eu/fonts/Classica/Classica-Bold.ttf" type=
12
+ "font/ttf" />
13
+ <link rel="preload" as="font" crossorigin="" href=
14
+ "https://www.uplawski.eu/fonts/Classica/Classica-BookOblique.ttf"
15
+ type="font/ttf" />
16
+ <link rel="preload" as="font" crossorigin="" href=
17
+ "https://www.uplawski.eu/fonts/Fertigo_PRO.otf" type=
18
+ "font/otf" />
19
+ <link rel="icon" type="/image/x-icon" href=
20
+ "images/favicon_Schreibfeder.ico" />
7
21
  <meta name="viewport" content=
8
22
  "width=device-width, initial-scale=1" />
9
23
  <title>Viewworkbook</title>
10
- <style type="text/css">
11
- /*<![CDATA[*/
12
-
13
- /*
14
- :Author: Michael Uplawski
15
- :Contact: michael.uplawski@uplawski.eu
16
- :License: WTFPL 2.0, see http://www.wtfpl.net/about/
17
-
18
- Stylesheet for use with Docutils.
19
- */
20
-
21
- body {
22
- background-color:#300020;
23
- font-family: Verdana,Helvetica,Univers;
24
- color:#f0f0f0;
25
- color:#f0f0f0;
26
- }
27
-
28
- h1 {color:cyan;font-size:1.5em;}
29
- h1.title {color:#a0a0f0;font-size:2em;}
30
- h2 {color:#ffffa0;}
31
-
32
- p, ul.simple, ol.simple, dt {margin-left:2em;}
33
- p.first {font-weight:bold;}
34
- dd {margin-left:4em;}
35
- td {color:#f0f080;}
36
-
37
- /* correct left margin of nested block tags*/
38
- dd {}
39
- dd p, li p {margin-left:0;}
40
- dd * ul {margin-left:0 ! important; }
41
- dd ul {margin-left:0 ! important; }
42
- dd dl dt, dd dl dd {margin-left:0 ! important;}
43
- dt {font-weight:bold;}
44
- dt, dd {color:#f0f0f0}
45
-
46
- tt.docutils {color:#000080;
47
- background-color:#a080a0;
48
- padding-left:3px;
49
- padding-right:3px;
50
- white-space:nowrap;
51
- }
52
-
53
- a.external {color:#ff90ff;}
54
-
55
- blockquote {background-color:#400020;
56
- padding:0.5em;
57
- border-radius:1em;
58
- border-style:dotted;
59
- border-width:0.5pt;
60
- }
61
-
62
-
63
- /*]]>*/
64
- </style>
24
+ <link rel="stylesheet" href="../html/viewworkbook.css" type=
25
+ "text/css" />
26
+ <link rel="stylesheet" href="../html/fonts.css" type=
27
+ "text/css" />
65
28
  </head>
66
29
  <body>
67
30
  <main id="viewworkbook">
@@ -392,11 +355,22 @@
392
355
  </dd>
393
356
  </dl>
394
357
  </blockquote>
395
- </section>
396
358
 
397
- <section id="section-1">
398
- <h2><strong>Ω</strong>
399
- </h2>
359
+ <section id="this-document">
360
+ <h3>This document</h3>
361
+
362
+ <p>©Michael Uplawski &lt;<a class="reference external"
363
+ href="mailto:michael.uplawski@uplawski.eu">michael.uplawski@uplawski.eu</a>&gt;</p>
364
+
365
+ <p>License: <a class="reference external" href=
366
+ "https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND
367
+ 4.0</a></p>
368
+
369
+ <p>Date: 2026-04-26</p>
370
+
371
+ <p><strong>Ω</strong>
372
+ </p>
373
+ </section>
400
374
  </section>
401
375
  </main>
402
376
  </body>
Binary file
data/lib/sheetdata.rb CHANGED
@@ -15,7 +15,7 @@
15
15
  ***************************************************************************/
16
16
  =end
17
17
 
18
- require 'filemagic'
18
+ require 'marcel'
19
19
  require 'roo'
20
20
  require 'roo-xls'
21
21
 
@@ -33,6 +33,7 @@ XLS_MIME = "application/vnd.ms-excel"
33
33
  XLSX_MIME = "application/zip"
34
34
  CSV_MIME = "text/plain"
35
35
  # SoftMaker Office
36
+ PMD_MIME = "application/x-ole-storage"
36
37
  PMDX_MIME = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
37
38
 
38
39
  =begin
@@ -50,15 +51,13 @@ class SheetData
50
51
  @@file = file
51
52
  if !@@workbook
52
53
  begin
53
- fm = FileMagic.mime
54
- mtype = fm.fd(File.new(file) ).split(';')[0]
55
- fm = FileMagic.fm
56
- magic = fm.fd(File.new(file) ).split(';')[0]
54
+
55
+ mtype = Marcel::MimeType.for(File.new(file) )
57
56
  @@workbook = case mtype
58
57
  when ODS_MIME
59
58
  debug('ODS')
60
59
  Roo::Spreadsheet::open(@@file, extension: :ods )
61
- when (XLS_MIME)
60
+ when XLS_MIME, PMD_MIME
62
61
  debug('XLS')
63
62
  Roo::Spreadsheet::open(@@file, extension: :xls )
64
63
  when XLSX_MIME, PMDX_MIME
@@ -67,7 +66,7 @@ class SheetData
67
66
  when CSV_MIME
68
67
  raise IOError.new('CSV is not yet supported, sorry')
69
68
  else
70
- raise IOError.new('Mime-Type is ' << mtype << ' and Magic sais: ' << magic << ". Is this supposed to be a spreadsheet?")
69
+ raise IOError.new('Mime-Type is ' << mtype << ". Is this supposed to be a spreadsheet?")
71
70
  end
72
71
  rescue Exception => ex
73
72
  msg = 'ERROR! File %s is not supported: %s' %[@@file, ex.message]
data/lib/translating.rb CHANGED
@@ -19,7 +19,6 @@
19
19
  RD = File.expand_path(File.dirname(__FILE__) ) + File::SEPARATOR if !defined?(RD)
20
20
 
21
21
  require 'yaml'
22
- require_relative 'file_checking'
23
22
 
24
23
 
25
24
  # A way to produce translated text in a ruby-program.
@@ -40,7 +39,7 @@ module Translating
40
39
  r = ENV['LANG']
41
40
  if(r)
42
41
  @@lang = r[0, 2]
43
- elsif( !File_Checking::file_check(@@lang_file, [:exist?, :readable?]) && File::size(@@lang_file) >= 2)
42
+ elsif( File::exist?(@@lang_file) && File::readable?(@@lang_file) && File::size(@@lang_file) >= 2)
44
43
  File::open(@@lang_file, 'r') {|f| @@lang = f.readline}
45
44
  @@lang.chomp!.downcase! if @@lang
46
45
  end
data/lib/viewworkbook.rb CHANGED
@@ -17,14 +17,12 @@
17
17
 
18
18
  require 'tempfile'
19
19
  require_relative 'basic_logging'
20
- require_relative 'file_checking'
21
20
  require_relative 'sheetinterface'
22
21
  require_relative 'sheetdata'
23
22
  require_relative 'color_output'
24
23
 
25
24
  class ViewWorkBook
26
25
  include BasicLogging
27
- include File_Checking
28
26
 
29
27
  attr_reader :workbook
30
28
 
@@ -35,8 +33,14 @@ class ViewWorkBook
35
33
  debug('workbook file will be ' << (path ? path : 'N I L'))
36
34
 
37
35
  if(wb)
38
- msg = file_check(path, :exist?, :file?, :readable?)
39
- if(!msg)
36
+ msg = ''
37
+
38
+ [:exist?, :file?, :readable?].each do |cond|
39
+ if ! File.send(cond, path)
40
+ msg = "\n\t not " << cond.to_s.split('?')[0]
41
+ end
42
+ end
43
+ if(msg.empty?)
40
44
  begin
41
45
  @workbook = SheetData.workbook(path)
42
46
  view_sheet if @workbook
data/viewworkbook.gemspec CHANGED
@@ -1,27 +1,30 @@
1
+ require_relative 'lib/version'
2
+ require 'date'
3
+
1
4
  Gem::Specification.new do |s|
2
- s.name = 'viewworkbook'
3
- s.version = '1.0'
4
- s.date = '2026-04-10'
5
- s.summary = "Content can – again – be writtenn to a text-file, "
6
- s.summary << "Ruby 4.0 compatibility, "
7
- s.summary << "Minor Bug-fix."
5
+ s.name = PROGNAME
6
+ s.version = VERSION
7
+ s.date = Date.today.strftime('%F')
8
+ s.summary = SUMMARY
8
9
  s.description = "View spreadsheet files in a text-console."
9
- s.authors = ["Michael Uplawski"]
10
- s.email = 'michael.uplawski@uplawski.eu'
11
- s.files = %w~action.rb scrollable.rb cell.rb column.rb row.rb color_output.rb menu.rb sheetdata.rb translating.rb user_input.rb file_checking.rb basic_logging.rb sheetinterface.rb translations viewworkbook.rb~.collect{|f| 'lib/' << f} +
10
+ s.authors = AUTHORS
11
+ s.email = EMAIL
12
+ s.files = %w~action.rb scrollable.rb cell.rb column.rb row.rb color_output.rb menu.rb sheetdata.rb translating.rb user_input.rb basic_logging.rb sheetinterface.rb translations viewworkbook.rb~.collect{|f| 'lib/' << f} +
12
13
  %w~license.txt rst/viewworkbook.rst man/viewworkbook.1.gz html/viewworkbook.html~.collect{|f| 'doc/' << f} +
13
- %w~busy_function_test.rb busy_indicator.rb~.collect{|f| 'lib/busy_indicator/' << f} + ["README.md", "viewworkbook.gemspec"]
14
+ %w~busy_function_test.rb busy_indicator.rb~.collect{|f| 'lib/busy_indicator/' << f} + ["README.md", "viewworkbook.gemspec", "changes.txt"]
14
15
  s.homepage = 'http://rubygems.org/gems/viewworkbook'
15
- s.requirements = 'roo, roo-xls, ruby-filemagic'
16
- s.add_runtime_dependency 'roo', '~> 2.10', '>= 2.10.1'
17
- s.add_runtime_dependency 'roo-xls', '~> 1.2', '>= 1.2.0'
18
- s.add_runtime_dependency 'ruby-filemagic', '~> 0.7', '>= 0.7.3'
16
+ s.requirements = 'roo, roo-xls, marcel'
17
+ s.add_runtime_dependency 'roo', '~> 3.0', '>= 3.0.0'
18
+ s.add_runtime_dependency 'roo-xls', '~> 2.0', '>= 2.0.0'
19
+ s.add_runtime_dependency 'marcel', '~> 1.2', '>= 1.2.1'
20
+ s.add_runtime_dependency 'io-console', '~> 0.9', '>= 0.9.2'
19
21
  s.executables = 'viewworkbook'
20
- s.license = 'Nonstandard'
22
+ s.license = 'WTFPL'
21
23
  s.required_ruby_version = '>= 4.0'
22
24
  s.metadata = {
23
25
  "homepage_uri" => 'https://www.uplawski.eu/software/viewworkbook/',
24
- "documentation_uri" => 'https://www.uplawski.eu/software/viewworkbook/viewworkbook.html'
26
+ "documentation_uri" => 'https://www.uplawski.eu/software/viewworkbook/viewworkbook.html',
27
+ "changelog_uri" => 'https://www.uplawski.eu/software/viewworkbook/changes.txt'
25
28
  }
26
29
 
27
30
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viewworkbook
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Uplawski
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-04-10 00:00:00.000000000 Z
10
+ date: 2026-08-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: roo
@@ -15,22 +15,42 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '2.10'
18
+ version: '3.0'
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 2.10.1
21
+ version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '2.10'
28
+ version: '3.0'
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 2.10.1
31
+ version: 3.0.0
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: roo-xls
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - "~>"
37
+ - !ruby/object:Gem::Version
38
+ version: '2.0'
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 2.0.0
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '2.0'
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: 2.0.0
52
+ - !ruby/object:Gem::Dependency
53
+ name: marcel
34
54
  requirement: !ruby/object:Gem::Requirement
35
55
  requirements:
36
56
  - - "~>"
@@ -38,7 +58,7 @@ dependencies:
38
58
  version: '1.2'
39
59
  - - ">="
40
60
  - !ruby/object:Gem::Version
41
- version: 1.2.0
61
+ version: 1.2.1
42
62
  type: :runtime
43
63
  prerelease: false
44
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -48,27 +68,27 @@ dependencies:
48
68
  version: '1.2'
49
69
  - - ">="
50
70
  - !ruby/object:Gem::Version
51
- version: 1.2.0
71
+ version: 1.2.1
52
72
  - !ruby/object:Gem::Dependency
53
- name: ruby-filemagic
73
+ name: io-console
54
74
  requirement: !ruby/object:Gem::Requirement
55
75
  requirements:
56
76
  - - "~>"
57
77
  - !ruby/object:Gem::Version
58
- version: '0.7'
78
+ version: '0.9'
59
79
  - - ">="
60
80
  - !ruby/object:Gem::Version
61
- version: 0.7.3
81
+ version: 0.9.2
62
82
  type: :runtime
63
83
  prerelease: false
64
84
  version_requirements: !ruby/object:Gem::Requirement
65
85
  requirements:
66
86
  - - "~>"
67
87
  - !ruby/object:Gem::Version
68
- version: '0.7'
88
+ version: '0.9'
69
89
  - - ">="
70
90
  - !ruby/object:Gem::Version
71
- version: 0.7.3
91
+ version: 0.9.2
72
92
  description: View spreadsheet files in a text-console.
73
93
  email: michael.uplawski@uplawski.eu
74
94
  executables:
@@ -78,6 +98,7 @@ extra_rdoc_files: []
78
98
  files:
79
99
  - README.md
80
100
  - bin/viewworkbook
101
+ - changes.txt
81
102
  - doc/html/viewworkbook.html
82
103
  - doc/license.txt
83
104
  - doc/man/viewworkbook.1.gz
@@ -89,7 +110,6 @@ files:
89
110
  - lib/cell.rb
90
111
  - lib/color_output.rb
91
112
  - lib/column.rb
92
- - lib/file_checking.rb
93
113
  - lib/menu.rb
94
114
  - lib/row.rb
95
115
  - lib/scrollable.rb
@@ -102,10 +122,11 @@ files:
102
122
  - viewworkbook.gemspec
103
123
  homepage: http://rubygems.org/gems/viewworkbook
104
124
  licenses:
105
- - Nonstandard
125
+ - WTFPL
106
126
  metadata:
107
127
  homepage_uri: https://www.uplawski.eu/software/viewworkbook/
108
128
  documentation_uri: https://www.uplawski.eu/software/viewworkbook/viewworkbook.html
129
+ changelog_uri: https://www.uplawski.eu/software/viewworkbook/changes.txt
109
130
  rdoc_options: []
110
131
  require_paths:
111
132
  - lib
@@ -120,9 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
141
  - !ruby/object:Gem::Version
121
142
  version: '0'
122
143
  requirements:
123
- - roo, roo-xls, ruby-filemagic
124
- rubygems_version: 4.0.10
144
+ - roo, roo-xls, marcel
145
+ rubygems_version: 4.0.18
125
146
  specification_version: 4
126
- summary: Content can again – be writtenn to a text-file,Ruby 4.0 compatibility,
127
- Minor Bug-fix.
147
+ summary: View spreadsheets in a terminal
128
148
  test_files: []
data/lib/file_checking.rb DELETED
@@ -1,112 +0,0 @@
1
- #encoding: UTF-8
2
- =begin
3
- /***************************************************************************
4
- * ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
5
- * *
6
- * This program is free software; you can redistribute it and/or modify *
7
- * it under the terms of the WTFPL 2.0 or later, see *
8
- * http://www.wtfpl.net/about/ *
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. *
13
- * *
14
- ***************************************************************************/
15
- =end
16
-
17
- require 'filemagic'
18
-
19
- =begin
20
- A module to facilitate frequently occuring checks on
21
- file-system objects
22
- =end
23
- module File_Checking
24
-
25
- @@text_messages = {
26
- :exist? => "does not exist!",
27
- :exist => "does not exist!",
28
- :readable? => "is not readable!",
29
- :readable => "is not readable!",
30
- :executable? => "is not executable!",
31
- :executable => "is not executable!",
32
- :writable? => "is not writable!",
33
- :writable => "is not writable!",
34
- :directory? => "is not a directory!",
35
- :directory => "is not a directory!",
36
- :file? => "is not a file!",
37
- :file => "is not a file!",
38
- :type => "is not of the sought file-type (not '%s', but '%s')!",
39
- :type? => "is not of the sought file-type (not '%s', but '%s')!",
40
- :mime => "does not have the sought mime-type (not '%s', but '%s')!",
41
- :mime? => "does not have the sought mime-type (not '%s', but '%s')!",
42
- }
43
-
44
- # Checks if the file with the name from the first
45
- # parameter has the properties, listed in the second.
46
- # The messages parameter is an array of one or several
47
- # of :exist?, :readable?, :writable?, :directory? or
48
- # their string-representations, respectively.
49
- # Returns nil in case of success, otherwise an
50
- # informative message, describing the first negative
51
- # test-result.
52
- def file_check(file, *messages)
53
- File_Checking.file_check(file, *messages)
54
- end
55
-
56
- # Checks if the file with the name from the first
57
- # parameter has the properties, listed in the second.
58
- # The messages parameter is an array of one or all
59
- # of :exist?, :readable?, :writable?, :directory? or
60
- # their string-representations, respectively.
61
- # Returns nil in case of success, otherwise an
62
- # informative message, describing the first negative
63
- # test-result.
64
- def self.file_check(file, *messages)
65
- msg = nil
66
- if(file && messages.respond_to?(:to_ary) && !messages.empty?)
67
- messages.each do |k|
68
- if(! k.to_s.end_with?('?'))
69
- k = (k.to_s << '?').to_sym
70
- end
71
- @log.debug ('checking ' << k.to_s) if @log
72
- if(msg == nil && File.respond_to?(k) && ! File.send(k, file.to_s))
73
- msg = "#{file} #{@@text_messages[k.to_sym]}"
74
- end
75
- end
76
- end
77
- msg
78
- end
79
-
80
- def self.mime_check(file, mime_type)
81
- fm = FileMagic.mime
82
- fd = fm.fd(File.new(file) ).split(';')[0]
83
- if fd != mime_type.strip
84
- return file.dup << ' ' << (@@text_messages[:mime] %[mime_type, fd])
85
- end
86
- return nil
87
- end
88
-
89
- def self.magic_check(file, magic)
90
- fm = FileMagic.fm
91
- fd = fm.fd(File.new(file) ).split(';')[0]
92
- if fd != magic.strip
93
- return file.dup << ' ' << (@@text_messages[:type] %[magic, fd])
94
- end
95
- return nil
96
- end
97
-
98
- end # module
99
-
100
- =begin
101
- # example
102
-
103
- include File_Checking
104
- msg = file_check('some_file.txt', [:exist?, :readable?, 'writable'])
105
- # same as
106
- # msg = file_check('some_file.txt', [:exist, :readable, 'writable?'])
107
-
108
- msg ||= magic_check('some_file.txt', [:type?], 'OpenDocument Text'
109
- msg ||= mime_check('some_file.txt', [:mime?], 'application/vnd.oasis.opendocument.text'
110
- puts msg if msg
111
- =end
112
- # E O F