limarka 0.4.6 → 0.5.0

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: d7773b3a9edba1e4281ed38eac49fab213c1025a
4
- data.tar.gz: 14352047c73a1da7b148b47f0b37d34e26577712
3
+ metadata.gz: 0fc858cd5a934757419b7ffeb8cd1cce7a7f8d14
4
+ data.tar.gz: a2d9496801859e7c01e724a76e01c8d926532b00
5
5
  SHA512:
6
- metadata.gz: 83133830a8348f29cf53b74412ee61fda9dbd8236d665c482d44bc717732bccc53a7f437cc3ed20bfa24536e08c9ce5a9c794f5b6195ed69c878364b338537e6
7
- data.tar.gz: a7aaec9d8416b06faab479f9b8206666a014aa233de4a3b2a8c8e5c8a1f5777314c144dd7f86dfa46dca69a772abd8e9aba72c420a697f7a14684896b73d920e
6
+ metadata.gz: 3d51a3b57b1522a540ae0dc07d1cbba6389fe2274e0aad68ac1a33809ec2b3721bb9116f013bfa57874a14ad61a0ad0efa12a7e96f18f690318c78cdb365413b
7
+ data.tar.gz: c1f9e76760498c82deedca9e0f2e657b30709c8932b7b34817d5c814ee7320330f01a96ba671690bc8b435d2452bff87a16049285d853af648c14e5b33e29f49
data/CHANGELOG.md CHANGED
@@ -1,11 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.5.0](https://github.com/abntex/limarka/tree/v0.5.0) (2016-12-04)
4
+ [Full Changelog](https://github.com/abntex/limarka/compare/v0.4.6...v0.5.0)
5
+
6
+ **Melhorias implementadas:**
7
+
8
+ - Comando para auxiliar elaboração de cronogramas [\#90](https://github.com/abntex/limarka/issues/90)
9
+ - Possibilita utilizações de arquivos de rascunho [\#82](https://github.com/abntex/limarka/issues/82)
10
+
3
11
  ## [v0.4.6](https://github.com/abntex/limarka/tree/v0.4.6) (2016-11-28)
4
12
  [Full Changelog](https://github.com/abntex/limarka/compare/v0.4.5...v0.4.6)
5
13
 
6
14
  **Melhorias implementadas:**
7
15
 
8
- - Antecipar validação de dados quando inserido figuras [\#78](https://github.com/abntex/limarka/issues/78)
16
+ - Antecipar validação de dados quando inserindo figuras [\#78](https://github.com/abntex/limarka/issues/78)
9
17
 
10
18
  **Bugs corrigidos:**
11
19
 
@@ -50,7 +58,7 @@
50
58
  ## [v0.4.2](https://github.com/abntex/limarka/tree/v0.4.2) (2016-11-18)
51
59
  [Full Changelog](https://github.com/abntex/limarka/compare/v0.4.1...v0.4.2)
52
60
 
53
- **Issues fechados:**
61
+ **Melhorias implementadas:**
54
62
 
55
63
  - Opção de criar tabelas [\#37](https://github.com/abntex/limarka/issues/37)
56
64
 
data/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  O limarka é uma ferramenta que possibilita o usuário escrever o seu trabalho de conclusão de curso (monografia, dissertação ou teste) em Markdown e produzir PDFs em conformidade com as normas da ABNT.
4
4
 
5
+ - [Convite para realização de experimento de utilização](https://github.com/abntex/limarka/wiki/Experimentos)
6
+ - [Fórum de usuários no google groups](https://groups.google.com/forum/#!forum/limarka)
7
+
5
8
  # Por que escrever em Markdown ao invés de Latex?
6
9
 
7
10
  O LaTeX é ótimo e bastante útil para quem deseja percorrer uma carreira de Pesquisador. Muitos *journals* disponibilizam modelos somente em LaTeX para produção de artigos, aprender LaTeX irá ser útil nessa carreira.
@@ -46,13 +49,14 @@ O limarka converte os textos produzidos em Markdown para LaTeX, utilizando os mo
46
49
 
47
50
  A documentação do limarka será mantida no [wiki do projeto](https://github.com/abntex/limarka/wiki).
48
51
 
49
- - [Vídeos](https://www.youtube.com/playlist?list=PLTnAY6TvPRKK6OgGYy3UA0oFdfCfRZesY)
52
+ - [Vídeos](https://www.youtube.com/playlist?list=PLTnAY6TvPRKK6OgGYy3UA0oFdfCfRZesY) -- recomendo assistir em velocidade rápida
53
+
50
54
 
51
55
  # Contribua participando da pesquisa sobre o limarka
52
56
 
53
57
  O projeto tem como origem uma pesquisa científica (em andamento) sobre utilização de linguagem de marcação de texto para elaboração de monografias.
54
58
 
55
- - [Deseja participar da pesquisa científica do projeto](https://docs.google.com/forms/d/e/1FAIpQLSeNjcfJx0HQuR1p4d7moeJSL0gg25dGw0gepIBtyf6XdV9Zxw/viewform)?
59
+ - [Realize o experimento de utilização](https://github.com/abntex/limarka/wiki/Experimentos)
56
60
  - [Deseja contribuir com o desenvolvimento?](https://github.com/abntex/limarka/wiki/Desenvolvimento)
57
61
 
58
62
  # Contributing
data/lib/limarka/cli.rb CHANGED
@@ -22,6 +22,7 @@ module Limarka
22
22
  method_option :output_dir, :aliases => '-o', :desc => 'Diretório onde serão gerados os arquivos', :default => '.'
23
23
  method_option :compila_tex, :aliases => '-c', :desc => 'Compila arquivo tex gerando um PDF', :default => true, :type => :boolean
24
24
  method_option :templates_dir, :aliases => '-t', :desc => 'Diretório que contem a pasta templates (pandoc --data-dir)', :default => Dir.pwd
25
+ method_option :rascunho, :aliases => '-r', :desc => 'Ler de um arquivo de rascunho em vez de "trabalho-academico.md"', :banner => "RASCUNHO_FILE"
25
26
  method_option :verbose, :aliases => '-v', :desc => 'Imprime mais detalhes da execução', :default => false, :type => :boolean
26
27
  method_option :version, :desc => 'Imprime a versão do limarka', :default => false, :type => :boolean
27
28
 
@@ -202,6 +203,49 @@ TEX
202
203
 
203
204
  end
204
205
 
206
+ desc "cronograma", "Imprime código para facilitar elaboração de Cronograma"
207
+ def cronograma
208
+ # https://github.com/abntex/limarka/issues/90
209
+ tex = <<TEX
210
+ \\begin{table}[htbp]
211
+ \\centering
212
+ \\caption{Cronograma de atividades}
213
+ \\label{tab:cronograma}
214
+ \\begin{tabular}{|c|c|c|c|c|c|}
215
+ \\hline
216
+ Fase & Março & Abril & Maio & Junho & Julho \\\\
217
+ \\hline
218
+ 1 & \\textbullet & & & & \\\\
219
+ 2 & & \\textbullet & & & \\\\
220
+ 3 & & & \\textbullet & & \\\\
221
+ 4 & & & & \\textbullet & \\\\
222
+ 5 & & & & & \\textbullet \\\\
223
+ \\hline
224
+ \\end{tabular}
225
+ \\legend{Fonte: Autor.}
226
+ \\end{table}
227
+
228
+ \\begin{table}[htbp]
229
+ \\centering
230
+ \\caption{Cronograma de atividades}
231
+ \\label{tab:cronograma}
232
+ \\begin{tabular}{|l|c|c|c|c|c|}
233
+ \\hline
234
+ Atividade & Março & Abril & Maio & Junho & Julho \\\\
235
+ \\hline
236
+ XXXXXXXXXXXXXXXX & \\textbullet & & & & \\\\
237
+ XXXXXXXXXXXXXXXX & & \\textbullet & & & \\\\
238
+ XXXXXXXX & & & \\textbullet & & \\\\
239
+ XXXXXXXX & & & & \\textbullet & \\\\
240
+ XXXXXXXX & & & & & \\textbullet \\\\
241
+ \\hline
242
+ \\end{tabular}
243
+ \\legend{Fonte: Autor.}
244
+ \\end{table}
245
+ TEX
246
+ puts tex
247
+ end
248
+
205
249
  no_commands do
206
250
  def valida_figura_rotulo (rotulo)
207
251
  if (not rotulo =~ (/^[a-zA-Z][\w\-:]*$/)) then
@@ -0,0 +1,52 @@
1
+ # coding: utf-8
2
+
3
+ module Limarka
4
+
5
+ # Ver https://github.com/abntex/limarka/issues/90
6
+ class Cronograma
7
+ attr_accessor :tabela, :legenda, :fonte, :rotulo
8
+
9
+ def initialize(tabela: nil, legenda: nil, fonte: nil, rotulo: nil)
10
+ self.tabela = tabela
11
+ self.legenda = legenda
12
+ self.fonte = fonte
13
+ self.rotulo = rotulo
14
+ end
15
+
16
+ def self.cria_atividades(qtde_atividades, meses, legenda, fonte, rotulo)
17
+ tabela = [
18
+ ["Etapas", "Março", "Abril", "Maio", "Junho", "Julho"],
19
+ ["1", "\\X", "", "", "", ""],
20
+ ["2", "\\X", "", "", "", ""],
21
+ ["3", "\\X", "", "", "", ""],
22
+ ["4", "\\X", "", "", "", ""],
23
+ ["5", "\\X", "", "", "", ""],
24
+ ]
25
+ Limarka::Cronograma.new(tabela:tabela, legenda:legenda, fonte:fonte, rotulo:rotulo)
26
+ end
27
+
28
+ def to_latex
29
+ tex = <<LATEX
30
+ \\begin{table}[htb]
31
+ \\ABNTEXfontereduzida
32
+ \\caption{#{legenda}}
33
+ \\label{#{rotulo}}
34
+ \\begin{tabular}{|l||c|c|c|c|c|}
35
+ \\hline
36
+ \\hline
37
+ Fase & Março & Abril & Maio & Junho & Julho \\\\
38
+ \\hline
39
+ 1 & \\X & & & & \\\\
40
+ 2 & & \\X & \\X & & \\\\
41
+ 3 & & & \\X & \\X & \\\\
42
+ 4 & & & & \\X & \\X \\\\
43
+ 5 & & & & & \\X \\\\
44
+ \\hline
45
+ \\hline
46
+ \\end{tabular}
47
+ \\legend{Fonte: #{fonte}}
48
+ \\end{table}
49
+ LATEX
50
+ end
51
+ end
52
+ end
@@ -108,7 +108,7 @@ module Limarka
108
108
  puts "Configuração lida: #{configuracao}" if options[:verbose]
109
109
  # transforma os simbolos em string: http://stackoverflow.com/questions/8379596/how-do-i-convert-a-ruby-hash-so-that-all-of-its-keys-are-symbols?noredirect=1&lq=1
110
110
  # @configuracao.inject({}){|h,(k,v)| h[k.intern] = v; h}
111
- self.texto = ler_texto
111
+ self.texto = ler_texto(options[:rascunho_file])
112
112
  self.referencias_bib = ler_referencias(self.configuracao)
113
113
  self.apendices = ler_apendices if apendices?
114
114
  self.anexos = ler_anexos if anexos?
@@ -139,8 +139,12 @@ module Limarka
139
139
  File.open('anexos.md', 'r') {|f| f.read} if anexos?
140
140
  end
141
141
 
142
- def ler_texto
143
- File.open('trabalho-academico.md', 'r') {|f| f.read}
142
+ def ler_texto(rascunho_file)
143
+ if (rascunho_file) then
144
+ File.open(rascunho_file, 'r') {|f| f.read}
145
+ else
146
+ File.open('trabalho-academico.md', 'r') {|f| f.read}
147
+ end
144
148
  end
145
149
 
146
150
  def ler_referencias(configuracao)
@@ -1,3 +1,3 @@
1
1
  module Limarka
2
- VERSION = "0.4.6"
2
+ VERSION = "0.5.0"
3
3
  end
data/lib/limarka.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "limarka/version"
2
2
  require "limarka/cli"
3
3
  require "limarka/trabalho"
4
+ require "limarka/cronograma"
4
5
  require "limarka/pdfconf"
5
6
 
6
7
  module Limarka
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limarka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.5.0
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: 2016-11-28 00:00:00.000000000 Z
11
+ date: 2016-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -217,6 +217,7 @@ files:
217
217
  - lib/limarka/cli.rb
218
218
  - lib/limarka/configuracao.rb
219
219
  - lib/limarka/conversor.rb
220
+ - lib/limarka/cronograma.rb
220
221
  - lib/limarka/pdfconf.rb
221
222
  - lib/limarka/ref.rb
222
223
  - lib/limarka/trabalho.rb