dyndoc-ruby-doc 1.1.1 → 1.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/lib/dyndoc/document.rb +9 -9
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edde38388ba718dd3a0e49246f997aa67a66a2b3d3befaf6c3350f9c07784b8d
|
4
|
+
data.tar.gz: 2e1e3513ed2a0555bd9d74a6780e1af388c6b3efab01bc0a5957b7811f73eb25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a73de84b84c9a6c1e8705dfa1791c0df77d0382352699d2630c550de8529fb345411121d7467cd0fcc99072f099e061e6f6585547fb2ab35bab1035170fe4a90
|
7
|
+
data.tar.gz: e236d9d0bf76edab60dc72b166e711a1a91a099531acae2695db13ce364289254527552cda0b302c30175c71ffda4cf09e7b620b6fd42254dcd1592b68cb805f
|
data/lib/dyndoc/document.rb
CHANGED
@@ -69,9 +69,9 @@ module Dyndoc
|
|
69
69
|
|
70
70
|
end
|
71
71
|
|
72
|
-
EMPTY_ODT=File.join(ENV["HOME"],"dyndoc","share","odt","2004","empty.odt") if File.
|
73
|
-
EMPTY_ODT=File.join($dyn_gem_root,"share","odt","2004","emptyTex4Ht.odt") if $dyn_gem_root and File.
|
74
|
-
EMPTY_ODT=File.join("/export/prjCqls","share","rsrc","dyndoc","odt","2004","empty.odt") if File.
|
72
|
+
EMPTY_ODT=File.join(ENV["HOME"],"dyndoc","share","odt","2004","empty.odt") if File.exist? File.join(ENV["HOME"],"dyndoc","share","odt","2004","empty.odt")
|
73
|
+
EMPTY_ODT=File.join($dyn_gem_root,"share","odt","2004","emptyTex4Ht.odt") if $dyn_gem_root and File.exist? File.join($dyn_gem_root,"share","odt","2004","empty.odt")
|
74
|
+
EMPTY_ODT=File.join("/export/prjCqls","share","rsrc","dyndoc","odt","2004","empty.odt") if File.exist? File.join("/export/prjCqls","share","rsrc","dyndoc","odt","2004","empty.odt")
|
75
75
|
|
76
76
|
#just for a shortcut
|
77
77
|
TexDoc={
|
@@ -210,7 +210,7 @@ module Dyndoc
|
|
210
210
|
|
211
211
|
def lib_dyn_content_from(tmpl=nil)
|
212
212
|
code,lib_file = "",nil
|
213
|
-
code=File.read(lib_file) if (lib_file=(Dyndoc::Utils.
|
213
|
+
code=File.read(lib_file) if (lib_file=(Dyndoc::Utils.lib_file_exist? tmpl))
|
214
214
|
return code
|
215
215
|
end
|
216
216
|
|
@@ -235,7 +235,7 @@ module Dyndoc
|
|
235
235
|
|
236
236
|
def cfg_dyn_from(tmpl)
|
237
237
|
code,cfg_file=nil,nil
|
238
|
-
code=File.read(cfg_file) if (cfg_file=(Dyndoc::Utils.
|
238
|
+
code=File.read(cfg_file) if (cfg_file=(Dyndoc::Utils.cfg_file_exist? tmpl))
|
239
239
|
##puts "code";p code;p cfg_file
|
240
240
|
Utils.clean_bom_utf8!(code) if code
|
241
241
|
code="Dyndoc::TexDoc" unless code
|
@@ -482,7 +482,7 @@ module Dyndoc
|
|
482
482
|
=begin
|
483
483
|
# read current path if it exists
|
484
484
|
cur_path=File.join(@dirname,".dyn_path")
|
485
|
-
Dyndoc.setRootDoc(@cfg[:rootDoc],File.read(cur_path).chomp,true) if File.
|
485
|
+
Dyndoc.setRootDoc(@cfg[:rootDoc],File.read(cur_path).chomp,true) if File.exist? cur_path
|
486
486
|
Dyndoc.make_append unless Dyndoc.appendVar
|
487
487
|
=end
|
488
488
|
#p "ici";p @cfg
|
@@ -663,7 +663,7 @@ module Dyndoc
|
|
663
663
|
# As soon as possible when using dropbox or tools
|
664
664
|
def make_old(mode=:rm) #mode=:rm or :save
|
665
665
|
## After introduction of dyntask, the default is to save the old file if existing
|
666
|
-
if File.
|
666
|
+
if File.exist? @filename
|
667
667
|
case mode
|
668
668
|
when :save
|
669
669
|
FileUtils.mkdir_p(File.join(File.dirname(@filename),".save"))
|
@@ -680,7 +680,7 @@ module Dyndoc
|
|
680
680
|
#before saving: make automatic styles!
|
681
681
|
make_odt_content_xml
|
682
682
|
make_odt_automatic_styles
|
683
|
-
FileUtils.cp(EMPTY_ODT,@cfg[:filename_doc]) unless File.
|
683
|
+
FileUtils.cp(EMPTY_ODT,@cfg[:filename_doc]) unless File.exist? @cfg[:filename_doc]
|
684
684
|
require 'zip'
|
685
685
|
@ar=Zip::ZipFile.open(@cfg[:filename_doc])
|
686
686
|
@ar.get_output_stream('content.xml') do |f|
|
@@ -697,7 +697,7 @@ module Dyndoc
|
|
697
697
|
|
698
698
|
## if @content is nil => bad execution
|
699
699
|
if !@content
|
700
|
-
FileUtils.mv(@filename_old,@filename) if @filename_old and File.
|
700
|
+
FileUtils.mv(@filename_old,@filename) if @filename_old and File.exist? @filename_old
|
701
701
|
else
|
702
702
|
## Save new
|
703
703
|
File.open(@cfg[:filename_doc],"w") do |f|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyndoc-ruby-doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CQLS
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: " Provide templating in text document.\n"
|
14
14
|
email: rdrouilh@gmail.com
|
@@ -23,7 +23,7 @@ licenses:
|
|
23
23
|
- MIT
|
24
24
|
- GPL-2.0
|
25
25
|
metadata: {}
|
26
|
-
post_install_message:
|
26
|
+
post_install_message:
|
27
27
|
rdoc_options: []
|
28
28
|
require_paths:
|
29
29
|
- lib
|
@@ -39,8 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
39
|
version: '0'
|
40
40
|
requirements:
|
41
41
|
- none
|
42
|
-
rubygems_version: 3.
|
43
|
-
signing_key:
|
42
|
+
rubygems_version: 3.4.5
|
43
|
+
signing_key:
|
44
44
|
specification_version: 4
|
45
45
|
summary: dyndoc document
|
46
46
|
test_files: []
|