docsplit_images 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.markdown +67 -19
  2. data/VERSION +1 -1
  3. data/docsplit_images.gemspec +1 -1
  4. metadata +2 -2
data/README.markdown CHANGED
@@ -1,10 +1,50 @@
1
1
  # docsplit_images
2
2
 
3
- Docsplit images is used to convert a document file (pdf, xls, xlsx, ppt, pptx, doc, docx, etc...) to a list of images
3
+ Docsplit images is used to convert a document file (pdf, xls, xlsx, ppt, pptx, doc, docx, etc...) to a list of images combining with famous paperclip gem at [https://github.com/thoughtbot/paperclip]
4
4
 
5
5
  ## Installation
6
6
 
7
- gem 'docsplit_images', '0.1.1', :git => 'git@github.com:RubifyTechnology/docsplit_images.git'
7
+ ### Install Docsplit gem dependency (Referring from [http://documentcloud.github.com/docsplit/](http://documentcloud.github.com/docsplit/))
8
+
9
+ #### 1. Install GraphicsMagick. Its ‘gm’ command is used to generate images. Either compile it from source, or use a package manager:
10
+
11
+ [aptitude | port | brew] install graphicsmagick
12
+
13
+ #### 2. Install Poppler. On Linux, use aptitude, apt-get or yum:
14
+
15
+ aptitude install poppler-utils poppler-data
16
+
17
+ On Mac, you can install from source or use MacPorts:
18
+
19
+ sudo port install poppler | brew install poppler
20
+
21
+ #### 3. (Optional) Install Ghostscript:
22
+
23
+ [aptitude | port | brew] install ghostscript
24
+
25
+ Ghostscript is required to convert PDF and Postscript files.
26
+
27
+ #### 4. (Optional) Install Tesseract:
28
+
29
+ [aptitude | port | brew] install [tesseract | tesseract-ocr]
30
+
31
+ Without Tesseract installed, you'll still be able to extract text from documents, but you won't be able to automatically OCR them.
32
+
33
+ #### 5. (Optional) Install pdftk. On Linux, use aptitude, apt-get or yum:
34
+
35
+ aptitude install pdftk
36
+
37
+ On the Mac, you can download a [http://www.pdflabs.com/docs/install-pdftk/](recent installer for the binary). Without pdftk installed, you can use Docsplit, but won't be able to split apart a multi-page PDF into single-page PDFs.
38
+
39
+ #### 6. (Optional) Install OpenOffice. On Linux, use aptitude, apt-get or yum:
40
+
41
+ aptitude install openoffice.org openoffice.org-java-common
42
+
43
+ On the Mac, download and install the [http://www.openoffice.org/download/index.html]http://www.openoffice.org/download/index.html.
44
+
45
+ ### Install Gem
46
+
47
+ gem 'docsplit_images', '0.1.2', :git => 'git@github.com:RubifyTechnology/docsplit_images.git'
8
48
 
9
49
  ## Setting Up
10
50
 
@@ -12,32 +52,40 @@ From terminal, type the command to install
12
52
 
13
53
  bundle
14
54
  rails g docsplit_images <table_name> <attachment_field_name>
15
- # e.g rails generate docsplit_images asset document
55
+ # e.g. rails generate docsplit_images asset document
16
56
  rake db:migrate
17
57
 
18
58
  In your model:
19
59
 
20
- class Asset < ActiveRecord::Base
21
- ...
22
- attr_accessible :document
23
- has_attached_file :document
24
- docsplit_images_conversion_for :document
25
- ...
26
- end
60
+ class Asset < ActiveRecord::Base
61
+ ...
62
+ attr_accessible :mydocument
63
+ has_attached_file :mydocument
64
+ docsplit_images_conversion_for :mydocument
65
+ ...
66
+ end
27
67
 
28
68
  ## Accessing list of images using ``document_images_list``
29
69
 
30
70
  ``document_images_list`` will return a list of URL of images converting from the document
31
71
 
32
- asset.document_images_list
33
- # => [
34
- "/system/myfile_revisions/files/000/000/019/images/SBA_Admin_workflow_1.png",
35
- "/system/myfile_revisions/files/000/000/019/images/SBA_Admin_workflow_2.png", ...
36
- ]
72
+ asset.document_images_list
73
+ # => ["/system/myfile_revisions/files/000/000/019/images/SBA_Admin_workflow_1.png", "/system/myfile_revisions/files/000/000/019/images/SBA_Admin_workflow_2.png", ...]
74
+
37
75
 
38
- Then open your browser at http://localhost:3000 and fill in username: superadmin, password: password to login
76
+ Contributing to docsplit_images
77
+ -------------
78
+
79
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
80
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
81
+ * Fork the project.
82
+ * Start a feature/bugfix branch.
83
+ * Commit and push until you are happy with your contribution.
84
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
85
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
39
86
 
40
- * To configure email sender for devise, you can change it in ``config/config.yml`` - ``email_sender`` option
41
- * You can configure application name in ``config/config.yml`` - ``project_name`` option
87
+ Copyright
88
+ -------------
42
89
 
43
- ## Usage
90
+ Copyright (c) 2012 jameshuynh. See LICENSE.txt for
91
+ further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "docsplit_images"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jameshuynh"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: docsplit_images
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - jameshuynh
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- hash: -2321886849909627303
131
+ hash: -1925981269097560157
132
132
  segments:
133
133
  - 0
134
134
  version: "0"