formatafacil 0.1.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 +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -0
- data/exe/formatafacil +30 -0
- data/formatafacil.gemspec +1 -1
- data/lib/formatafacil/compila.rb +14 -0
- data/lib/formatafacil/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8836bc5815513a6054f4e6241f30e3b3d7013e32
|
|
4
|
+
data.tar.gz: d73c0d0bb89c975fdc80e4a8cb800300a23b4b8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c444ae1cc5fdb35682119ca463caa4ac11f52e3b2ef60630783e388efccadfa0201dffaf44ad332fbec1472e6b33aa20218bd0be6c97b540f558649eafc3d4c8
|
|
7
|
+
data.tar.gz: c4503eea3b2a3a2f42a4e2c06f6f035f96829f75a625192dc8cb3e2bc362e92cb06a0453d97e4afe5b3e002bfce32920f6c3ba5655403a1f5e61c4f9fa93dfb5
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
data/exe/formatafacil
CHANGED
|
@@ -7,6 +7,7 @@ require "formatafacil"
|
|
|
7
7
|
require 'formatafacil/template'
|
|
8
8
|
require 'formatafacil/artigo_tarefa'
|
|
9
9
|
require 'formatafacil/tarefa_chooser'
|
|
10
|
+
require 'formatafacil/compila'
|
|
10
11
|
|
|
11
12
|
include GLI::App
|
|
12
13
|
|
|
@@ -49,6 +50,35 @@ command :artigo do |c|
|
|
|
49
50
|
|
|
50
51
|
end
|
|
51
52
|
|
|
53
|
+
|
|
54
|
+
desc 'Auto detecta o comando com base no arquivo de configuração'
|
|
55
|
+
command :compila do |c|
|
|
56
|
+
|
|
57
|
+
c.desc 'Possíveis valores: artigo'
|
|
58
|
+
c.flag [:d,:documento]
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
c.action do |global,options,args|
|
|
62
|
+
|
|
63
|
+
if (global['logfile'])
|
|
64
|
+
logger = Logger.new('formatafacil.log')
|
|
65
|
+
else
|
|
66
|
+
logger = Logger.new(STDOUT)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
begin
|
|
70
|
+
Formatafacil::Compila.new().compila_artigo
|
|
71
|
+
rescue Exception => e
|
|
72
|
+
logger.error {e.message}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
52
82
|
desc 'Auto detecta o comando com base no arquivo de configuração'
|
|
53
83
|
command :auto do |c|
|
|
54
84
|
|
data/formatafacil.gemspec
CHANGED
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
|
|
16
16
|
spec.summary = %q{Compila arquivos escritos em Markdown para formatos.}
|
|
17
17
|
spec.description = %q{Com essa ferramenta você poderá compilar trabalhos de conclusão de curso (monografia, dissertação ou tese) ou artigos com as normas da ABNT ou outra específica }
|
|
18
|
-
spec.homepage = "https://github.com/
|
|
18
|
+
spec.homepage = "https://github.com/formatafacil/formatafacil"
|
|
19
19
|
spec.license = "MIT"
|
|
20
20
|
|
|
21
21
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module Formatafacil
|
|
2
|
+
ARTIGO_LATEX = "artigo.tex"
|
|
3
|
+
ARTIGO_PDF = "artigo.pdf"
|
|
4
|
+
|
|
5
|
+
class Compila
|
|
6
|
+
def compila_artigo
|
|
7
|
+
raise "Erro ao tentar compilar um arquivo que não existe: #{ARTIGO_LATEX}" unless File.exist?(ARTIGO_LATEX)
|
|
8
|
+
system("/usr/bin/pdflatex -interaction=batchmode #{ARTIGO_LATEX}")
|
|
9
|
+
system("/usr/bin/pdflatex -interaction=batchmode #{ARTIGO_LATEX}")
|
|
10
|
+
raise "Erro durante a criação do PDF, provavelmente existe erro no arquivo #{ARTIGO_LATEX}" unless File.exist?(ARTIGO_PDF)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
end
|
|
14
|
+
end
|
data/lib/formatafacil/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: formatafacil
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eduardo de Santana Medeiros Alexandre
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-07-
|
|
11
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -92,6 +92,7 @@ files:
|
|
|
92
92
|
- ".gitignore"
|
|
93
93
|
- ".rspec"
|
|
94
94
|
- ".travis.yml"
|
|
95
|
+
- CHANGELOG.md
|
|
95
96
|
- CODE_OF_CONDUCT.md
|
|
96
97
|
- Gemfile
|
|
97
98
|
- LICENSE.txt
|
|
@@ -110,12 +111,13 @@ files:
|
|
|
110
111
|
- formatafacil.gemspec
|
|
111
112
|
- lib/formatafacil.rb
|
|
112
113
|
- lib/formatafacil/artigo_tarefa.rb
|
|
114
|
+
- lib/formatafacil/compila.rb
|
|
113
115
|
- lib/formatafacil/formato.rb
|
|
114
116
|
- lib/formatafacil/tarefa.rb
|
|
115
117
|
- lib/formatafacil/tarefa_chooser.rb
|
|
116
118
|
- lib/formatafacil/template.rb
|
|
117
119
|
- lib/formatafacil/version.rb
|
|
118
|
-
homepage: https://github.com/
|
|
120
|
+
homepage: https://github.com/formatafacil/formatafacil
|
|
119
121
|
licenses:
|
|
120
122
|
- MIT
|
|
121
123
|
metadata: {}
|