Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial cleanup and commit

  • Loading branch information...
commit bd28a7c8759ee1be23b7c6f4d857195be99009b9 0 parents
@phlipper authored
6 .gitignore
@@ -0,0 +1,6 @@
+*.tgz
+*.tar.gz
+vendor/bundle
+.bundle
+.DS_Store
+build/*
20 LICENSE.txt
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+Copyright © 2012 Phil Cohen <github@phlippers.net>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the “Software”), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
46 README.md
@@ -0,0 +1,46 @@
+# DESCRIPTION
+
+Installs [pdf2image](https://code.google.com/p/pdf2image/). PDF2Image is a conversion library specialized in converting PDF documents to images (png,jpeg,..) and exports text data in XML and JSON format.
+
+
+# REQUIREMENTS
+
+## Supported Platforms
+
+The following platforms are supported by this cookbook, meaning that the recipes run on these platforms without error:
+
+* Ubuntu
+
+# RECIPES
+
+* `pdf2image` - The default recipe.
+
+# USAGE
+
+This cookbook installs the pdf2image components if not present.
+
+# ATTRIBUTES
+
+* `node[:pdf2image][:version]` default: "0.53"
+
+## Basic Settings
+
+None
+
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Added some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+
+## License
+
+**chef-pdf2image**
+
+* Freely distributable and licensed under the [MIT license](http://phlipper.mit-license.org/2012/license.html).
+* Copyright (c) 2012 Phil Cohen (github@phlippers.net) [![endorse](http://api.coderwall.com/phlipper/endorsecount.png)](http://coderwall.com/phlipper)
+* http://phlippers.net/
8 attributes/default.rb
@@ -0,0 +1,8 @@
+#
+# Cookbook Name:: pdf2image
+# Attributes:: default
+#
+# Copyright 2012, Phil Cohen
+#
+
+default[:pdf2image][:version] = "0.53"
17 metadata.rb
@@ -0,0 +1,17 @@
+name "pdf2image"
+maintainer "Phil Cohen"
+maintainer_email "github@phlippers.net"
+license "MIT"
+description "pdf2image tools"
+long_description IO.read(File.join(File.dirname(__FILE__), "README.md"))
+version "1.0.0"
+
+recipe "pdf2image", "Default recipe for installing pdf2image from source"
+
+supports "ubuntu"
+depends "xpdf"
+
+attribute "pdf2image/version",
+ :display_name => "Version number",
+ :description => "The version of pdf2image to install",
+ :default => "0.53"
33 recipes/default.rb
@@ -0,0 +1,33 @@
+#
+# Cookbook Name:: pdf2image
+# Recipe:: default
+#
+# Copyright 2012, Phil Cohen
+#
+
+pdf2image_version = node[:pdf2image][:version]
+pdf2image_tmp_dir = File.join(Chef::Config[:file_cache_path], "pdf2image")
+
+# ensure temp extraction dir exists
+directory pdf2image_tmp_dir do
+ owner "root"
+ group "root"
+ mode "0755"
+ action :create
+end
+
+# fetch remote source
+remote_file "#{pdf2image_tmp_dir}/pdf2image-#{pdf2image_version}-source.tar.gz" do
+ source "http://pdf2image.googlecode.com/files/pdf2image-#{pdf2image_version}-source.tar.gz"
+ action :create_if_missing
+end
+
+bash "compile_pdf2image_source" do
+ cwd pdf2image_tmp_dir
+ code <<-EOH
+ tar xzf pdf2image-#{pdf2image_version}-source.tar.gz
+ ./configure
+ make -j#{node[:cpu][:total]} && make install
+ EOH
+ creates "/usr/local/bin/pdf2image"
+end
Please sign in to comment.
Something went wrong with that request. Please try again.