dyndoc-ruby-doc 1.0.1 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/dyndoc/document.rb +15 -14
  3. metadata +7 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f8a094a95a726637b11faf25963ea90309f9d320
4
- data.tar.gz: 1d5c8efefba46cfd961477d399befd8915386260
2
+ SHA256:
3
+ metadata.gz: 23eb15e6c77eebedf6283526846ceab5226ff78e5065e9dbab9a01a9b253a83a
4
+ data.tar.gz: 27dd97ac586a7d435fe065513cdea7544a02cc1541ee4dc237d9c970d73216bf
5
5
  SHA512:
6
- metadata.gz: 18b48f3f9a45434a101237ab818e4b645fe05353f27baaae5a946a375de0d968357fa6fccb908ec34031a9f45c20c8dc9d0761e71b6c4f9302d31afae13f14cf
7
- data.tar.gz: 0a07273d1779d262754f8d81e03a2c4fee5aaba78d9b16f118ac519ab2a026bd59cdfedb82d8f8c3aaf3750561acde079046caf2815b9a806a53f3904d73a267
6
+ metadata.gz: 2eca4cc928dbd6e0e2851e80d5f39319a871ae63946df680d1ebdcb786f2c20a171f7948ee1b0fa84aaf01a9c1fc0ebf0a5ec83d478999404d5549232a4657df
7
+ data.tar.gz: 66cabb14ece316c6c42513fd32b2979fdc52d7b24cf9435ecb93c08d1e8f644f26947c3fab20c858bcf5b99dc3b1e5fa739a9c0a2bb45700fb24fd701d2164f8
@@ -55,6 +55,7 @@ module Dyndoc
55
55
  @cfg[k2.to_sym]=cfg[k]
56
56
  end
57
57
  end
58
+ ## puts "append_cfg";p @cfg
58
59
  end
59
60
 
60
61
  def [](key)
@@ -126,9 +127,11 @@ module Dyndoc
126
127
  :raw_mode=>false,
127
128
  :model_tmpl=>"default",
128
129
  :model_doc=>"default",
130
+ :exec_mode=>"no",
129
131
  :append => "",
130
132
  :verbose => false,
131
- :debug => false
133
+ :debug => false,
134
+ :ruby_only => false
132
135
  }
133
136
 
134
137
 
@@ -245,6 +248,7 @@ module Dyndoc
245
248
  cfg_cmdline[:doc_list]=Dyndoc.cfg_dyn[:doc_list] unless Dyndoc.cfg_dyn[:doc_list].empty?
246
249
  cfg_cmdline[:cmd]=Dyndoc.cfg_dyn[:cmd_doc] unless Dyndoc.cfg_dyn[:cmd_doc].empty?
247
250
  cfg_cmdline[:model_doc]=Dyndoc.cfg_dyn[:model_doc] unless Dyndoc.cfg_dyn[:model_doc].empty?
251
+ cfg_cmdline[:exec_mode]=Dyndoc.cfg_dyn[:exec_mode] if Dyndoc.cfg_dyn[:exec_mode] and !Dyndoc.cfg_dyn[:exec_mode].empty?
248
252
  cfg_cmdline[:tag_tmpl]=Dyndoc.cfg_dyn[:tag_tmpl] unless Dyndoc.cfg_dyn[:tag_tmpl].empty?
249
253
  cfg_cmdline[:options]=Dyndoc.cfg_dyn[:options] unless Dyndoc.cfg_dyn[:options].empty?
250
254
  ## select doc_list by reading "[#default]" useful in atom
@@ -327,6 +331,7 @@ module Dyndoc
327
331
  :mode_doc => :tex, #execution mode
328
332
  :rootDoc=>"",
329
333
  :model_doc=>"default",
334
+ :exec_mode=>"no",
330
335
  :pre_doc=>[],
331
336
  :post_doc=>[],
332
337
  :cmd=> [], # :save , :cat, :pdf or :png, :view behaving differently depending on the format_doc
@@ -420,8 +425,7 @@ module Dyndoc
420
425
  def make_all
421
426
  #puts "make_all";p @cfg[:cmd]
422
427
  make_prelim
423
- #
424
- puts "make_all";p @cfg[:cmd]
428
+ #puts "make_all";p @cfg[:cmd]
425
429
  cd_new
426
430
  open_log
427
431
 
@@ -432,7 +436,8 @@ puts "make_all";p @cfg[:cmd]
432
436
  # make content
433
437
  make_content if @cfg[:cmd].include? :make_content
434
438
  ##OBSOLETE## @content=make_ttm if @cfg[:format_doc]==:ttm
435
- #puts "make_all";p @cfg[:cmd]
439
+ @cfg[:cmd] -= [:save] if Dyndoc.cfg_dyn[:exec_mode]=="yes"
440
+ #puts "make_all";p [@cfg[:cmd],Dyndoc.cfg_dyn[:exec_mode]]
436
441
  make_save unless (@cfg[:cmd] & [:save,:save!]).empty?
437
442
  ##OBSOLETE## make_pandoc if @cfg[:cmd].include? :pandoc
438
443
  ##OBSOLETE## make_backup if @cfg[:cmd].include? :backup
@@ -586,22 +591,18 @@ puts "make_all";p @cfg[:cmd]
586
591
  nb = @cfg[:options][:pdflatex_nb_pass] || @tmpl_doc.cfg[:options][:pdflatex_nb_pass] || 1
587
592
  if @cfg[:format_doc]==:tex
588
593
  require 'dyntask'
589
- task={cmd: :pdflatex, source: @basename+".tex", content: @content.force_encoding("utf-8"), nb_pass: nb, echo: echo}
590
- task[:workdir]=DynTask.relative_path_from_sys_root(File.expand_path @dirname)
591
- task[:texinputs]=ENV["TEXINPUTS"] if ENV["TEXINPUTS"] and !ENV["TEXINPUTS"].empty?
592
- id=DynTask.add_task(task)
593
- DynTask.save_tasks(id,@basename)
594
+ DynTask.add_task({cmd: :pdflatex, source: "%"+@basename+".tex", content: @content.force_encoding("utf-8"), nb_pass: nb, echo: echo})
595
+ DynTask.save_tasks(@basename)
594
596
  end
595
597
  end
596
598
 
597
599
  def make_task_pandoc
598
600
  filter=@cfg[:format_doc].to_s + "2" + @cfg[:format_output].to_s
599
601
  require 'dyntask'
600
- task={cmd: :pandoc, workdir: @dirname, content: @content.force_encoding("utf-8"), filter: filter}
601
- task[:workdir]=DynTask.relative_path_from_sys_root(File.expand_path @dirname)
602
- task[:source]=@basename+".tex" if ["tex2docx","tex2odt"].include? filter
603
- id=DynTask.add_task(task)
604
- DynTask.save_tasks(id,@basename)
602
+ task={cmd: :pandoc, content: @content.force_encoding("utf-8"), filter: filter}
603
+ task[:source]="%"+@basename+".tex" if ["tex2docx","tex2odt"].include? filter
604
+ DynTask.add_task(task)
605
+ DynTask.save_tasks(@basename)
605
606
  end
606
607
 
607
608
  def make_odt_content_xml
metadata CHANGED
@@ -1,17 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyndoc-ruby-doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CQLS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-06 00:00:00.000000000 Z
11
+ date: 2019-11-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |2
14
- Provide templating in text document.
13
+ description: " Provide templating in text document.\n"
15
14
  email: rdrouilh@gmail.com
16
15
  executables: []
17
16
  extensions: []
@@ -22,7 +21,7 @@ files:
22
21
  homepage: http://cqls.upmf-grenoble.fr
23
22
  licenses:
24
23
  - MIT
25
- - GPL-2
24
+ - GPL-2.0
26
25
  metadata: {}
27
26
  post_install_message:
28
27
  rdoc_options: []
@@ -30,18 +29,17 @@ require_paths:
30
29
  - lib
31
30
  required_ruby_version: !ruby/object:Gem::Requirement
32
31
  requirements:
33
- - - '>='
32
+ - - ">="
34
33
  - !ruby/object:Gem::Version
35
34
  version: '0'
36
35
  required_rubygems_version: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - '>='
37
+ - - ">="
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
40
  requirements:
42
41
  - none
43
- rubyforge_project:
44
- rubygems_version: 2.0.14
42
+ rubygems_version: 3.0.6
45
43
  signing_key:
46
44
  specification_version: 4
47
45
  summary: dyndoc document