texzip 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67e1ffedfccda29c907df389d43572e9a5680d68
4
- data.tar.gz: 33a6b58f3f7816e5b38bd69938781960d53ed259
3
+ metadata.gz: 6c12e08ba503ac34756956e265693eeaec089d0a
4
+ data.tar.gz: 856f9703d45fda06052e3b809d02cacc6788cfec
5
5
  SHA512:
6
- metadata.gz: f02b9cdda2108669add590c1e8424723f8a3ee1d212e962f98498c56208f6406780c2fdf818fad297ee36aa890571362b5422b39ff8612930242fd22597a2664
7
- data.tar.gz: 351fd45c6b10b45c216c596e5fb20f2604a5b144ae17b7cb97d3c1c1cbb1414ac45e26d14b307ffe9755779edc6be5581c72fe4fe7ef8c7a706175a872d943e0
6
+ metadata.gz: f5a71df7c1fe384f702db9ecbc0eb4ffee1ee735d72564ee0432125b54edae54c5c8a3540fd62d8bf0cdb3e92455bdc948e1ce045627700ef8a0b12375e47852
7
+ data.tar.gz: 9c7c7aa4d13f3f8e0f7d465a1e7cfa4e4bef3f267635742cbd693faf40f5d989a758f40fc8b68cad1f4e8e4e8ab5e1dd0e5ad8510d654327eb8ff1b2a4da312f
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.1.9 / 2016-06-22
2
+ * update styles
3
+ * update to new rspec syntax
4
+ * update Rakefile to automatically extract version from tags
5
+
1
6
  == 0.1.8 / 2012-11-14
2
7
  * fix specs
3
8
  * update dependencies for trollop and bibtex-latex
data/bin/texzip CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require File.expand_path(File.join(File.dirname(__FILE__),
4
- %w[.. lib texzip]))
4
+ %w(.. lib texzip)))
5
5
 
6
6
  # Put your code here
7
7
 
8
8
  require 'trollop'
9
9
 
10
- opts = Trollop::options do
11
- banner <<-EOS
10
+ opts = Trollop.options do
11
+ banner <<-EOS
12
12
  TeXzip bundles your TeX project in a single archive or directory with all
13
13
  included tex-, sty-, cls-files, pictures and (used) BibTeX-references.
14
14
 
@@ -18,48 +18,41 @@ Usage:
18
18
 
19
19
  where [options] are:
20
20
  EOS
21
- opt :bib, "Output BibTeX file", :default => "bibliography.bib"
22
- opt :output, "Output directory where the modified files should saved", :type => String
23
- opt :images, "Subdirectory where the images should be stored", :default => "img"
24
- opt "plain-images", "Images should be stored without further subdirectories"
25
- opt :archive, "Archive to be created", :type => String
26
- opt :force, "Force overwriting of files", :default => false
27
- version "#{File.basename(__FILE__)} #{TeXzip::VERSION} (c) 2011,2012 Frank Fischer"
21
+ opt :bib, 'Output BibTeX file', default: 'bibliography.bib'
22
+ opt :output, 'Output directory where the modified files should saved', type: String
23
+ opt :images, 'Subdirectory where the images should be stored', default: 'img'
24
+ opt 'plain-images', 'Images should be stored without further subdirectories'
25
+ opt :archive, 'Archive to be created', type: String
26
+ opt :force, 'Force overwriting of files', default: false
27
+ version "#{File.basename(__FILE__)} #{TeXzip::VERSION} (c) 2011,2012 Frank Fischer"
28
28
  end
29
29
 
30
30
  if ARGV.empty?
31
- STDERR.puts "Error: No master TeX-file given."
32
- STDERR.puts "Try --help for help."
33
- exit -1
31
+ STDERR.puts 'Error: No master TeX-file given.'
32
+ STDERR.puts 'Try --help for help.'
33
+ exit(-1)
34
34
  end
35
35
 
36
- unless opts[:archive] or opts[:output]
37
- STDERR.puts "Error: --output or --archive must be given."
38
- STDERR.puts "Try --help for help."
39
- exit -1
36
+ unless opts[:archive] || opts[:output]
37
+ STDERR.puts 'Error: --output or --archive must be given.'
38
+ STDERR.puts 'Try --help for help.'
39
+ exit(-1)
40
40
  end
41
41
 
42
42
  begin
43
- texproject = TeXzip::Project.new ARGV.shift
44
- texproject.modify_files(opts[:output] || Dir.getwd,
45
- opts[:images], opts["plain-images"],
46
- opts[:bib])
43
+ texproject = TeXzip::Project.new ARGV.shift
44
+ texproject.modify_files(opts[:output] || Dir.getwd,
45
+ opts[:images], opts['plain-images'],
46
+ opts[:bib])
47
47
 
48
- texproject.overwrite_all = opts[:force]
48
+ texproject.overwrite_all = opts[:force]
49
49
 
50
- if opts[:output]
51
- texproject.write_files
52
- end
50
+ texproject.write_files if opts[:output]
53
51
 
54
- if opts[:archive]
55
- texproject.write_archive opts[:archive]
56
- end
52
+ texproject.write_archive opts[:archive] if opts[:archive]
57
53
  rescue TeXzip::Error => e
58
- STDERR.puts "Error: #{e}"
59
- exit -1
54
+ STDERR.puts "Error: #{e}"
55
+ exit(-1)
60
56
  rescue TeXzip::Project::Quit
61
- puts "Aborted."
57
+ puts 'Aborted.'
62
58
  end
63
-
64
-
65
-