libis-format 1.0.5 → 1.0.8
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 +3 -1
- data/.travis.yml +32 -20
- data/base/Dockerfile +22 -2
- data/base/Dockerfile.alpine +20 -0
- data/base/Dockerfile.rvm +56 -0
- data/base/rework_path +25 -0
- data/docker_cfg.yml +1 -0
- data/lib/libis/format/config.rb +2 -0
- data/lib/libis/format/converter/email_converter.rb +40 -0
- data/lib/libis/format/tool/email_to_pdf.rb +40 -0
- data/lib/libis/format/type_database.rb +1 -2
- data/lib/libis/format/type_database_impl.rb +1 -1
- data/lib/libis/format/version.rb +1 -1
- data/libis-format.gemspec +2 -1
- data/tools/fop/fop.bat +75 -75
- data/tools/fop/fop.cmd +31 -31
- data/tools/fop/fop.js +341 -341
- data/tools/fop/lib/avalon-framework.NOTICE.TXT +11 -11
- data/tools/fop/lib/xml-apis.LICENSE-SAX.html +17 -17
- data/tools/fop/lib/xml-apis.LICENSE.DOM-documentation.html +74 -74
- data/tools/fop/lib/xml-apis.LICENSE.DOM-software.html +66 -66
- metadata +9 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b4de569e2d7055cf0d08602b481e3e7e2eb981a3dfc81968b2ebb19239244ffb
|
|
4
|
+
data.tar.gz: 402ec6e4ab234d75e8dadc3bf862398cb81dd7563d7c316279aad82f098ab3e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38bb64081e41ca8abe3e43b26610989162f5b6cc9f3f4e0123d524d5519dbb879dd0a1634920ceb78690cd06ee81dc8bfdf8a7cf0e6719832f399c716d8a4c7c
|
|
7
|
+
data.tar.gz: 70c249c6b0814614e7408bb9fa7b448af8db3ea54bda3028f7a49ac79987e254b309a53effa3334713e3e853c09942809bb26d2b4ee09e79823ee50c88661c12
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
|
@@ -2,36 +2,51 @@ language: ruby
|
|
|
2
2
|
sudo: false
|
|
3
3
|
dist: trusty
|
|
4
4
|
cache: bundler
|
|
5
|
+
|
|
5
6
|
rvm:
|
|
6
|
-
- 2.
|
|
7
|
-
- 2.
|
|
8
|
-
- 2.
|
|
9
|
-
- 2.
|
|
7
|
+
- 2.3
|
|
8
|
+
- 2.4
|
|
9
|
+
- 2.5
|
|
10
|
+
- 2.6
|
|
10
11
|
- ruby-head
|
|
11
|
-
- jruby-9.
|
|
12
|
-
- jruby-9.1.9.0
|
|
12
|
+
- jruby-9.1
|
|
13
13
|
- jruby-head
|
|
14
14
|
jdk:
|
|
15
15
|
- openjdk8
|
|
16
|
-
-
|
|
16
|
+
- openjdk10
|
|
17
|
+
- openjdk11
|
|
17
18
|
matrix:
|
|
18
19
|
exclude:
|
|
19
|
-
- rvm: 2.
|
|
20
|
-
jdk:
|
|
21
|
-
- rvm: 2.
|
|
22
|
-
jdk:
|
|
23
|
-
- rvm: 2.
|
|
24
|
-
jdk:
|
|
25
|
-
- rvm: 2.4
|
|
26
|
-
jdk:
|
|
20
|
+
- rvm: 2.3
|
|
21
|
+
jdk: openjdk10
|
|
22
|
+
- rvm: 2.3
|
|
23
|
+
jdk: openjdk11
|
|
24
|
+
- rvm: 2.4
|
|
25
|
+
jdk: openjdk10
|
|
26
|
+
- rvm: 2.4
|
|
27
|
+
jdk: openjdk11
|
|
28
|
+
- rvm: 2.5
|
|
29
|
+
jdk: openjdk10
|
|
30
|
+
- rvm: 2.5
|
|
31
|
+
jdk: openjdk11
|
|
32
|
+
- rvm: 2.6
|
|
33
|
+
jdk: openjdk10
|
|
34
|
+
- rvm: 2.6
|
|
35
|
+
jdk: openjdk11
|
|
27
36
|
- rvm: ruby-head
|
|
28
|
-
jdk:
|
|
37
|
+
jdk: openjdk10
|
|
38
|
+
- rvm: ruby-head
|
|
39
|
+
jdk: openjdk11
|
|
29
40
|
allow_failures:
|
|
30
41
|
- rvm: ruby-head
|
|
31
42
|
- rvm: jruby-head
|
|
32
43
|
branches:
|
|
33
44
|
only:
|
|
34
45
|
- master
|
|
46
|
+
|
|
47
|
+
env:
|
|
48
|
+
- LC_ALL=en_IE.UTF-8
|
|
49
|
+
|
|
35
50
|
before_install:
|
|
36
51
|
- sudo add-apt-repository ppa:mc3man/trusty-media -y
|
|
37
52
|
- sudo apt-get update -y -q
|
|
@@ -44,10 +59,7 @@ before_install:
|
|
|
44
59
|
- sudo chmod 755 /opt/droid/droid.sh
|
|
45
60
|
- sudo locale-gen "en_US.UTF-8"
|
|
46
61
|
- sudo dpkg-reconfigure locales
|
|
47
|
-
- echo "8\n9\n" | sudo
|
|
48
|
-
env:
|
|
49
|
-
- LC_ALL=en_US.UTF-8
|
|
50
|
-
- LANG=en_US.UTF-8
|
|
62
|
+
- echo "8\n9\n" | sudo dpkg-reconfigure tzdata
|
|
51
63
|
addons:
|
|
52
64
|
apt:
|
|
53
65
|
packages:
|
data/base/Dockerfile
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
FROM ubuntu:18.04
|
|
2
|
-
RUN apt-get -q update
|
|
3
|
-
|
|
2
|
+
RUN apt-get -q update \
|
|
3
|
+
&& apt-get install -q -y --no-install-recommends \
|
|
4
|
+
wget \
|
|
5
|
+
unzip \
|
|
6
|
+
imagemagick \
|
|
7
|
+
python2.7 \
|
|
8
|
+
python-pip \
|
|
9
|
+
openjdk-8-jre-headless \
|
|
10
|
+
libreoffice \
|
|
11
|
+
ghostscript
|
|
12
|
+
|
|
13
|
+
RUN apt-get clean \
|
|
14
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
15
|
+
|
|
4
16
|
RUN pip install --upgrade pip && pip install opf-fido
|
|
17
|
+
|
|
5
18
|
RUN wget -q -O droid.zip "http://www.nationalarchives.gov.uk/documents/information-management/droid-binary-6.4-bin.zip" \
|
|
6
19
|
&& mkdir -p /opt/droid \
|
|
7
20
|
&& unzip -d /opt/droid droid.zip \
|
|
8
21
|
&& chmod 755 /opt/droid/droid.sh \
|
|
9
22
|
&& rm droid.zip
|
|
23
|
+
|
|
10
24
|
RUN wget -q -O fop.tar.gz "http://www.apache.org/dyn/closer.cgi?filename=/xmlgraphics/fop/binaries/fop-2.3-bin.tar.gz&action=download" \
|
|
11
25
|
&& mkdir -p /opt/fop \
|
|
12
26
|
&& tar xzf fop.tar.gz -C /opt/fop --strip-components=2 \
|
|
13
27
|
&& rm fop.tar.gz
|
|
28
|
+
|
|
29
|
+
RUN echo "8\n9\n" | apt-get install tzdata
|
|
30
|
+
ADD ./tools /tools
|
|
31
|
+
ADD ./data /config
|
|
32
|
+
ADD ./spec/data /data
|
|
33
|
+
CMD /bin/bash
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
FROM alpine:3.8
|
|
2
|
+
LABEL maintainer="kris.dekeyser@libis.be"
|
|
3
|
+
RUN apk update -q && apk upgrade -q
|
|
4
|
+
RUN apk add -q python2 py-pip openjdk8-jre ffmpeg libreoffice ttf-liberation ttf-freefont ttf-opensans sox git wget unzip sudo bash curl tar imagemagick
|
|
5
|
+
# install fido
|
|
6
|
+
RUN pip install -q --upgrade pip && pip install -q opf-fido
|
|
7
|
+
# install droid
|
|
8
|
+
RUN wget -q -O droid.zip http://www.nationalarchives.gov.uk/documents/information-management/droid-binary-6.4-bin.zip \
|
|
9
|
+
&& mkdir -p /opt/droid \
|
|
10
|
+
&& unzip -q -d /opt/droid droid.zip \
|
|
11
|
+
&& chmod 755 /opt/droid/droid.sh \
|
|
12
|
+
&& rm droid.zip
|
|
13
|
+
# install ImageMagick
|
|
14
|
+
RUN apk add -q imagemagick
|
|
15
|
+
ADD ../tools /tools
|
|
16
|
+
ADD ../data /cfg
|
|
17
|
+
VOLUME /data
|
|
18
|
+
WORKDIR /data
|
|
19
|
+
|
|
20
|
+
CMD ["/bin/bash", "-l"]
|
data/base/Dockerfile.rvm
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
ARG ubuntu_ver=latest
|
|
2
|
+
ARG ruby_ver=2.5.3
|
|
3
|
+
ARG node_ver=10.15.0
|
|
4
|
+
|
|
5
|
+
FROM ubuntu:${ubuntu_ver}
|
|
6
|
+
LABEL maintainer="kris.dekeyser@libis.be"
|
|
7
|
+
|
|
8
|
+
ENV RUBY_ENV=${ruby_ver}
|
|
9
|
+
ENV NVM_DIR=/usr/local/nvm
|
|
10
|
+
ENV NODE_VER=${node_ver}
|
|
11
|
+
ENV NODE_PATH=$NVM_DIR/v$NODE_VER/lib/node_modules
|
|
12
|
+
ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VER/bin
|
|
13
|
+
ENV PATH "${PATH}:${NODE_PATH}:${NODE_PATH}/npm"
|
|
14
|
+
|
|
15
|
+
RUN echo $RUBY_ENV
|
|
16
|
+
|
|
17
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
18
|
+
RUN apt-get update -q \
|
|
19
|
+
&& apt-get install -y -q --no-install-recommends software-properties-common apt-utils
|
|
20
|
+
RUN apt-add-repository -y ppa:rael-gc/rvm \
|
|
21
|
+
&& apt-get update -q
|
|
22
|
+
RUN apt-get install -y -q --no-install-recommends \
|
|
23
|
+
build-essential \
|
|
24
|
+
gnupg2 \
|
|
25
|
+
git \
|
|
26
|
+
wget \
|
|
27
|
+
curl \
|
|
28
|
+
sudo \
|
|
29
|
+
unzip \
|
|
30
|
+
openjdk-8-jre-headless
|
|
31
|
+
|
|
32
|
+
ENV BASH_ENV='/etc/profile exec bash'
|
|
33
|
+
SHELL ["/bin/bash", "-l", "-c"]
|
|
34
|
+
|
|
35
|
+
RUN addgroup --gid 2000 teneo \
|
|
36
|
+
&& adduser --uid 2000 --gid 2000 --disabled-password --gecos "Teneo user" teneo \
|
|
37
|
+
&& usermod -L -s /bin/bash teneo
|
|
38
|
+
RUN echo 'teneo ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers
|
|
39
|
+
|
|
40
|
+
USER teneo
|
|
41
|
+
|
|
42
|
+
RUN gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
|
|
43
|
+
|
|
44
|
+
RUN curl -sSL https://get.rvm.io | bash -s stable
|
|
45
|
+
|
|
46
|
+
RUN echo 'gem: --no-document' > ${HOME}/.gemrc
|
|
47
|
+
RUN echo rvm install ${ruby_ver}
|
|
48
|
+
RUN echo rvm use ${RUBY_ENV}@teneo --create --ruby-version --ruby-gems
|
|
49
|
+
|
|
50
|
+
# required due to bug in rubygems (https://github.com/rubygems/rubygems/issues/2483)
|
|
51
|
+
RUN gem install rdoc bundler
|
|
52
|
+
RUN gem update --no-document --system
|
|
53
|
+
RUN rvm info
|
|
54
|
+
#ADD . /home/libis/libis_format
|
|
55
|
+
#WORKDIR /home/libis/libis_format
|
|
56
|
+
#RUN bundle install && bundle exec rake spec
|
data/base/rework_path
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
#file=${1/$SRC_PATH/$TGT_PATH}
|
|
4
|
+
#echo "$1 -> $file"
|
|
5
|
+
|
|
6
|
+
CMD=$1
|
|
7
|
+
shift
|
|
8
|
+
|
|
9
|
+
readarray -d ',' -t mapping <<< "$VOLUME_MAPPING"
|
|
10
|
+
|
|
11
|
+
args=("$@")
|
|
12
|
+
echo "args: ${args[@]}"
|
|
13
|
+
#args="${args[@]/$SRC_PATH/$TGT_PATH}"
|
|
14
|
+
#args="${args[@]/$SRC_TMP/$TGT_TMP}"
|
|
15
|
+
for map in "${mapping[@]}"
|
|
16
|
+
do
|
|
17
|
+
map="${map//[$'\t\r\n ']}"
|
|
18
|
+
readarray -d '=' -t m <<< "$map"
|
|
19
|
+
src="${m[0]//[$'\t\r\n ']}"
|
|
20
|
+
tgt="${m[1]//[$'\t\r\n ']}"
|
|
21
|
+
echo "$src -> $tgt"
|
|
22
|
+
args="${args[@]/$src/$tgt}"
|
|
23
|
+
echo "args: ${args[@]}"
|
|
24
|
+
done
|
|
25
|
+
echo $CMD "${args[@]}"
|
data/docker_cfg.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:fop_jar: '/tools/fop.jar'
|
data/lib/libis/format/config.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Libis
|
|
|
12
12
|
Config[:java_cmd] = 'java'
|
|
13
13
|
Config[:j2k_cmd] = 'j2kdriver'
|
|
14
14
|
Config[:soffice_cmd] = 'soffice'
|
|
15
|
+
Config[:emai2pdf_cmd] = 'convert_email'
|
|
15
16
|
Config[:ghostscript_cmd] = 'gs'
|
|
16
17
|
Config[:droid_cmd] = '/opt/droid/droid.sh'
|
|
17
18
|
Config[:droid_temp_path] = '/tmp'
|
|
@@ -34,6 +35,7 @@ module Libis
|
|
|
34
35
|
fop: 5 * 60,
|
|
35
36
|
identification_tool: 5 * 60,
|
|
36
37
|
office_to_pdf: 5 * 60,
|
|
38
|
+
email2pdf: 5 * 60,
|
|
37
39
|
pdf_copy: 5 * 60,
|
|
38
40
|
pdf_merge: 5 * 60,
|
|
39
41
|
pdf_optimizer: 5 * 60,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require_relative 'base'
|
|
4
|
+
|
|
5
|
+
require 'libis/format/tool/email_to_pdf'
|
|
6
|
+
require 'libis/format/type_database'
|
|
7
|
+
|
|
8
|
+
module Libis
|
|
9
|
+
module Format
|
|
10
|
+
module Converter
|
|
11
|
+
|
|
12
|
+
class EmailConverter < Libis::Format::Converter::Base
|
|
13
|
+
|
|
14
|
+
def self.input_types
|
|
15
|
+
[ :MSG ]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def self.output_types(format = nil)
|
|
19
|
+
return [] unless input_types.include?(format)
|
|
20
|
+
[ :PDF ]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def email_convert(_)
|
|
24
|
+
#force usage of this converter
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def convert(source, target, format, opts = {})
|
|
28
|
+
super
|
|
29
|
+
|
|
30
|
+
return nil unless Format::Tool::EmailToPdf.run(source, target)
|
|
31
|
+
|
|
32
|
+
target
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
require 'fileutils'
|
|
2
|
+
|
|
3
|
+
require 'libis/tools/extend/string'
|
|
4
|
+
require 'libis/tools/logger'
|
|
5
|
+
require 'libis/tools/command'
|
|
6
|
+
|
|
7
|
+
require 'libis/format/config'
|
|
8
|
+
|
|
9
|
+
module Libis
|
|
10
|
+
module Format
|
|
11
|
+
module Tool
|
|
12
|
+
|
|
13
|
+
class EmailToPdf
|
|
14
|
+
include ::Libis::Tools::Logger
|
|
15
|
+
|
|
16
|
+
def self.run(source, target, options = {})
|
|
17
|
+
self.new.run source, target, options
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def run(source, target, _ = {})
|
|
21
|
+
timeout = Libis::Format::Config[:timeouts][:email2pdf] || 120
|
|
22
|
+
result = Libis::Tools::Command.run(
|
|
23
|
+
Libis::Format::Config[:email2pdf_cmd],
|
|
24
|
+
source,
|
|
25
|
+
target,
|
|
26
|
+
timeout: timeout,
|
|
27
|
+
kill_after: timeout * 2
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
raise RuntimeError, "#{self.class} took too long (> #{timeout} seconds) to complete" if result[:timeout]
|
|
31
|
+
warn "EmailToPdf conversion messages: \n\t#{result[:out].join("\n\t")}" unless result[:err].empty?
|
|
32
|
+
raise RuntimeError, "#{self.class} failed to generate target file #{target}" unless File.exist?(target)
|
|
33
|
+
|
|
34
|
+
nil
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
data/lib/libis/format/version.rb
CHANGED
data/libis-format.gemspec
CHANGED
|
@@ -4,6 +4,7 @@ lib = File.expand_path('../lib', __FILE__)
|
|
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
|
6
6
|
require 'libis/format/version'
|
|
7
|
+
require 'bundler'
|
|
7
8
|
|
|
8
9
|
Gem::Specification.new do |spec|
|
|
9
10
|
spec.name = 'libis-format'
|
|
@@ -26,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
26
27
|
spec.add_development_dependency 'rspec', '~> 3.1'
|
|
27
28
|
spec.add_development_dependency 'awesome_print'
|
|
28
29
|
spec.add_development_dependency 'equivalent-xml', '~> 0.5'
|
|
29
|
-
if spec.platform == Gem::Platform::JAVA
|
|
30
|
+
if Gem::Platform::JAVA && spec.platform == Gem::Platform::JAVA
|
|
30
31
|
spec.add_development_dependency 'saxon-xslt'
|
|
31
32
|
else
|
|
32
33
|
spec.add_development_dependency 'nokogiri'
|
data/tools/fop/fop.bat
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
@ECHO OFF
|
|
2
|
-
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
-
REM contributor license agreements. See the NOTICE file distributed with
|
|
4
|
-
REM this work for additional information regarding copyright ownership.
|
|
5
|
-
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
-
REM (the "License"); you may not use this file except in compliance with
|
|
7
|
-
REM the License. You may obtain a copy of the License at
|
|
8
|
-
REM
|
|
9
|
-
REM http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
REM
|
|
11
|
-
REM Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
REM distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
REM See the License for the specific language governing permissions and
|
|
15
|
-
REM limitations under the License.
|
|
16
|
-
REM $Id: fop.bat 1736993 2016-03-29 09:19:30Z ssteiner $
|
|
17
|
-
|
|
18
|
-
SETLOCAL ENABLEDELAYEDEXPANSION
|
|
19
|
-
|
|
20
|
-
rem %~dp0 is the expanded pathname of the current script under NT
|
|
21
|
-
set LOCAL_FOP_HOME=
|
|
22
|
-
if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME="%~dp0"
|
|
23
|
-
|
|
24
|
-
rem Code from Apache Ant project
|
|
25
|
-
rem Slurp the command line arguments. This loop allows for an unlimited number
|
|
26
|
-
rem of arguments (up to the command line limit, anyway).
|
|
27
|
-
rem Could also do a "shift" and "%*" for all params, but apparently doesn't work
|
|
28
|
-
rem with Win9x.
|
|
29
|
-
set FOP_CMD_LINE_ARGS=%1
|
|
30
|
-
if ""%1""=="""" goto doneStart
|
|
31
|
-
shift
|
|
32
|
-
:setupArgs
|
|
33
|
-
if ""%1""=="""" goto doneStart
|
|
34
|
-
set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1
|
|
35
|
-
shift
|
|
36
|
-
goto setupArgs
|
|
37
|
-
rem This label provides a place for the argument list loop to break out
|
|
38
|
-
rem and for NT handling to skip to.
|
|
39
|
-
:doneStart
|
|
40
|
-
|
|
41
|
-
set LOGCHOICE=
|
|
42
|
-
rem The default commons logger for JDK1.4 is JDK1.4Logger.
|
|
43
|
-
rem To use a different logger, uncomment the one desired below
|
|
44
|
-
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
|
|
45
|
-
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
|
|
46
|
-
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
|
|
47
|
-
|
|
48
|
-
set LOGLEVEL=
|
|
49
|
-
rem Logging levels
|
|
50
|
-
rem Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger.
|
|
51
|
-
rem To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%\JRE\LIB\logging.properties
|
|
52
|
-
rem file instead.
|
|
53
|
-
rem Possible SimpleLog values: "trace", "debug", "info" (default), "warn", "error", or "fatal".
|
|
54
|
-
rem set LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO
|
|
55
|
-
|
|
56
|
-
set LIBDIR=%LOCAL_FOP_HOME%lib
|
|
57
|
-
|
|
58
|
-
set LOCALCLASSPATH=%FOP_HYPHENATION_PATH%
|
|
59
|
-
for %%l in (%LOCAL_FOP_HOME%build\*.jar %LIBDIR%\*.jar %LOCAL_FOP_HOME%target\*.jar) do set LOCALCLASSPATH=!LOCALCLASSPATH!;%%l
|
|
60
|
-
|
|
61
|
-
set JAVAOPTS=-Denv.windir=%WINDIR%
|
|
62
|
-
|
|
63
|
-
if "%JAVA_HOME%" == "" goto noJavaHome
|
|
64
|
-
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
|
65
|
-
if "%JAVACMD%" == "" set JAVACMD=%JAVA_HOME%\bin\java
|
|
66
|
-
goto runFop
|
|
67
|
-
|
|
68
|
-
:noJavaHome
|
|
69
|
-
if "%JAVACMD%" == "" set JAVACMD=java
|
|
70
|
-
|
|
71
|
-
:runFop
|
|
72
|
-
rem echo "%JAVACMD%" %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
|
|
73
|
-
"%JAVACMD%" %JAVAOPTS% %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" %FOP_OPTS% org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
|
|
74
|
-
|
|
75
|
-
ENDLOCAL
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
REM contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
REM this work for additional information regarding copyright ownership.
|
|
5
|
+
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
REM (the "License"); you may not use this file except in compliance with
|
|
7
|
+
REM the License. You may obtain a copy of the License at
|
|
8
|
+
REM
|
|
9
|
+
REM http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
REM
|
|
11
|
+
REM Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
REM distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
REM See the License for the specific language governing permissions and
|
|
15
|
+
REM limitations under the License.
|
|
16
|
+
REM $Id: fop.bat 1736993 2016-03-29 09:19:30Z ssteiner $
|
|
17
|
+
|
|
18
|
+
SETLOCAL ENABLEDELAYEDEXPANSION
|
|
19
|
+
|
|
20
|
+
rem %~dp0 is the expanded pathname of the current script under NT
|
|
21
|
+
set LOCAL_FOP_HOME=
|
|
22
|
+
if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME="%~dp0"
|
|
23
|
+
|
|
24
|
+
rem Code from Apache Ant project
|
|
25
|
+
rem Slurp the command line arguments. This loop allows for an unlimited number
|
|
26
|
+
rem of arguments (up to the command line limit, anyway).
|
|
27
|
+
rem Could also do a "shift" and "%*" for all params, but apparently doesn't work
|
|
28
|
+
rem with Win9x.
|
|
29
|
+
set FOP_CMD_LINE_ARGS=%1
|
|
30
|
+
if ""%1""=="""" goto doneStart
|
|
31
|
+
shift
|
|
32
|
+
:setupArgs
|
|
33
|
+
if ""%1""=="""" goto doneStart
|
|
34
|
+
set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1
|
|
35
|
+
shift
|
|
36
|
+
goto setupArgs
|
|
37
|
+
rem This label provides a place for the argument list loop to break out
|
|
38
|
+
rem and for NT handling to skip to.
|
|
39
|
+
:doneStart
|
|
40
|
+
|
|
41
|
+
set LOGCHOICE=
|
|
42
|
+
rem The default commons logger for JDK1.4 is JDK1.4Logger.
|
|
43
|
+
rem To use a different logger, uncomment the one desired below
|
|
44
|
+
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
|
|
45
|
+
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
|
|
46
|
+
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
|
|
47
|
+
|
|
48
|
+
set LOGLEVEL=
|
|
49
|
+
rem Logging levels
|
|
50
|
+
rem Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger.
|
|
51
|
+
rem To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%\JRE\LIB\logging.properties
|
|
52
|
+
rem file instead.
|
|
53
|
+
rem Possible SimpleLog values: "trace", "debug", "info" (default), "warn", "error", or "fatal".
|
|
54
|
+
rem set LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO
|
|
55
|
+
|
|
56
|
+
set LIBDIR=%LOCAL_FOP_HOME%lib
|
|
57
|
+
|
|
58
|
+
set LOCALCLASSPATH=%FOP_HYPHENATION_PATH%
|
|
59
|
+
for %%l in (%LOCAL_FOP_HOME%build\*.jar %LIBDIR%\*.jar %LOCAL_FOP_HOME%target\*.jar) do set LOCALCLASSPATH=!LOCALCLASSPATH!;%%l
|
|
60
|
+
|
|
61
|
+
set JAVAOPTS=-Denv.windir=%WINDIR%
|
|
62
|
+
|
|
63
|
+
if "%JAVA_HOME%" == "" goto noJavaHome
|
|
64
|
+
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
|
65
|
+
if "%JAVACMD%" == "" set JAVACMD=%JAVA_HOME%\bin\java
|
|
66
|
+
goto runFop
|
|
67
|
+
|
|
68
|
+
:noJavaHome
|
|
69
|
+
if "%JAVACMD%" == "" set JAVACMD=java
|
|
70
|
+
|
|
71
|
+
:runFop
|
|
72
|
+
rem echo "%JAVACMD%" %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
|
|
73
|
+
"%JAVACMD%" %JAVAOPTS% %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" %FOP_OPTS% org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
|
|
74
|
+
|
|
75
|
+
ENDLOCAL
|
data/tools/fop/fop.cmd
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
@ECHO OFF
|
|
2
|
-
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
-
REM contributor license agreements. See the NOTICE file distributed with
|
|
4
|
-
REM this work for additional information regarding copyright ownership.
|
|
5
|
-
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
-
REM (the "License"); you may not use this file except in compliance with
|
|
7
|
-
REM the License. You may obtain a copy of the License at
|
|
8
|
-
REM
|
|
9
|
-
REM http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
REM
|
|
11
|
-
REM Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
REM distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
REM See the License for the specific language governing permissions and
|
|
15
|
-
REM limitations under the License.
|
|
16
|
-
REM $Id: fop.cmd 1734671 2016-03-12 05:39:53Z gadams $
|
|
17
|
-
|
|
18
|
-
set LOCAL_FOP_HOME=%~dp0
|
|
19
|
-
set FOP_CMD_LINE_ARGS=%1
|
|
20
|
-
if ""%1""=="""" goto doneStart
|
|
21
|
-
shift
|
|
22
|
-
:setupArgs
|
|
23
|
-
if ""%1""=="""" goto doneStart
|
|
24
|
-
set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1
|
|
25
|
-
shift
|
|
26
|
-
goto setupArgs
|
|
27
|
-
rem This label provides a place for the argument list loop to break out
|
|
28
|
-
:doneStart
|
|
29
|
-
|
|
30
|
-
call "%LOCAL_FOP_HOME%\fop.bat" %FOP_CMD_LINE_ARGS%
|
|
31
|
-
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
REM contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
REM this work for additional information regarding copyright ownership.
|
|
5
|
+
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
REM (the "License"); you may not use this file except in compliance with
|
|
7
|
+
REM the License. You may obtain a copy of the License at
|
|
8
|
+
REM
|
|
9
|
+
REM http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
REM
|
|
11
|
+
REM Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
REM distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
REM See the License for the specific language governing permissions and
|
|
15
|
+
REM limitations under the License.
|
|
16
|
+
REM $Id: fop.cmd 1734671 2016-03-12 05:39:53Z gadams $
|
|
17
|
+
|
|
18
|
+
set LOCAL_FOP_HOME=%~dp0
|
|
19
|
+
set FOP_CMD_LINE_ARGS=%1
|
|
20
|
+
if ""%1""=="""" goto doneStart
|
|
21
|
+
shift
|
|
22
|
+
:setupArgs
|
|
23
|
+
if ""%1""=="""" goto doneStart
|
|
24
|
+
set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1
|
|
25
|
+
shift
|
|
26
|
+
goto setupArgs
|
|
27
|
+
rem This label provides a place for the argument list loop to break out
|
|
28
|
+
:doneStart
|
|
29
|
+
|
|
30
|
+
call "%LOCAL_FOP_HOME%\fop.bat" %FOP_CMD_LINE_ARGS%
|
|
31
|
+
|