publican_creators 1.1.1 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/{History.rdoc → CHANGELOG.md} +101 -57
- data/CONTRIBUTING.md +14 -18
- data/LICENSE.md +636 -0
- data/MAINTENANCE.md +19 -0
- data/README.md +95 -0
- data/bin/publican_creators.rb +16 -0
- data/bin/revision_creator.rb +17 -6
- data/etc/publicancreators.cfg +3 -3
- data/lib/publican_creators.rb +95 -118
- data/lib/publican_creators/change.rb +98 -120
- data/lib/publican_creators/checker.rb +17 -7
- data/lib/publican_creators/create.rb +17 -11
- data/lib/publican_creators/export.rb +18 -12
- data/lib/publican_creators/get.rb +19 -9
- data/lib/publican_creators/notifier.rb +23 -16
- data/lib/publican_creators/prepare.rb +32 -23
- data/lib/publican_creators/revision.rb +19 -24
- data/lib/publican_creators/testlib.rb +13 -6
- data/lib/publican_creators/version.rb +35 -0
- metadata +69 -233
- data/.autotest +0 -25
- data/.codeclimate.yml +0 -8
- data/.coveralls.yml +0 -2
- data/.gemnasium.yml +0 -5
- data/.rspec +0 -2
- data/.rubocop.yml +0 -40
- data/.scrutinizer.yml +0 -21
- data/.travis.yml +0 -37
- data/.yardopts +0 -9
- data/CODE_OF_CONDUCT.md +0 -17
- data/Gemfile +0 -32
- data/Gemfile.lock +0 -136
- data/LICENSE.rdoc +0 -24
- data/Manifest.txt +0 -36
- data/README.rdoc +0 -99
- data/Rakefile +0 -135
- data/config.reek +0 -111
- data/data/publican_creators/publican-revision.png +0 -0
- data/data/publican_creators/publican.png +0 -0
- data/spec/lib_spec.rb +0 -401
- data/spec/spec_helper.rb +0 -16
data/MAINTENANCE.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# MAINTENANCE POLICY:
|
2
|
+
|
3
|
+
I'm following the Semantic Versioning for its releases: (Major).(Minor).(Patch).
|
4
|
+
|
5
|
+
* Major version: Whenever there is something significant or any backwards
|
6
|
+
incompatible changes.
|
7
|
+
* Minor version: When new, backwards compatible functionality is introduced a
|
8
|
+
minor feature is introduced, or when a set of smaller features is rolled out.
|
9
|
+
* Patch number: When backwards compatible bug fixes are introduced that fix
|
10
|
+
incorrect behavior.
|
11
|
+
* The current stable release will receive security patches and bug fixes
|
12
|
+
(eg. 5.0 -> 5.0.1).
|
13
|
+
* Feature releases will mark the next supported stable release where the minor
|
14
|
+
version is increased numerically by increments of one (eg. 5.0 -> 5.1).
|
15
|
+
|
16
|
+
I encourage everyone to run the latest stable release to ensure that you can
|
17
|
+
easily upgrade to the most secure and feature rich experience. In order to
|
18
|
+
make sure you can easily run the most recent stable release, we are working
|
19
|
+
hard to keep the update process simple and reliable.
|
data/README.md
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
# publican_creators
|
2
|
+
|
3
|
+
## DESCRIPTION:
|
4
|
+
|
5
|
+
publican_creators are a small tool for daily DocBook writers who are using the Redhat publican tool
|
6
|
+
https://fedorahosted.org/publican/.
|
7
|
+
|
8
|
+
publican_creators provides a simple gui for creating new DocBook stuff. It supports different environments, so you can predefine currently
|
9
|
+
three environments (like work, home, home2) and work with them. You also can build to different output targets through
|
10
|
+
the shipped Buildscript.
|
11
|
+
|
12
|
+
The CHANGELOG.md contains a detailed description of what has changed.
|
13
|
+
|
14
|
+
hoe-reek is released under the GPL3 License, see the file 'LICENSE.md' for more information.
|
15
|
+
|
16
|
+
The official website is:
|
17
|
+
|
18
|
+
https://github.com/saigkill/publican_creators
|
19
|
+
|
20
|
+
|What|Where|
|
21
|
+
|-----|-------------------------------------------------------------------------------------|
|
22
|
+
|code | https://github.com/saigkill/publican_creators |
|
23
|
+
|docs | https://saigkill.github.io/publican_creators/ |
|
24
|
+
|apidoc | http://rubydoc.info/gems/publican_creators |
|
25
|
+
|bugs & feature requests | https://github.com/saigkill/publican_creators/issues |
|
26
|
+
|mailing list | https://groups.google.com/forum/#!forum/publican_creators |
|
27
|
+
|openhub statistics | https://www.openhub.net/p/publicancreators |
|
28
|
+
|authors blog | https://saschamanns.de |
|
29
|
+
|min. rubyver | 2.3.0 |
|
30
|
+
|
31
|
+
| What | Status |
|
32
|
+
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
33
|
+
|last public version | [![Last Version](https://badge.fury.io/rb/publican_creators.png)](http://rubygems.org/gems/publican_creators) |
|
34
|
+
|downloads latest | [![Downloads latest](https://img.shields.io/gem/dtv/publican_creators.svg)](http://rubygems.org/gems/publican_creators) |
|
35
|
+
|downloads all | [![Downloads all](https://img.shields.io/gem/dt/publican_creators.svg)](http://rubygems.org/gems/publican_creators) |
|
36
|
+
|code quality | [![Maintainability](https://api.codeclimate.com/v1/badges/e6e62c135374e4c9e495/maintainability)](https://codeclimate.com/github/saigkill/publican_creators/maintainability) |
|
37
|
+
|continuous integration | ![CI](https://github.com/saigkill/publican_creators/workflows/CI/badge.svg?branch=master&event=push) |
|
38
|
+
|dependencies|[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=saigkill/publican_creators)](https://dependabot.com) |
|
39
|
+
|security | [![Security](https://hakiri.io/github/saigkill/publican_creators/master.svg)](https://hakiri.io/github/saigkill/publican_creators/master/shield) |
|
40
|
+
|vulnerabilities|[![Known Vulnerabilities](https://snyk.io/test/github/saigkill/publican_creators/badge.svg?targetFile=Gemfile.lock)](https://snyk.io/test/github/saigkill/publican_creators?targetFile=Gemfile.lock) |
|
41
|
+
|documentation quality | [![Documentation Quality](https://inch-ci.org/github/saigkill/publican_creators.svg?branch=master)](https://inch-ci.org/github/saigkill/publican_creators) |
|
42
|
+
|
43
|
+
|
44
|
+
## SCREENSHOT
|
45
|
+
|
46
|
+
### Main
|
47
|
+
[![Screenshot](https://saschamanns.de//img/screenshots/PublicanCreators.png)](https://github.com/saigkill/publican_creators)
|
48
|
+
|
49
|
+
### Revision Creator
|
50
|
+
[![Screenshot](https://saschamanns.de//img/screenshots/RevisionCreator.png)](https://github.com/saigkill/publican_creators)
|
51
|
+
|
52
|
+
## FEATURES/PROBLEMS:
|
53
|
+
|
54
|
+
* GUI to control publican
|
55
|
+
|
56
|
+
## SYNOPSIS:
|
57
|
+
|
58
|
+
$ publican_creators.rb (Main program)
|
59
|
+
$ revision_creator.rb (The revision updater)
|
60
|
+
|
61
|
+
Or just use the Launcher.
|
62
|
+
|
63
|
+
This Gem was programmed and tested on Linux systems. If anyone would like to make the methods also fit for other OS,
|
64
|
+
I'm happy about Pull requests.
|
65
|
+
|
66
|
+
## REQUIREMENTS:
|
67
|
+
|
68
|
+
* nokogiri
|
69
|
+
* parseconfig
|
70
|
+
* rainbow
|
71
|
+
* notifier
|
72
|
+
|
73
|
+
## REQUIREMENTS (hard dependencies):
|
74
|
+
|
75
|
+
* yad
|
76
|
+
* publican (a 4.x version is needed)
|
77
|
+
|
78
|
+
## INSTALL:
|
79
|
+
|
80
|
+
The installation is very easy.
|
81
|
+
|
82
|
+
gem install publican_creators
|
83
|
+
cd /path/to/gem (In case of using RVM ~/.rvm/gems/ruby-$RUBYVERSION/gems/publican_creators)
|
84
|
+
rake
|
85
|
+
|
86
|
+
You have to run the setup after each gem update.
|
87
|
+
|
88
|
+
## DEVELOPERS:
|
89
|
+
|
90
|
+
After checking out the source, run:
|
91
|
+
|
92
|
+
$ rake newb
|
93
|
+
|
94
|
+
This task will install any missing dependencies, run the tests/specs,
|
95
|
+
and generate the RDoc.
|
data/bin/publican_creators.rb
CHANGED
@@ -1,4 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2013-2020 Sascha Manns <Sascha.Manns@outlook.de>
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
# Dependencies
|
2
18
|
require 'rubygems'
|
3
19
|
require 'publican_creators'
|
4
20
|
require 'bundler/setup'
|
data/bin/revision_creator.rb
CHANGED
@@ -1,9 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# License
|
2
|
+
# Copyright (C) 2013-2020 Sascha Manns <Sascha.Manns@outlook.de>
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
6
16
|
|
7
|
-
|
8
|
-
|
17
|
+
# Dependencies
|
18
|
+
|
19
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '../lib/publican_creators', 'revision.rb'))
|
9
20
|
RevisionCreator.new
|
data/etc/publicancreators.cfg
CHANGED
@@ -4,7 +4,7 @@ conf_ver = '1'
|
|
4
4
|
|
5
5
|
# Global
|
6
6
|
name = 'Sascha Manns'
|
7
|
-
email_private = '
|
7
|
+
email_private = 'Sascha.Manns@outlook.de'
|
8
8
|
|
9
9
|
# Specify your language like de-DE
|
10
10
|
language = 'de-DE'
|
@@ -12,7 +12,7 @@ language = 'de-DE'
|
|
12
12
|
# If you want to use DocBook5 as default so set it there
|
13
13
|
db5 = 'true'
|
14
14
|
|
15
|
-
# Choose if you like to use a special brand or use the
|
15
|
+
# Choose if you like to use a special brand or use the publican default
|
16
16
|
use_brand = 'true'
|
17
17
|
|
18
18
|
# If you write anything do you would like to use the default titlelogo
|
@@ -58,7 +58,7 @@ books_dir_priv = "Dokumente/Textdokumente/publican-manns/books"
|
|
58
58
|
# If you would like to use the publican brand just set brand = ''
|
59
59
|
brand = 'XCOM'
|
60
60
|
company_name = 'XCOM AG'
|
61
|
-
company_division = 'SWE7 (Sascha
|
61
|
+
company_division = 'SWE7 (Sascha B)'
|
62
62
|
email_business = 'Sascha.Manns@xcom.de'
|
63
63
|
|
64
64
|
# System Variables
|
data/lib/publican_creators.rb
CHANGED
@@ -1,52 +1,51 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# @abstract Main Class for PublicanCreators
|
2
|
+
# Copyright (C) 2013-2020 Sascha Manns <Sascha.Manns@outlook.de>
|
4
3
|
#
|
5
|
-
#
|
6
|
-
# License
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
7
16
|
|
8
17
|
# Dependencies
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
18
|
+
require_relative 'publican_creators/checker'
|
19
|
+
require_relative 'publican_creators/get'
|
20
|
+
require_relative 'publican_creators/change'
|
21
|
+
require_relative 'publican_creators/export'
|
22
|
+
require_relative 'publican_creators/prepare'
|
23
|
+
require_relative 'publican_creators/notifier'
|
24
|
+
require_relative 'publican_creators/version'
|
15
25
|
require 'fileutils'
|
16
26
|
require 'nokogiri'
|
17
27
|
require 'rainbow/ext/string'
|
18
|
-
require '
|
19
|
-
require 'manns_shared'
|
28
|
+
require 'xdg'
|
20
29
|
|
21
30
|
# Main Class of PublicanCreators
|
22
31
|
# @return [String] true or false
|
23
32
|
class PublicanCreators
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
my_name = File.basename($PROGRAM_NAME)
|
28
|
-
|
29
|
-
puts "Script: #{my_name}"
|
30
|
-
puts "Version: #{VERSION}"
|
33
|
+
puts 'publican_creators'.color(:yellow)
|
34
|
+
puts "Version: #{VERSION}".color(:yellow)
|
31
35
|
puts
|
32
|
-
puts 'Copyright (C) 2015-
|
33
|
-
puts 'Description: This script creates a article or book set with'
|
34
|
-
puts 'Publican. Then it modifies it for your needs.'
|
35
|
-
puts 'License: GPL-3'
|
36
|
-
puts 'Bugs: Please file bugs on https://
|
37
|
-
|
38
|
-
puts 'Reading the config file in publicancreators.cfg'
|
39
|
-
# @note Run config method who reads in the config file and puts the variables
|
40
|
-
# in
|
41
|
-
#
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
# brand_private, brand_homework, db5, conf_ver, xfc_brand_dir,
|
46
|
-
# pdfview = PublicanCreatorsGet.config
|
47
|
-
|
48
|
-
home = Dir.home
|
49
|
-
config = ParseConfig.new("#{home}/.publican_creators/publicancreators.cfg")
|
36
|
+
puts 'Copyright (C) 2015-2020 Sascha Manns <Sascha.Manns@outlook.de>'.color(:yellow)
|
37
|
+
puts 'Description: This script creates a article or book set with'.color(:yellow)
|
38
|
+
puts 'Publican. Then it modifies it for your needs.'.color(:yellow)
|
39
|
+
puts 'License: GPL-3'.color(:yellow)
|
40
|
+
puts 'Bugs: Please file bugs on https://github.com/saigkill/publican_creators/issues'.color(:yellow)
|
41
|
+
|
42
|
+
puts 'Reading the config file in publicancreators.cfg'.color(:yellow)
|
43
|
+
# @note Run config method who reads in the config file and puts the variables in an array
|
44
|
+
# TODO: Try to fix this in future (conf_ver, use_brand)
|
45
|
+
# rubocop:disable Lint/UselessAssignment
|
46
|
+
xdg = XDG::Environment.new
|
47
|
+
sys_xdg = xdg.config_home
|
48
|
+
config = ParseConfig.new("#{sys_xdg}/publican_creators/publicancreators.cfg")
|
50
49
|
conf_ver = config['conf_ver']
|
51
50
|
name = config['name']
|
52
51
|
email = config['email_private']
|
@@ -70,38 +69,12 @@ class PublicanCreators
|
|
70
69
|
brand_homework = config['brand_homework']
|
71
70
|
db5 = config['db5']
|
72
71
|
xfc_brand_dir = config['xfc_brand_dir']
|
73
|
-
|
74
|
-
|
75
|
-
puts 'Your configuration is:'
|
76
|
-
puts "Your Name: #{name}"
|
77
|
-
puts "Your private emailaddress: #{email}"
|
78
|
-
puts "Your choosen language: #{language}"
|
79
|
-
puts "Using an own brand: #{use_brand}"
|
80
|
-
puts "Leave title_logo: #{title_logo}"
|
81
|
-
puts "Leave legalnotice in article: #{legal}"
|
82
|
-
puts "Choosen brand: #{brand}"
|
83
|
-
puts "Your company name: #{company_name}"
|
84
|
-
puts "Your company division: #{company_division}"
|
85
|
-
puts "Your business email address: #{email_business}"
|
86
|
-
puts "Your brand dir: #{brand_dir}"
|
87
|
-
puts "Your global entities: #{glob_entities}"
|
88
|
-
puts "Your business articles dir: #{articles_dir_business}"
|
89
|
-
puts "Your business reports dir: #{reports_dir_business}"
|
90
|
-
puts "Your business books dir: #{books_dir_business}"
|
91
|
-
puts "Your private articles dir: #{articles_dir_private}"
|
92
|
-
puts "Your homework dir: #{homework_dir_private}"
|
93
|
-
puts "Your private books dir: #{books_dir_private}"
|
94
|
-
puts "Your private brand: #{brand_private}"
|
95
|
-
puts "Your homework brand: #{brand_homework}"
|
96
|
-
puts "DocBook5 as default: #{db5}"
|
97
|
-
puts "Config version: #{conf_ver}"
|
98
|
-
puts "XFC brand dir: #{xfc_brand_dir}"
|
99
|
-
puts "Your prefered PDF-Viewer: #{pdfview}"
|
72
|
+
pdf_view = config['pdfview']
|
100
73
|
|
101
74
|
global_entities = "#{brand_dir}/#{glob_entities}"
|
102
75
|
puts "Your global entities file is there: #{global_entities}"
|
103
76
|
|
104
|
-
# @note Ask for the title and other settings
|
77
|
+
# @note Ask for the title and other settings and put them into a array
|
105
78
|
environment, type, opt, title = PublicanCreatorsGet.title
|
106
79
|
|
107
80
|
puts "Environment: #{environment}"
|
@@ -109,36 +82,31 @@ class PublicanCreators
|
|
109
82
|
puts "Optional: #{opt}"
|
110
83
|
puts "Title: #{title}"
|
111
84
|
|
112
|
-
#
|
113
|
-
# @param [String] opt Can be Report or Homework or Normal
|
114
|
-
# @return [String] report
|
115
|
-
|
85
|
+
# @note Sets the default values
|
116
86
|
report = 'FALSE'
|
117
87
|
homework = 'FALSE'
|
118
88
|
report = 'TRUE' if opt == 'Report'
|
119
89
|
homework = 'TRUE' if opt == 'Homework'
|
120
90
|
|
121
91
|
# @note Hardcoded variables
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
92
|
+
art_info = "#{title}/#{language}/Article_Info.xml"
|
93
|
+
book_info = "#{title}/#{language}/Book_Info.xml"
|
94
|
+
rev_hist = "#{title}/#{language}/Revision_History.xml"
|
95
|
+
a_group = "#{title}/#{language}/Author_Group.xml"
|
126
96
|
ent = "#{title}/#{language}/#{title}.ent"
|
127
97
|
builds = "#{title}/#{language}/Rakefile"
|
128
98
|
|
129
|
-
#
|
130
|
-
# @param [String]
|
131
|
-
# @param [String]
|
132
|
-
# reports
|
133
|
-
# @param [String] articles_dir_business path to that dir where you store
|
134
|
-
# business articles
|
99
|
+
# Run one of the both methods to get the variable targetdir
|
100
|
+
# @param [String] environment Comes from PublicanCreatorsGet.title
|
101
|
+
# @param [String] type Comes from PublicanCreatorsGet.title
|
135
102
|
# @param [String] report true or false
|
136
|
-
# @param [String]
|
137
|
-
#
|
138
|
-
# @param [String]
|
139
|
-
# @param [String] articles_dir_private
|
140
|
-
# @param [String] homework
|
141
|
-
# @param [String]
|
103
|
+
# @param [String] reports_dir_business comes from publicancreators.cfg
|
104
|
+
# @param [String] articles_dir_business comes from publicancreators.cfg
|
105
|
+
# @param [String] books_dir_business comes from publicancreators.cfg
|
106
|
+
# @param [String] articles_dir_private comes from publicancreators.cfg
|
107
|
+
# @param [String] homework true or false
|
108
|
+
# @param [String] homework_dir_private comes from publicancreators.cfg
|
109
|
+
# @param [String] books_dir_private comes from publicancreators.cfg
|
142
110
|
targetdir = PublicanCreatorsPrepare.targetdir(environment, type, report,
|
143
111
|
reports_dir_business,
|
144
112
|
articles_dir_business,
|
@@ -147,23 +115,21 @@ class PublicanCreators
|
|
147
115
|
homework_dir_private,
|
148
116
|
books_dir_private)
|
149
117
|
|
150
|
-
#
|
151
|
-
# creates one.
|
118
|
+
# Checks if the needed directory targetdir is available. Otherwise it creates one.
|
152
119
|
puts "Creating directory #{targetdir}"
|
153
|
-
# @param [String] targetdir comes from PublicanCreatorsPrepare.prepare_work or
|
154
|
-
|
155
|
-
MannsShared.check_dir(targetdir)
|
120
|
+
# @param [String] targetdir comes from PublicanCreatorsPrepare.prepare_work or .prepare_private
|
121
|
+
Checker.check_dir(targetdir)
|
156
122
|
|
157
123
|
# @note Change to target directory
|
158
124
|
puts 'Change to this directory'
|
159
|
-
# @param [String] targetdir comes from PublicanCreatorsPrepare.prepare_work or
|
160
|
-
# .prepare_private
|
125
|
+
# @param [String] targetdir comes from PublicanCreatorsPrepare.prepare_work or .prepare_private
|
161
126
|
FileUtils.cd(targetdir) do
|
162
|
-
#
|
163
|
-
# @param [String]
|
164
|
-
# @param [String]
|
165
|
-
# @param [String]
|
166
|
-
#
|
127
|
+
# This method checks the environment and runs the method for
|
128
|
+
# @param [String] environment Comes from PublicanCreatorsGet.title
|
129
|
+
# @param [String] title Comes from PublicanCreatorsGet.title
|
130
|
+
# @param [String] type Comes from PublicanCreatorsGet.title
|
131
|
+
# @param [String] language Comes from publicancreators.cfg
|
132
|
+
# @param [String] brand e.g. Debian or nothing for using publicans default brand (config file)
|
167
133
|
# @param [String] db5 DocBook5 as default? (config file)
|
168
134
|
# @param [String] homework true or false
|
169
135
|
# @param [String] brand_homework e.g. ils (config file)
|
@@ -172,62 +138,73 @@ class PublicanCreators
|
|
172
138
|
brand, db5, homework,
|
173
139
|
brand_homework, brand_private)
|
174
140
|
|
175
|
-
#
|
141
|
+
# By working for my employer i'm creating publications which refers to a global entity file.
|
142
|
+
# This method adds the entities from that file into the local one. It returns a success or fail.
|
176
143
|
# @param [String] environment Work or Private
|
177
|
-
# @param [String] global_entities path to a global entities file
|
178
|
-
#
|
179
|
-
# @param [String] brand e.g. Debian or nothing for using publicans default
|
180
|
-
# brand (config file)
|
144
|
+
# @param [String] global_entities path to a global entities file (config file)
|
145
|
+
# @param [String] ent Path to Entityfile
|
181
146
|
PublicanCreatorsChange.add_entity(environment, global_entities, ent)
|
182
147
|
|
148
|
+
# In this method the standard-holder from the local entity-file will be replaced with the company_name or if it
|
149
|
+
# is a private work the name of the present user. It returns a sucess or fail.
|
183
150
|
# @param [String] title comes from titleget[3]
|
184
151
|
# @param [String] environment Work or Private
|
185
152
|
# @param [String] name your name (config file)
|
186
153
|
# @param [String] company_name (config file)
|
154
|
+
# @param [String] ent Path to Entityfile
|
187
155
|
PublicanCreatorsChange.change_holder(title, environment, name, company_name,
|
188
156
|
ent)
|
189
157
|
|
190
|
-
#
|
158
|
+
# This method removes the XI-Includes for the legal notice. It returns a sucess or fail.
|
191
159
|
# @param [String] environment Work or Private
|
192
160
|
# @param [String] type Book or Article
|
193
161
|
# @param [String] legal remove legalnotice from article? (config file)
|
194
|
-
|
162
|
+
# @param [String] art_info Path to Article_Info.xml
|
163
|
+
PublicanCreatorsChange.remove_legal(environment, type, legal, art_info)
|
195
164
|
|
196
|
-
#
|
197
|
-
# @param [String]
|
165
|
+
# Checks if bookinfo or artinfo is needed, then it starts remove_orgname
|
166
|
+
# @param [String] art_info path to Article_Info (hardcoded)
|
167
|
+
# @param [String] book_info path to Book_Info (hardcoded)
|
198
168
|
# @param [String] title_logo remove titlelogo from articlepage (config file)
|
199
169
|
# @param [String] type Book or Article
|
200
|
-
PublicanCreatorsChange.remove_orgname_prepare(
|
170
|
+
PublicanCreatorsChange.remove_orgname_prepare(book_info, art_info, title_logo,
|
201
171
|
type)
|
202
172
|
|
173
|
+
# This method splits the name variable into firstname and surname. These variables are setted into the
|
174
|
+
# Revision_History. If the environment is "Work" your email_business will be used, otherwise your private
|
175
|
+
# email_address. It returns a sucess or fail.
|
203
176
|
# @param [String] environment Work or Private
|
204
177
|
# @param [String] name your name (config file)
|
205
178
|
# @param [String] email_business business email address (config file)
|
206
|
-
# @param [String]
|
179
|
+
# @param [String] email private email address (config file)
|
180
|
+
# @param [String] rev_hist Path to Revision_History.xml
|
207
181
|
PublicanCreatorsChange.fix_revhist(environment, name, email_business, email,
|
208
|
-
|
182
|
+
rev_hist)
|
209
183
|
|
210
|
-
#
|
184
|
+
# This method replaces the standard values from Author_Group to the present user issues. It will be launched for
|
185
|
+
# the Work environment. It returns a sucess or fail.
|
211
186
|
# @param [String] name your name (config file)
|
212
187
|
# @param [String] email_business business email address (config file)
|
213
188
|
# @param [String] company_name your company's name (config file)
|
214
189
|
# @param [String] company_division your companiy's division
|
215
190
|
# @param [String] email your private email address
|
191
|
+
# @param [String] environment Work or Private
|
192
|
+
# @param [String] a_group Path to Author_Group.xml
|
216
193
|
PublicanCreatorsChange.fix_authorgroup(name, email_business, company_name,
|
217
194
|
company_division, email, environment,
|
218
|
-
|
195
|
+
a_group)
|
219
196
|
|
220
|
-
#
|
197
|
+
# Exports a predefined Shellscript to the target directory. It returns a sucess or fail.
|
198
|
+
# @param [String] title comes from PublicanCreatorsGet.title
|
221
199
|
# @param [String] builds path to buildscript (hardcoded)
|
222
200
|
# @param [String] language comes from config file in format de-DE
|
223
|
-
# @param [String] xfc_brand_dir if present the path to your branded xfc
|
224
|
-
#
|
225
|
-
# @param [String] pdfview your prefered PDF-Viewer (config file)
|
201
|
+
# @param [String] xfc_brand_dir if present the path to your branded xfc stylesheets (config file)
|
202
|
+
# @param [String] pdf_view your prefered PDF-Viewer (config file)
|
226
203
|
PublicanCreatorsExport.export_buildscript(title, builds, language,
|
227
|
-
xfc_brand_dir,
|
204
|
+
xfc_brand_dir, pdf_view)
|
228
205
|
|
229
|
-
puts "Now you can find your documentation there: #{targetdir}/#{title}"
|
206
|
+
puts "Now you can find your documentation there: #{targetdir}/#{title}".color(:green)
|
230
207
|
Notifier.run
|
231
|
-
puts "Thanks for using:
|
208
|
+
puts "Thanks for using: publican_creators #{PublicanCreators::Version::STRING}".color(:green)
|
232
209
|
end
|
233
210
|
end
|