libis-format 1.0.7 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +32 -24
  3. data/README.md +2 -2
  4. data/base/Dockerfile +5 -3
  5. data/base/rework_path +5 -10
  6. data/lib/libis/format.rb +5 -2
  7. data/lib/libis/format/cli/convert.rb +4 -4
  8. data/lib/libis/format/config.rb +3 -1
  9. data/lib/libis/format/converter/audio_converter.rb +2 -36
  10. data/lib/libis/format/converter/base.rb +21 -8
  11. data/lib/libis/format/converter/chain.rb +3 -3
  12. data/lib/libis/format/converter/image_assembler.rb +82 -0
  13. data/lib/libis/format/converter/image_converter.rb +20 -138
  14. data/lib/libis/format/converter/image_splitter.rb +80 -0
  15. data/lib/libis/format/converter/image_watermarker.rb +261 -0
  16. data/lib/libis/format/converter/jp2_converter.rb +1 -1
  17. data/lib/libis/format/converter/office_converter.rb +2 -2
  18. data/lib/libis/format/converter/pdf_assembler.rb +66 -0
  19. data/lib/libis/format/converter/pdf_converter.rb +27 -85
  20. data/lib/libis/format/converter/pdf_optimizer.rb +70 -0
  21. data/lib/libis/format/converter/pdf_splitter.rb +65 -0
  22. data/lib/libis/format/converter/pdf_watermarker.rb +110 -0
  23. data/lib/libis/format/converter/spreadsheet_converter.rb +2 -2
  24. data/lib/libis/format/converter/video_converter.rb +1 -1
  25. data/lib/libis/format/identifier.rb +3 -3
  26. data/lib/libis/format/info.rb +27 -0
  27. data/lib/libis/format/library.rb +147 -0
  28. data/lib/libis/format/tool/extension_identification.rb +4 -4
  29. data/lib/libis/format/tool/identification_tool.rb +6 -6
  30. data/lib/libis/format/tool/spreadsheet_to_ods.rb +1 -0
  31. data/lib/libis/format/version.rb +1 -1
  32. data/lib/libis/format/yaml_loader.rb +71 -0
  33. data/libis-format.gemspec +2 -1
  34. data/tools/fop/fop.bat +75 -75
  35. data/tools/fop/fop.cmd +31 -31
  36. data/tools/fop/fop.js +341 -341
  37. data/tools/fop/lib/avalon-framework.NOTICE.TXT +11 -11
  38. data/tools/fop/lib/xml-apis.LICENSE-SAX.html +17 -17
  39. data/tools/fop/lib/xml-apis.LICENSE.DOM-documentation.html +74 -74
  40. data/tools/fop/lib/xml-apis.LICENSE.DOM-software.html +66 -66
  41. metadata +13 -6
  42. data/lib/libis/format/type_database.rb +0 -133
  43. data/lib/libis/format/type_database_impl.rb +0 -120
@@ -1,11 +1,11 @@
1
- =========================================================================
2
- == NOTICE file corresponding to the section 4 d of ==
3
- == the Apache License, Version 2.0, ==
4
- =========================================================================
5
-
6
- This product is developed by the Apache Avalon Project.
7
- http://avalon.apache.org
8
-
9
- The names "Avalon" and "Merlin" must not be used to endorse or promote
10
- products derived from this software without prior written permission.
11
- For written permission, please contact pmc@avalon.apache.org.
1
+ =========================================================================
2
+ == NOTICE file corresponding to the section 4 d of ==
3
+ == the Apache License, Version 2.0, ==
4
+ =========================================================================
5
+
6
+ This product is developed by the Apache Avalon Project.
7
+ http://avalon.apache.org
8
+
9
+ The names "Avalon" and "Merlin" must not be used to endorse or promote
10
+ products derived from this software without prior written permission.
11
+ For written permission, please contact pmc@avalon.apache.org.
@@ -1,17 +1,17 @@
1
- <html>
2
- <head>SAX LICENSE</head>
3
- <body>
4
- <p>This license applies to all interfaces and classes in the
5
- org/xml/sax hierarchy.
6
- </p>
7
- <p>
8
- <blockquote>
9
- <em>This module, both source code and documentation, is in the
10
- Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
11
- See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
12
- for further information.
13
- </blockquote>
14
- </p>
15
- </body>
16
- </html>
17
-
1
+ <html>
2
+ <head>SAX LICENSE</head>
3
+ <body>
4
+ <p>This license applies to all interfaces and classes in the
5
+ org/xml/sax hierarchy.
6
+ </p>
7
+ <p>
8
+ <blockquote>
9
+ <em>This module, both source code and documentation, is in the
10
+ Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
11
+ See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
12
+ for further information.
13
+ </blockquote>
14
+ </p>
15
+ </body>
16
+ </html>
17
+
@@ -1,74 +1,74 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
- <?xml version="1.0" encoding="iso-8859-1"?><HTML
3
- xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>W3C Document License</TITLE>
4
- <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
5
-
6
- <META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
7
- <BODY text=#000000 bgColor=#ffffff>
8
- <H1>W3C<SUP>�</SUP> DOCUMENT LICENSE</H1>
9
- <H3 id=version><A
10
- href="http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</A></H3>
11
- <P>Public documents on the W3C site are provided by the copyright holders under
12
- the following license. By using and/or copying this document, or the W3C
13
- document from which this statement is linked, you (the licensee) agree that you
14
- have read, understood, and will comply with the following terms and
15
- conditions:</P>
16
- <P>Permission to copy, and distribute the contents of this document, or the W3C
17
- document from which this statement is linked, in any medium for any purpose and
18
- without fee or royalty is hereby granted, provided that you include the
19
- following on <I>ALL</I> copies of the document, or portions thereof, that you
20
- use:</P>
21
- <OL>
22
- <LI>A link or URL to the original W3C document.
23
- <LI>The pre-existing copyright notice of the original author, or if it doesn't
24
- exist, a notice (hypertext is preferred, but a textual representation is
25
- permitted) of the form: "Copyright � [$date-of-document] <A
26
- href="http://www.w3.org/">World Wide Web Consortium</A>, (<A
27
- href="http://www.lcs.mit.edu/">Massachusetts Institute of Technology</A>, <A
28
- href="http://www.ercim.org/">European Research Consortium for Informatics and
29
- Mathematics</A>, <A href="http://www.keio.ac.jp/">Keio University</A>). All
30
- Rights Reserved. <A
31
- href="http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</A>"
32
-
33
- <LI><EM>If it exists</EM>, the STATUS of the W3C document. </LI></OL>
34
- <P>When space permits, inclusion of the full text of this <B>NOTICE</B> should
35
- be provided. We request that authorship attribution be provided in any software,
36
- documents, or other items or products that you create pursuant to the
37
- implementation of the contents of this document, or any portion thereof.</P>
38
- <P>No right to create modifications or derivatives of W3C documents is granted
39
- pursuant to this license. However, if additional requirements (documented in the
40
- <A href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A>) are
41
- satisfied, the right to create modifications or derivatives is&nbsp;sometimes
42
- granted by the W3C to individuals complying with those requirements.</P>
43
- <P>THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
44
- REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
45
- TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
46
- NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR
47
- ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY
48
- THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</P>
49
- <P>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
50
- CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE
51
- OR IMPLEMENTATION OF THE CONTENTS THEREOF.</P>
52
- <P>The name and trademarks of copyright holders may NOT be used in advertising
53
- or publicity pertaining to this document or its contents without specific,
54
- written prior permission. Title to copyright in this document will at all times
55
- remain with copyright holders.</P>
56
- <P></P>
57
- <P>----------------------------------------------------------------------------</P>
58
- <P>This formulation of W3C's notice and license became active on December 31
59
- 2002. This version removes the copyright ownership notice such that this license
60
- can be used with materials other than those owned by the W3C, moves information
61
- on style sheets, DTDs, and schemas to the <A
62
- href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A>, reflects
63
- that ERCIM is now a host of the W3C, includes references to this specific dated
64
- version of the license, and removes the ambiguous grant of "use". See the <A
65
- href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">older
66
- formulation</A> for the policy prior to this date. Please see our <A
67
- href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A> for common
68
- questions about using materials from our site, such as the translating or
69
- annotating specifications. Other questions about this notice can be directed to
70
- <A href="mailto:site-policy@w3.org">site-policy@w3.org</A>.</P>
71
- <P></P>
72
- <ADDRESS>Joseph Reagle &lt;<A
73
- href="mailto:site-policy@w3.org">mailto:site-policy@w3.org</A> </ADDRESS>
74
- <P>Last revised by Reagle $Date: 2005/07/19 16:33:09 $</P></BODY></HTML>
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
+ <?xml version="1.0" encoding="iso-8859-1"?><HTML
3
+ xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>W3C Document License</TITLE>
4
+ <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
5
+
6
+ <META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
7
+ <BODY text=#000000 bgColor=#ffffff>
8
+ <H1>W3C<SUP>�</SUP> DOCUMENT LICENSE</H1>
9
+ <H3 id=version><A
10
+ href="http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</A></H3>
11
+ <P>Public documents on the W3C site are provided by the copyright holders under
12
+ the following license. By using and/or copying this document, or the W3C
13
+ document from which this statement is linked, you (the licensee) agree that you
14
+ have read, understood, and will comply with the following terms and
15
+ conditions:</P>
16
+ <P>Permission to copy, and distribute the contents of this document, or the W3C
17
+ document from which this statement is linked, in any medium for any purpose and
18
+ without fee or royalty is hereby granted, provided that you include the
19
+ following on <I>ALL</I> copies of the document, or portions thereof, that you
20
+ use:</P>
21
+ <OL>
22
+ <LI>A link or URL to the original W3C document.
23
+ <LI>The pre-existing copyright notice of the original author, or if it doesn't
24
+ exist, a notice (hypertext is preferred, but a textual representation is
25
+ permitted) of the form: "Copyright � [$date-of-document] <A
26
+ href="http://www.w3.org/">World Wide Web Consortium</A>, (<A
27
+ href="http://www.lcs.mit.edu/">Massachusetts Institute of Technology</A>, <A
28
+ href="http://www.ercim.org/">European Research Consortium for Informatics and
29
+ Mathematics</A>, <A href="http://www.keio.ac.jp/">Keio University</A>). All
30
+ Rights Reserved. <A
31
+ href="http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</A>"
32
+
33
+ <LI><EM>If it exists</EM>, the STATUS of the W3C document. </LI></OL>
34
+ <P>When space permits, inclusion of the full text of this <B>NOTICE</B> should
35
+ be provided. We request that authorship attribution be provided in any software,
36
+ documents, or other items or products that you create pursuant to the
37
+ implementation of the contents of this document, or any portion thereof.</P>
38
+ <P>No right to create modifications or derivatives of W3C documents is granted
39
+ pursuant to this license. However, if additional requirements (documented in the
40
+ <A href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A>) are
41
+ satisfied, the right to create modifications or derivatives is&nbsp;sometimes
42
+ granted by the W3C to individuals complying with those requirements.</P>
43
+ <P>THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
44
+ REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
45
+ TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
46
+ NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR
47
+ ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY
48
+ THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</P>
49
+ <P>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
50
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE
51
+ OR IMPLEMENTATION OF THE CONTENTS THEREOF.</P>
52
+ <P>The name and trademarks of copyright holders may NOT be used in advertising
53
+ or publicity pertaining to this document or its contents without specific,
54
+ written prior permission. Title to copyright in this document will at all times
55
+ remain with copyright holders.</P>
56
+ <P></P>
57
+ <P>----------------------------------------------------------------------------</P>
58
+ <P>This formulation of W3C's notice and license became active on December 31
59
+ 2002. This version removes the copyright ownership notice such that this license
60
+ can be used with materials other than those owned by the W3C, moves information
61
+ on style sheets, DTDs, and schemas to the <A
62
+ href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A>, reflects
63
+ that ERCIM is now a host of the W3C, includes references to this specific dated
64
+ version of the license, and removes the ambiguous grant of "use". See the <A
65
+ href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">older
66
+ formulation</A> for the policy prior to this date. Please see our <A
67
+ href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A> for common
68
+ questions about using materials from our site, such as the translating or
69
+ annotating specifications. Other questions about this notice can be directed to
70
+ <A href="mailto:site-policy@w3.org">site-policy@w3.org</A>.</P>
71
+ <P></P>
72
+ <ADDRESS>Joseph Reagle &lt;<A
73
+ href="mailto:site-policy@w3.org">mailto:site-policy@w3.org</A> </ADDRESS>
74
+ <P>Last revised by Reagle $Date: 2005/07/19 16:33:09 $</P></BODY></HTML>
@@ -1,66 +1,66 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
- <?xml version="1.0" encoding="iso-8859-1"?><HTML
3
- xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>W3C Software License</TITLE>
4
- <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
5
-
6
- <META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
7
- <BODY text=#000000 bgColor=#ffffff>
8
- <H1>W3C<SUP>�</SUP> SOFTWARE NOTICE AND LICENSE</H1>
9
- <H3 id=version><A
10
- href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</A></H3>
11
- <P>This work (and included software, documentation such as READMEs, or other
12
- related items) is being provided by the copyright holders under the following
13
- license. By obtaining, using and/or copying this work, you (the licensee) agree
14
- that you have read, understood, and will comply with the following terms and
15
- conditions.</P>
16
- <P>Permission to copy, modify, and distribute this software and its
17
- documentation, with or without modification,&nbsp;for any purpose and without
18
- fee or royalty is hereby granted, provided that you include the following on ALL
19
- copies of the software and documentation or portions thereof, including
20
- modifications:</P>
21
- <OL>
22
- <LI>The full text of this NOTICE in a location viewable to users of the
23
- redistributed or derivative work.
24
- <LI>Any pre-existing intellectual property disclaimers, notices, or terms and
25
- conditions. If none exist, the <A
26
- href="http://www.w3.org/Consortium/Legal/2002/copyright-software-short-notice-20021231.html">W3C
27
- Software Short Notice</A> should be included (hypertext is preferred, text is
28
- permitted) within the body of any redistributed or derivative code.
29
- <LI>Notice of any changes or modifications to the files, including the date
30
- changes were made. (We recommend you provide URIs to the location from which
31
- the code is derived.) </LI></OL>
32
- <P>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
33
- MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
34
- LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE
35
- OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
36
- PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</P>
37
- <P>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
38
- CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
39
- DOCUMENTATION.</P>
40
- <P>The name and trademarks of copyright holders may NOT be used in advertising
41
- or publicity pertaining to the software without specific, written prior
42
- permission. Title to copyright in this software and any associated documentation
43
- will at all times remain with copyright holders.</P>
44
- <P></P>
45
- <P>____________________________________</P>
46
- <P>This formulation of W3C's notice and license became active on December 31
47
- 2002. This version removes the copyright ownership notice such that this license
48
- can be used with materials other than those owned by the W3C, reflects that
49
- ERCIM is now a host of the W3C, includes references to this specific dated
50
- version of the license, and removes the ambiguous grant of "use". Otherwise,
51
- this version is the same as the <A
52
- href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">previous
53
- version</A> and is written so as to preserve the <A
54
- href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">Free
55
- Software Foundation's assessment of GPL compatibility</A> and <A
56
- href="http://www.opensource.org/licenses/W3C.php">OSI's certification</A> under
57
- the <A href="http://www.opensource.org/docs/definition.php">Open Source
58
- Definition</A>. Please see our <A
59
- href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A> for common
60
- questions about using materials from our site, including specific terms and
61
- conditions for packages like libwww, Amaya, and Jigsaw. Other questions about
62
- this notice can be directed to <A
63
- href="mailto:site-policy@w3.org">site-policy@w3.org</A>.<BR>&nbsp;</P>
64
- <ADDRESS>Joseph Reagle &lt;<A
65
- href="mailto:site-policy@w3.org">mailto:site-policy@w3.org</A> </ADDRESS>
66
- <P>Last revised by Reagle $Date: 2005/07/19 16:33:09 $</P></BODY></HTML>
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
+ <?xml version="1.0" encoding="iso-8859-1"?><HTML
3
+ xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>W3C Software License</TITLE>
4
+ <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
5
+
6
+ <META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
7
+ <BODY text=#000000 bgColor=#ffffff>
8
+ <H1>W3C<SUP>�</SUP> SOFTWARE NOTICE AND LICENSE</H1>
9
+ <H3 id=version><A
10
+ href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</A></H3>
11
+ <P>This work (and included software, documentation such as READMEs, or other
12
+ related items) is being provided by the copyright holders under the following
13
+ license. By obtaining, using and/or copying this work, you (the licensee) agree
14
+ that you have read, understood, and will comply with the following terms and
15
+ conditions.</P>
16
+ <P>Permission to copy, modify, and distribute this software and its
17
+ documentation, with or without modification,&nbsp;for any purpose and without
18
+ fee or royalty is hereby granted, provided that you include the following on ALL
19
+ copies of the software and documentation or portions thereof, including
20
+ modifications:</P>
21
+ <OL>
22
+ <LI>The full text of this NOTICE in a location viewable to users of the
23
+ redistributed or derivative work.
24
+ <LI>Any pre-existing intellectual property disclaimers, notices, or terms and
25
+ conditions. If none exist, the <A
26
+ href="http://www.w3.org/Consortium/Legal/2002/copyright-software-short-notice-20021231.html">W3C
27
+ Software Short Notice</A> should be included (hypertext is preferred, text is
28
+ permitted) within the body of any redistributed or derivative code.
29
+ <LI>Notice of any changes or modifications to the files, including the date
30
+ changes were made. (We recommend you provide URIs to the location from which
31
+ the code is derived.) </LI></OL>
32
+ <P>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
33
+ MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
34
+ LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE
35
+ OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
36
+ PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</P>
37
+ <P>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
38
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
39
+ DOCUMENTATION.</P>
40
+ <P>The name and trademarks of copyright holders may NOT be used in advertising
41
+ or publicity pertaining to the software without specific, written prior
42
+ permission. Title to copyright in this software and any associated documentation
43
+ will at all times remain with copyright holders.</P>
44
+ <P></P>
45
+ <P>____________________________________</P>
46
+ <P>This formulation of W3C's notice and license became active on December 31
47
+ 2002. This version removes the copyright ownership notice such that this license
48
+ can be used with materials other than those owned by the W3C, reflects that
49
+ ERCIM is now a host of the W3C, includes references to this specific dated
50
+ version of the license, and removes the ambiguous grant of "use". Otherwise,
51
+ this version is the same as the <A
52
+ href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">previous
53
+ version</A> and is written so as to preserve the <A
54
+ href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">Free
55
+ Software Foundation's assessment of GPL compatibility</A> and <A
56
+ href="http://www.opensource.org/licenses/W3C.php">OSI's certification</A> under
57
+ the <A href="http://www.opensource.org/docs/definition.php">Open Source
58
+ Definition</A>. Please see our <A
59
+ href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A> for common
60
+ questions about using materials from our site, including specific terms and
61
+ conditions for packages like libwww, Amaya, and Jigsaw. Other questions about
62
+ this notice can be directed to <A
63
+ href="mailto:site-policy@w3.org">site-policy@w3.org</A>.<BR>&nbsp;</P>
64
+ <ADDRESS>Joseph Reagle &lt;<A
65
+ href="mailto:site-policy@w3.org">mailto:site-policy@w3.org</A> </ADDRESS>
66
+ <P>Last revised by Reagle $Date: 2005/07/19 16:33:09 $</P></BODY></HTML>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-format
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-13 00:00:00.000000000 Z
11
+ date: 2020-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -214,15 +214,24 @@ files:
214
214
  - lib/libis/format/converter/base.rb
215
215
  - lib/libis/format/converter/chain.rb
216
216
  - lib/libis/format/converter/fop_pdf_converter.rb
217
+ - lib/libis/format/converter/image_assembler.rb
217
218
  - lib/libis/format/converter/image_converter.rb
219
+ - lib/libis/format/converter/image_splitter.rb
220
+ - lib/libis/format/converter/image_watermarker.rb
218
221
  - lib/libis/format/converter/jp2_converter.rb
219
222
  - lib/libis/format/converter/office_converter.rb
223
+ - lib/libis/format/converter/pdf_assembler.rb
220
224
  - lib/libis/format/converter/pdf_converter.rb
225
+ - lib/libis/format/converter/pdf_optimizer.rb
226
+ - lib/libis/format/converter/pdf_splitter.rb
227
+ - lib/libis/format/converter/pdf_watermarker.rb
221
228
  - lib/libis/format/converter/repository.rb
222
229
  - lib/libis/format/converter/spreadsheet_converter.rb
223
230
  - lib/libis/format/converter/video_converter.rb
224
231
  - lib/libis/format/converter/xslt_converter.rb
225
232
  - lib/libis/format/identifier.rb
233
+ - lib/libis/format/info.rb
234
+ - lib/libis/format/library.rb
226
235
  - lib/libis/format/tool.rb
227
236
  - lib/libis/format/tool/droid.rb
228
237
  - lib/libis/format/tool/extension_identification.rb
@@ -239,9 +248,8 @@ files:
239
248
  - lib/libis/format/tool/pdf_to_pdfa.rb
240
249
  - lib/libis/format/tool/pdfa_validator.rb
241
250
  - lib/libis/format/tool/spreadsheet_to_ods.rb
242
- - lib/libis/format/type_database.rb
243
- - lib/libis/format/type_database_impl.rb
244
251
  - lib/libis/format/version.rb
252
+ - lib/libis/format/yaml_loader.rb
245
253
  - libis-format.gemspec
246
254
  - tools/PdfTool.jar
247
255
  - tools/bcpkix-jdk15on-1.49.jar
@@ -317,8 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
325
  - !ruby/object:Gem::Version
318
326
  version: '0'
319
327
  requirements: []
320
- rubyforge_project:
321
- rubygems_version: 2.7.8
328
+ rubygems_version: 3.0.8
322
329
  signing_key:
323
330
  specification_version: 4
324
331
  summary: LIBIS File format format services.
@@ -1,133 +0,0 @@
1
- # coding: utf-8
2
-
3
- require 'yaml'
4
- require 'libis/tools/extend/hash'
5
-
6
- module Libis
7
- module Format
8
-
9
- # noinspection RubyClassVariableUsageInspection
10
- class TypeDatabase
11
- @implementation = Libis::Format::TypeDatabaseImpl.instance
12
-
13
- def self.implementation(impl)
14
- @implementation = impl
15
- end
16
-
17
- def self.enrich(info, map_keys = {})
18
- return {} unless info.is_a? Hash
19
- mapper = Hash.new {|hash,key| hash[key] = key}
20
- mapper.merge! map_keys
21
- unless (puid = info[mapper[:PUID]]).blank?
22
- info[mapper[:TYPE]] ||= puid_infos(puid).first[:TYPE] rescue nil
23
- end
24
- unless (mime = info[mapper[:MIME]]).blank?
25
- info[mapper[:TYPE]] ||= mime_infos(mime).first[:TYPE] rescue nil
26
- end
27
- unless (type_name = info[mapper[:TYPE]]).nil?
28
- mapper.keys.each do |key|
29
- info[mapper[key]] = get(type_name, key) || info[mapper[key]]
30
- end
31
- info[mapper[:GROUP]] = type_group(type_name)
32
- end
33
- info
34
- end
35
-
36
- def self.normalize(info, map_keys = {})
37
- return {} unless info.is_a? Hash
38
- mapper = Hash.new {|hash,key| hash[key] = key}
39
- mapper.merge! map_keys
40
- unless (puid = info[mapper[:PUID]]).blank?
41
- info[mapper[:TYPE]] ||= puid_infos(puid).first[:TYPE] rescue nil
42
- end
43
- unless (mime = info[mapper[:MIME]]).blank?
44
- info[mapper[:TYPE]] ||= mime_infos(mime).first[:TYPE] rescue nil
45
- end
46
- unless (type_name = info[mapper[:TYPE]]).nil?
47
- info[mapper[:MIME]] = type_mimetypes(type_name).first if type_mimetypes(type_name).first
48
- info[mapper[:GROUP]] = type_group(type_name)
49
- end
50
- info
51
- end
52
-
53
- def self.get(type_name, key)
54
- case key
55
- when :MIME
56
- type_mimetypes(type_name).first
57
- when :PUID
58
- type_puids(type_name).first
59
- when :EXTENSION
60
- type_extentions(type_name).first
61
- else
62
- typeinfo(type_name)[key]
63
- end
64
- end
65
-
66
- def self.type_group(t)
67
- typeinfo(t)[:GROUP]
68
- end
69
-
70
- def self.type_mimetypes(t)
71
- typeinfo(t)[:MIME] || []
72
- end
73
-
74
- def self.type_puids(t)
75
- typeinfo(t)[:PUID] || []
76
- end
77
-
78
- def self.type_extentions(t)
79
- typeinfo(t)[:EXTENSIONS] || []
80
- end
81
-
82
- def self.typeinfo(t)
83
- @implementation.typeinfo(t)
84
- end
85
-
86
- def self.group_types(group)
87
- @implementation.group_types(group)
88
- end
89
-
90
- def self.puid_infos(puid)
91
- @implementation.puid_infos(puid)
92
- end
93
-
94
- def self.puid_types(puid)
95
- @implementation.puid_types(puid)
96
- end
97
-
98
- def self.puid_groups(puid)
99
- puid_types(puid).map(&method(:type_group))
100
- end
101
-
102
- def self.mime_infos(mime)
103
- @implementation.mime_infos(mime)
104
- end
105
-
106
- def self.mime_types(mime)
107
- @implementation.mime_types(mime)
108
- end
109
-
110
- def self.mime_groups(mime)
111
- mime_types(mime).map(&method(:type_group))
112
- end
113
-
114
- def self.ext_infos(ext)
115
- @implementation.ext_infos(ext)
116
- end
117
-
118
- def self.ext_types(ext)
119
- @implementation.ext_types(ext)
120
- end
121
-
122
- def self.puid_typeinfo(puid)
123
- @implementation.puid_typeinfo(puid)
124
- end
125
-
126
- def self.known_mime?(mime)
127
- @implementation.known_mime?(mime)
128
- end
129
-
130
- end
131
-
132
- end
133
- end