-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
185 changed files
with
8,994 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
notifications: | ||
email: | ||
recipients: | ||
- groonga-commit@lists.osdn.me | ||
webhooks: | ||
- https://webhook.commit-email.info/ | ||
addons: | ||
apt: | ||
packages: | ||
- libreoffice | ||
rvm: | ||
- 2.2 | ||
- 2.3.3 | ||
- 2.4.1 | ||
- 2.3 | ||
- 2.4 | ||
- 2.5 | ||
- 2.6 | ||
- ruby-head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- mode: ruby; coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2014-2019 Kouhei Sutou <kou@clear-code.com> | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 2.1 of the License, or (at your option) any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
source "https://rubygems.org/" | ||
|
||
gemspec | ||
|
||
base_dir = File.dirname(__FILE__) | ||
|
||
general = "chupa-text-decomposer-libreoffice-general" | ||
gem general, path: File.join(base_dir, "..", general) | ||
|
||
local_gem_names = [ | ||
"chupa-text", | ||
"chupa-text-decomposer-pdf", | ||
] | ||
local_gem_names.each do |name| | ||
local_dir = File.join(base_dir, "..", "..", name) | ||
if File.exist?(local_dir) | ||
gem name, :path => local_dir | ||
end | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# README | ||
|
||
## Name | ||
|
||
chupa-text-decomposer-libreoffice-excel | ||
|
||
## Description | ||
|
||
This is a ChupaText decomposer plugin to extract text and meta-data | ||
from Microsoft Excel binary file format file (`.xls` file). This plugin | ||
uses [LibreOffice](https://www.libreoffice.org/). | ||
|
||
You can use `libreoffice-excel` decomposer. | ||
|
||
It depends on `pdf` decomposer. Because it converts a office file to | ||
PDF file and extracts text and meta-data by `pdf` decomposer. | ||
|
||
## Install | ||
|
||
Install chupa-text-decomposer-libreoffice-excel gem: | ||
|
||
``` | ||
% gem install chupa-text-decomposer-libreoffice-excel | ||
``` | ||
|
||
Install | ||
[LibreOffice from download page](http://www.libreoffice.org/download). | ||
|
||
Now, you can extract text and meta-data from office files: | ||
|
||
``` | ||
% chupa-text workbook.xls | ||
``` | ||
|
||
## Author | ||
|
||
* Kouhei Sutou `<kou@clear-code.com>` | ||
|
||
## License | ||
|
||
LGPL 2.1 or later. | ||
|
||
(Kouhei Sutou has a right to change the license including contributed | ||
patches.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- ruby -*- | ||
# | ||
# Copyright (C) 2014-2017 Kouhei Sutou <kou@clear-code.com> | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 2.1 of the License, or (at your option) any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
task :default => :test | ||
|
||
require "pathname" | ||
|
||
require "rubygems" | ||
require "bundler/gem_helper" | ||
require "packnga" | ||
|
||
base_dir = Pathname(__dir__) | ||
|
||
helper = Bundler::GemHelper.new(base_dir.to_s) | ||
def helper.version_tag | ||
"#{name}-#{version}" | ||
end | ||
|
||
helper.install | ||
spec = helper.gemspec | ||
|
||
Packnga::DocumentTask.new(spec) do |task| | ||
task.original_language = "en" | ||
task.translate_language = "ja" | ||
end | ||
|
||
Packnga::ReleaseTask.new(spec) do | ||
end | ||
|
||
desc "Run tests" | ||
task :test do | ||
ruby("test/run-test.rb") | ||
end |
49 changes: 49 additions & 0 deletions
49
chupa-text-decomposer-libreoffice-excel/chupa-text-decomposer-libreoffice-excel.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- ruby -*- | ||
# | ||
# Copyright (C) 2014-2019 Kouhei Sutou <kou@clear-code.com> | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 2.1 of the License, or (at your option) any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
clean_white_space = lambda do |entry| | ||
entry.gsub(/(\A\n+|\n+\z)/, '') + "\n" | ||
end | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "chupa-text-decomposer-libreoffice-excel" | ||
spec.version = "1.0.0" | ||
spec.homepage = "https://github.com/ranguba/chupa-text-decomposer-libreoffice" | ||
spec.authors = ["Kouhei Sutou"] | ||
spec.email = ["kou@clear-code.com"] | ||
readme = File.read("README.md", :encoding => "UTF-8") | ||
entries = readme.split(/^\#\#\s(.*)$/) | ||
description = clean_white_space.call(entries[entries.index("Description") + 1]) | ||
spec.summary = description.split(/\n\n+/, 2).first | ||
spec.description = description | ||
spec.license = "LGPL-2.1+" | ||
spec.files = ["#{spec.name}.gemspec"] | ||
spec.files += ["README.md", "LICENSE.txt", "Rakefile", "Gemfile"] | ||
spec.files += [".yardopts"] | ||
spec.files += Dir.glob("lib/**/*.rb") | ||
spec.files += Dir.glob("doc/text/*") | ||
spec.files += Dir.glob("test/**/*") | ||
|
||
spec.add_runtime_dependency("chupa-text-decomposer-libreoffice-general") | ||
|
||
spec.add_development_dependency("bundler") | ||
spec.add_development_dependency("rake") | ||
spec.add_development_dependency("test-unit") | ||
spec.add_development_dependency("packnga") | ||
spec.add_development_dependency("redcarpet") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# News | ||
|
||
## 1.0.0: 2019-02-26 | ||
|
||
The first release!!! |
36 changes: 36 additions & 0 deletions
36
chupa-text-decomposer-libreoffice-excel/lib/chupa-text/decomposers/libreoffice-excel.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (C) 2019 Kouhei Sutou <kou@clear-code.com> | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 2.1 of the License, or (at your option) any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
require "chupa-text/decomposers/libreoffice-general" | ||
|
||
module ChupaText | ||
module Decomposers | ||
class LibreOfficeExcel < LibreOfficeGeneral | ||
registry.register("libreoffice-excel", self) | ||
|
||
def initialize(options) | ||
super | ||
@extension = "xls" | ||
@mime_type = "application/vnd.ms-excel" | ||
end | ||
|
||
private | ||
def log_tag | ||
super + "[excel]" | ||
end | ||
end | ||
end | ||
end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env ruby | ||
# | ||
# Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com> | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 2.1 of the License, or (at your option) any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
$VERBOSE = true | ||
|
||
require "bundler/setup" | ||
|
||
require "test-unit" | ||
|
||
require "chupa-text" | ||
|
||
ChupaText::Decomposers.load | ||
|
||
require_relative "../../chupa-text-decomposer-libreoffice-general/test/helper" | ||
|
||
exit(Test::Unit::AutoRunner.run(true)) |
Oops, something went wrong.