gjman 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/.document +5 -0
  2. data/.gitignore +23 -0
  3. data/HISTORY.txt +8 -0
  4. data/LICENSE +20 -0
  5. data/README.rdoc +65 -0
  6. data/Rakefile +83 -0
  7. data/VERSION +1 -0
  8. data/gjman.gemspec +116 -0
  9. data/lib/ext/multivalent/Multivalent20060102.jar +0 -0
  10. data/lib/ext/pdfc/CCLib.jar +0 -0
  11. data/lib/ext/pdfc/CREDIT +2 -0
  12. data/lib/ext/pdfc/PDFC.bat +1 -0
  13. data/lib/ext/pdfc/PDFC.jar +0 -0
  14. data/lib/ext/pdfc/PDFC.sh +3 -0
  15. data/lib/ext/pdfc/PDFParser.jar +0 -0
  16. data/lib/ext/pdfc/config.xml +24 -0
  17. data/lib/ext/pdfc/license/LICENSE.log4j +48 -0
  18. data/lib/ext/pdfc/license/lgpl-3.0.txt +165 -0
  19. data/lib/ext/pdfc/license/overview.txt +9 -0
  20. data/lib/ext/pdfc/log4j-1.2.15.jar +0 -0
  21. data/lib/ext/pdfc/readme.txt +89 -0
  22. data/lib/gjman.rb +29 -0
  23. data/lib/gjman/file_system.rb +46 -0
  24. data/lib/gjman/java_hacks/ForbidSystemExit$1.class +0 -0
  25. data/lib/gjman/java_hacks/ForbidSystemExit$Exception.class +0 -0
  26. data/lib/gjman/java_hacks/ForbidSystemExit.class +0 -0
  27. data/lib/gjman/java_hacks/ForbidSystemExit.java +23 -0
  28. data/lib/gjman/jruby.rb +34 -0
  29. data/lib/gjman/pdf.rb +30 -0
  30. data/lib/gjman/pdf/base.rb +31 -0
  31. data/lib/gjman/pdf/compressor.rb +50 -0
  32. data/lib/gjman/pdf/matcher.rb +28 -0
  33. data/lib/gjman/pdf/merger.rb +25 -0
  34. data/lib/gjman/pdf/utils.rb +2 -0
  35. data/lib/gjman/pdf/utils/multivalent.rb +58 -0
  36. data/lib/gjman/pdf/utils/pdfc.rb +52 -0
  37. data/lib/gjman/rjb.rb +32 -0
  38. data/spec/generic/file_system_spec.rb +100 -0
  39. data/spec/generic/spec_helper.rb +2 -0
  40. data/spec/pdf/compressor_spec.rb +114 -0
  41. data/spec/pdf/data/compressed.pdf +0 -0
  42. data/spec/pdf/data/merged_pages.pdf +0 -0
  43. data/spec/pdf/data/page1.pdf +0 -0
  44. data/spec/pdf/data/page2.pdf +0 -0
  45. data/spec/pdf/data/page3.pdf +0 -0
  46. data/spec/pdf/data/picture_x1.pdf +0 -0
  47. data/spec/pdf/data/picture_x2.pdf +0 -0
  48. data/spec/pdf/data/picture_x3_diff_pos.pdf +0 -0
  49. data/spec/pdf/data/picture_x4_diff_size.pdf +0 -0
  50. data/spec/pdf/data/picture_y1.pdf +0 -0
  51. data/spec/pdf/data/text_x1.pdf +0 -0
  52. data/spec/pdf/data/text_x2.pdf +0 -0
  53. data/spec/pdf/data/text_y1.pdf +0 -0
  54. data/spec/pdf/data/text_y2_diff_pos.pdf +0 -0
  55. data/spec/pdf/data/text_y3_diff_size.pdf +0 -0
  56. data/spec/pdf/data/text_y4_diff_font.pdf +0 -0
  57. data/spec/pdf/data/text_y5_diff_style.pdf +0 -0
  58. data/spec/pdf/data/text_y6_diff_color.pdf +0 -0
  59. data/spec/pdf/data/text_y7_diff_bg.pdf +0 -0
  60. data/spec/pdf/data/uncompressed.pdf +0 -0
  61. data/spec/pdf/matcher_spec.rb +65 -0
  62. data/spec/pdf/merger_spec.rb +27 -0
  63. data/spec/pdf/spec_helper.rb +13 -0
  64. data/spec/spec_helper.rb +42 -0
  65. metadata +150 -0
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,23 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
22
+ tmp
23
+ */**/tmp
@@ -0,0 +1,8 @@
1
+ === Current
2
+
3
+ *
4
+
5
+ === 0.1.0 2010-07-31
6
+
7
+ * First gem release, JRuby & Rjb integration not working yet ! [#ngty]
8
+
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 NgTzeYang
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,65 @@
1
+ = GJMAN is a handyman with some useful tools
2
+
3
+ Gjman is my neighbourhood friendly handyman with some useful tools.
4
+ Tools available will remain diverse, and are added as and when i need them.
5
+
6
+ == Getting Started
7
+
8
+ It's hosted on gemcutter.org.
9
+
10
+ $ sudo gem install gjman
11
+
12
+ Under the hood, gjman uses some java libs, u can either run it using:
13
+
14
+ * jruby, or
15
+ * any rubies with rjb installed, or
16
+ * any rubies, as long as java can be found in $PATH
17
+
18
+ == PDF Tools
19
+
20
+ === 1. Merging (2 or more pdfs)
21
+
22
+ require 'gjman/pdf'
23
+ Gjman::PDF.merge('/path/to/pdf1', '/path/to/pdf2', '/path/to/pdf3')
24
+ # >> merges the 3 pdfs & return the merged pdf path
25
+
26
+ Gjman::PDF.merge('/path/to/pdf1', '/path/to/pdf2', :to => '/path/to/merged/pdf')
27
+ # >> merges the pdfs & return the merged pdf path, which is '/path/to/merged/pdf'
28
+
29
+ === 2. Testing if 2 pdfs have the same content
30
+
31
+ require 'gjman/pdf'
32
+ Gjman::PDF.match?('/path/to/pdf1', '/path/to/pdf2')
33
+ # >> true/false if the 2 pdfs have same/different content
34
+
35
+ Note:
36
+ * textual comparison takes into account wordings, positioning, sizes, fonts,
37
+ colors, backgrounds & styles (bold, italic, etc)
38
+ * image comparison takes into account positioning, size, & byte length (if 2
39
+ images share the same byte length, they are taken to be the same)
40
+
41
+ === 3. Compressing/uncompressing a pdf
42
+
43
+ require 'gjman/pdf'
44
+ Gjman::PDF.compress('/path/to/pdf')
45
+ # >> compresses pdf & returns the compressed pdf path
46
+
47
+ Gjman::PDF.compress('/path/to/pdf', :to => '/path/to/compressed/pdf')
48
+ # >> compresses pdf to /path/to/compressed/pdf & returns it
49
+
50
+ The above applies to uncompression as well.
51
+
52
+ == Note on Patches/Pull Requests
53
+
54
+ * Fork the project.
55
+ * Make your feature addition or bug fix.
56
+ * Add tests for it. This is important so I don't break it in a
57
+ future version unintentionally.
58
+ * Commit, do not mess with rakefile, version, or history. (if you want to have your
59
+ own version, that is fine but bump version in a commit by itself I can ignore when
60
+ I pull)
61
+ * Send me a pull request. Bonus points for topic branches.
62
+
63
+ == Copyright
64
+
65
+ Copyright (c) 2010 ngty77[at]gmail[dot]com. See LICENSE for details.
@@ -0,0 +1,83 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "gjman"
8
+ gem.summary = %Q{Gjman is a handyman with some useful tools}
9
+ gem.description = %Q{
10
+ Gjman is my neighbourhood friendly handyman with some useful tools.
11
+ Tools available will remain diverse, and are added as and when i need them.
12
+ }
13
+ gem.email = "ngty77@gmail.com"
14
+ gem.homepage = "http://github.com/ngty/gjman"
15
+ gem.authors = ["NgTzeYang"]
16
+ gem.add_development_dependency "bacon", ">= 0"
17
+ # Optional dependencies:
18
+ # gem.add_dependency 'rjb', '>= 1.2.6'
19
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
20
+ end
21
+ Jeweler::GemcutterTasks.new
22
+ rescue LoadError
23
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
24
+ end
25
+
26
+ require 'rake/testtask'
27
+ Rake::TestTask.new(:spec) do |spec|
28
+ spec.libs << 'lib' << 'spec'
29
+ spec.pattern = 'spec/**/*_spec.rb'
30
+ spec.verbose = true
31
+ end
32
+
33
+ begin
34
+ require 'rcov/rcovtask'
35
+ Rcov::RcovTask.new do |spec|
36
+ spec.libs << 'spec'
37
+ spec.pattern = 'spec/**/*_spec.rb'
38
+ spec.verbose = true
39
+ end
40
+ rescue LoadError
41
+ task :rcov do
42
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
43
+ end
44
+ end
45
+
46
+ task :spec => :check_dependencies
47
+
48
+ begin
49
+ require 'reek/adapters/rake_task'
50
+ Reek::RakeTask.new do |t|
51
+ t.fail_on_error = true
52
+ t.verbose = false
53
+ t.source_files = 'lib/**/*.rb'
54
+ end
55
+ rescue LoadError
56
+ task :reek do
57
+ abort "Reek is not available. In order to run reek, you must: sudo gem install reek"
58
+ end
59
+ end
60
+
61
+ begin
62
+ require 'roodi'
63
+ require 'roodi_task'
64
+ RoodiTask.new do |t|
65
+ t.verbose = false
66
+ end
67
+ rescue LoadError
68
+ task :roodi do
69
+ abort "Roodi is not available. In order to run roodi, you must: sudo gem install roodi"
70
+ end
71
+ end
72
+
73
+ task :default => :spec
74
+
75
+ require 'rake/rdoctask'
76
+ Rake::RDocTask.new do |rdoc|
77
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
78
+
79
+ rdoc.rdoc_dir = 'rdoc'
80
+ rdoc.title = "gjman #{version}"
81
+ rdoc.rdoc_files.include('README*')
82
+ rdoc.rdoc_files.include('lib/**/*.rb')
83
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,116 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{gjman}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["NgTzeYang"]
12
+ s.date = %q{2010-07-31}
13
+ s.description = %q{
14
+ Gjman is my neighbourhood friendly handyman with some useful tools.
15
+ Tools available will remain diverse, and are added as and when i need them.
16
+ }
17
+ s.email = %q{ngty77@gmail.com}
18
+ s.extra_rdoc_files = [
19
+ "LICENSE",
20
+ "README.rdoc"
21
+ ]
22
+ s.files = [
23
+ ".document",
24
+ ".gitignore",
25
+ "HISTORY.txt",
26
+ "LICENSE",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "gjman.gemspec",
31
+ "lib/ext/multivalent/Multivalent20060102.jar",
32
+ "lib/ext/pdfc/CCLib.jar",
33
+ "lib/ext/pdfc/CREDIT",
34
+ "lib/ext/pdfc/PDFC.bat",
35
+ "lib/ext/pdfc/PDFC.jar",
36
+ "lib/ext/pdfc/PDFC.sh",
37
+ "lib/ext/pdfc/PDFParser.jar",
38
+ "lib/ext/pdfc/config.xml",
39
+ "lib/ext/pdfc/license/LICENSE.log4j",
40
+ "lib/ext/pdfc/license/lgpl-3.0.txt",
41
+ "lib/ext/pdfc/license/overview.txt",
42
+ "lib/ext/pdfc/log4j-1.2.15.jar",
43
+ "lib/ext/pdfc/readme.txt",
44
+ "lib/gjman.rb",
45
+ "lib/gjman/file_system.rb",
46
+ "lib/gjman/java_hacks/ForbidSystemExit$1.class",
47
+ "lib/gjman/java_hacks/ForbidSystemExit$Exception.class",
48
+ "lib/gjman/java_hacks/ForbidSystemExit.class",
49
+ "lib/gjman/java_hacks/ForbidSystemExit.java",
50
+ "lib/gjman/jruby.rb",
51
+ "lib/gjman/pdf.rb",
52
+ "lib/gjman/pdf/base.rb",
53
+ "lib/gjman/pdf/compressor.rb",
54
+ "lib/gjman/pdf/matcher.rb",
55
+ "lib/gjman/pdf/merger.rb",
56
+ "lib/gjman/pdf/utils.rb",
57
+ "lib/gjman/pdf/utils/multivalent.rb",
58
+ "lib/gjman/pdf/utils/pdfc.rb",
59
+ "lib/gjman/rjb.rb",
60
+ "spec/generic/file_system_spec.rb",
61
+ "spec/generic/spec_helper.rb",
62
+ "spec/pdf/compressor_spec.rb",
63
+ "spec/pdf/data/compressed.pdf",
64
+ "spec/pdf/data/merged_pages.pdf",
65
+ "spec/pdf/data/page1.pdf",
66
+ "spec/pdf/data/page2.pdf",
67
+ "spec/pdf/data/page3.pdf",
68
+ "spec/pdf/data/picture_x1.pdf",
69
+ "spec/pdf/data/picture_x2.pdf",
70
+ "spec/pdf/data/picture_x3_diff_pos.pdf",
71
+ "spec/pdf/data/picture_x4_diff_size.pdf",
72
+ "spec/pdf/data/picture_y1.pdf",
73
+ "spec/pdf/data/text_x1.pdf",
74
+ "spec/pdf/data/text_x2.pdf",
75
+ "spec/pdf/data/text_y1.pdf",
76
+ "spec/pdf/data/text_y2_diff_pos.pdf",
77
+ "spec/pdf/data/text_y3_diff_size.pdf",
78
+ "spec/pdf/data/text_y4_diff_font.pdf",
79
+ "spec/pdf/data/text_y5_diff_style.pdf",
80
+ "spec/pdf/data/text_y6_diff_color.pdf",
81
+ "spec/pdf/data/text_y7_diff_bg.pdf",
82
+ "spec/pdf/data/uncompressed.pdf",
83
+ "spec/pdf/matcher_spec.rb",
84
+ "spec/pdf/merger_spec.rb",
85
+ "spec/pdf/spec_helper.rb",
86
+ "spec/spec_helper.rb"
87
+ ]
88
+ s.homepage = %q{http://github.com/ngty/gjman}
89
+ s.rdoc_options = ["--charset=UTF-8"]
90
+ s.require_paths = ["lib"]
91
+ s.rubygems_version = %q{1.3.7}
92
+ s.summary = %q{Gjman is a handyman with some useful tools}
93
+ s.test_files = [
94
+ "spec/pdf/compressor_spec.rb",
95
+ "spec/pdf/matcher_spec.rb",
96
+ "spec/pdf/merger_spec.rb",
97
+ "spec/pdf/spec_helper.rb",
98
+ "spec/generic/file_system_spec.rb",
99
+ "spec/generic/spec_helper.rb",
100
+ "spec/spec_helper.rb"
101
+ ]
102
+
103
+ if s.respond_to? :specification_version then
104
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
105
+ s.specification_version = 3
106
+
107
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
108
+ s.add_development_dependency(%q<bacon>, [">= 0"])
109
+ else
110
+ s.add_dependency(%q<bacon>, [">= 0"])
111
+ end
112
+ else
113
+ s.add_dependency(%q<bacon>, [">= 0"])
114
+ end
115
+ end
116
+
Binary file
@@ -0,0 +1,2 @@
1
+ PDFC is a great tool provided by:
2
+ http://www.inetsoftware.de/other-products/pdf-content-comparer
@@ -0,0 +1 @@
1
+ java -cp CCLib.jar;.;log4j-1.2.15.jar;PDFC.jar;PDFParser.jar com.inet.pdfc.PDFC %1 %2 %3 %4 %5 %6 %7
Binary file
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ DIR=`dirname $0`
3
+ java -cp ${DIR}/CCLib.jar:${DIR}/log4j-1.2.15.jar:${DIR}/PDFC.jar:${DIR}/PDFParser.jar com.inet.pdfc.PDFC $@
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
3
+ <properties>
4
+ <entry key="CHART_DENSITY_THRESHOLD">1</entry>
5
+ <entry key="TOLERANCE_LINE_POSITION">1</entry>
6
+ <entry key="TOLERANCE_LINE_STYLE">false</entry>
7
+ <entry key="CREATE_DIFFIMAGES">false</entry>
8
+ <entry key="CREATE_DIFFIMAGES">true</entry>
9
+ <entry key="NORMALIZERS">NORMALIZER_MARGIN, CHART_REMOVAL, NORMALIZER_CLIP</entry>
10
+ <entry key="TOLERANCE_PAGE_SIZE">1</entry>
11
+ <entry key="TOLERANCE_IMAGE_DISTANCE">1</entry>
12
+ <entry key="CHART_REMOVAL_MARGIN">0.1</entry>
13
+ <entry key="CREATE_ORIGIMAGES">false</entry>
14
+ <entry key="TOLERANCE_PAGE_RATIO">0.1</entry>
15
+ <entry key="MODULES">MODULE_TESTMOD, MODULE_IMAGE, MODULE_PAGEPROPERTIES, MODULE_LINES, MODULE_TEXT_WORDORDER</entry>
16
+ <entry key="TOLERANCE_LINE_SIZE">1</entry>
17
+ <entry key="TOLERANCE_IMAGE_SIZE">0.1</entry>
18
+ <entry key="TOLERANCE_UNDERLINE_LENGTH">0.1</entry>
19
+ <entry key="LOG_LEVEL">INFO</entry>
20
+ <entry key="MAX_ERRORS_PER_REPORT">10</entry>
21
+ <entry key="TOLERANCE_PAGE_LEFTCORNER">1</entry>
22
+ <entry key="TOLERANCE_BOX_ROUND_EDGES">1</entry>
23
+ <entry key="TOLERANCE_LINE_THICKNESS">1</entry>
24
+ </properties>
@@ -0,0 +1,48 @@
1
+ /*
2
+ * ============================================================================
3
+ * The Apache Software License, Version 1.1
4
+ * ============================================================================
5
+ *
6
+ * Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without modifica-
9
+ * tion, are permitted provided that the following conditions are met:
10
+ *
11
+ * 1. Redistributions of source code must retain the above copyright notice,
12
+ * this list of conditions and the following disclaimer.
13
+ *
14
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
15
+ * this list of conditions and the following disclaimer in the documentation
16
+ * and/or other materials provided with the distribution.
17
+ *
18
+ * 3. The end-user documentation included with the redistribution, if any, must
19
+ * include the following acknowledgment: "This product includes software
20
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
21
+ * Alternately, this acknowledgment may appear in the software itself, if
22
+ * and wherever such third-party acknowledgments normally appear.
23
+ *
24
+ * 4. The names "log4j" and "Apache Software Foundation" must not be used to
25
+ * endorse or promote products derived from this software without prior
26
+ * written permission. For written permission, please contact
27
+ * apache@apache.org.
28
+ *
29
+ * 5. Products derived from this software may not be called "Apache", nor may
30
+ * "Apache" appear in their name, without prior written permission of the
31
+ * Apache Software Foundation.
32
+ *
33
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
34
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
35
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
36
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
37
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
38
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
39
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
40
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
42
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
+ *
44
+ * This software consists of voluntary contributions made by many individuals
45
+ * on behalf of the Apache Software Foundation. For more information on the
46
+ * Apache Software Foundation, please see <http://www.apache.org/>.
47
+ *
48
+ */
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.