This file contains hidden or 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
| # Depends on working pdftk, gm (GraphicsMagick), and pdftotext (Poppler) commands. | |
| # Splits a pdf into batches of N pages, creates their thumbnails and icons, | |
| # as specified in the Job options, gets the text for every page, and merges | |
| # it all back into a tar archive for convenient download. | |
| # | |
| # See <tt>examples/process_pdfs_example.rb</tt> for more information. | |
| class ProcessPdfs < CloudCrowd::Action | |
| # Split up a large pdf into single-page pdfs. Batch them into 'batch_size' | |
| # chunks for processing. The double pdftk shuffle fixes the document xrefs. |
This file contains hidden or 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
| " Vim functions to run RSpec and Cucumber on the current file and optionally on | |
| " the spec/scenario under the cursor. Within the context of a Rails app, will | |
| " prefer script/spec and script/cucumber over their system counterparts. | |
| function! RailsScriptIfExists(name) | |
| " Bundle exec | |
| if isdirectory(".bundle") || (exists("b:rails_root") && isdirectory(b:rails_root . "/.bundle")) | |
| return "bundle exec " . a:name | |
| " Script directory | |
| elseif exists("b:rails_root") && filereadable(b:rails_root . "/script/" . a:name) | |
| return b:rails_root . "/script/" . a:name |
This file contains hidden or 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
| # Depends on working pdftk, gm (GraphicsMagick), and pdftotext (Poppler) commands. | |
| # Splits a pdf into batches of N pages, creates their thumbnails and icons, | |
| # as specified in the Job options, gets the text for every page, and merges | |
| # it all back into a tar archive for convenient download. | |
| # | |
| # See <tt>examples/process_pdfs_example.rb</tt> for more information. | |
| class ProcessPdfs < CloudCrowd::Action | |
| # Split up a large pdf into single-page pdfs. Batch them into 'batch_size' | |
| # chunks for processing. The double pdftk shuffle fixes the document xrefs. |
NewerOlder