{"id":24557450,"url":"https://github.com/antoinelyset/poleica","last_synced_at":"2025-08-16T23:06:08.638Z","repository":{"id":8956206,"uuid":"10694345","full_name":"antoinelyset/poleica","owner":"antoinelyset","description":"Poleica : Ruby conversion tool \u0026 preview creator","archived":false,"fork":false,"pushed_at":"2015-03-18T14:50:15.000Z","size":651,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-28T08:49:45.323Z","etag":null,"topics":["conversion","documents","gif","image","jpeg","libreoffice","pdf","png","preview","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoinelyset.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-14T17:41:19.000Z","updated_at":"2019-07-15T12:53:25.000Z","dependencies_parsed_at":"2022-09-01T16:52:17.990Z","dependency_job_id":null,"html_url":"https://github.com/antoinelyset/poleica","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/antoinelyset/poleica","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinelyset%2Fpoleica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinelyset%2Fpoleica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinelyset%2Fpoleica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinelyset%2Fpoleica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoinelyset","download_url":"https://codeload.github.com/antoinelyset/poleica/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinelyset%2Fpoleica/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781393,"owners_count":24643820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conversion","documents","gif","image","jpeg","libreoffice","pdf","png","preview","ruby"],"created_at":"2025-01-23T05:16:50.123Z","updated_at":"2025-08-16T23:06:08.576Z","avatar_url":"https://github.com/antoinelyset.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Poleica\n## Ruby conversion tool \u0026 preview creator \n\n[![Build Status](https://travis-ci.org/antoinelyset/poleica.png?branch=master)](https://travis-ci.org/antoinelyset/poleica)\n[![Coverage Status](https://coveralls.io/repos/antoinelyset/poleica/badge.png)](https://coveralls.io/r/antoinelyset/poleica)\n[![Code Climate](https://codeclimate.com/github/antoinelyset/poleica.png)](https://codeclimate.com/github/antoinelyset/poleica)\n[![Gem Version](https://badge.fury.io/rb/poleica.png)](http://badge.fury.io/rb/poleica)\n[![Dependency Status](https://gemnasium.com/antoinelyset/poleica.png)](https://gemnasium.com/antoinelyset/poleica)\n\n## Concept\n\n_ -\u003e PDF -\u003e Image\n\nImage    -\u003e Image\n\nBasically it just takes some files, tries to convert it to PDF or PNG. It was modularly written, so you can improve the gem with more conversion tools (html to pdf is planned).\n\n## Installation\n\n__Ubuntu__ :\n\nLook at [.travis.yml](https://github.com/antoinelyset/poleica/blob/master/.travis.yml) file\n\n__MacOS__ :\n\n```\nbrew install ghostscript graphicsmagick\n```\nDownload [LibreOffice](http://www.libreoffice.org/download) and install it.\n\n\n__Then__ :\n\n```\ngem install poleica\n```\n\nor in __Gemfile__ :\n\n```ruby\ngem 'poleica'\n```\n\n\n## Usage\n\n```ruby\nPoleica.new(file_path).to_png\nPoleica.new(file_path).to_pdf\nPoleica.new(file_path).to_thumbnail\nPoleica.new(file_path).to_png(width: 400, weight: 400)\n```\n\n## Configuration\n\nExample : \n\n```ruby\nPoleica.configure do |config|\n  config.timeout = 2 # time in secs\n  config.libre_office[:bin_paths][:linux] = '/usr/local/bin/gm'\n  config.graphics_magick[:bin_paths][:osx] = '/Applications/OpenOffice.app/Contents/MacOS/soffice.bin'\nend\n```\n\n## Options\n\n- weight       : pixels number\n- width        : pixels number\n- force_resize : boolean(false) (it doesnt preserve the image ratio)\n- path         : string folder or file\n- auto_orient  : boolean(true) (keep the orientation extracted from EXIF)\n\n## Dependencies\n\n- GraphicsMagick (gm) \u003e= 1.3.18 (for auto-rotate)\n- LibreOffice \n\n## Requirements\n\n- It should be easy\n- It should work on MacOS \u0026 Linux\n- It should handle standard files\n- It should convert to PNG or PDF\n\n## Standard files\n\n- Documents: PDF, PPT, DOC, TXT..\n- Images: PNG, JPEG, GIF...\n\n## Conventions\n\n- I wrote mimetype not mime_type\n\n## Warning\n\n- If you want to disable .~lock.#{file_name}# creation in /tmp just :\n    ```export SAL_ENABLE_FILE_LOCKING=0```\n- Exit LibreOffice App before tests and launch\n\n## Thanks\n\n- A lot of inspiration from a lot of gems :\n  - Docsplit\n  - Paperclip\n  - ROM\n  - ...\n\n## License\n\nPoleica is released under the [MIT\nLicense](http://www.opensource.org/licenses/MIT)\n\n## Trivia \nPoleica = Polaroid + Leica (hipsterism)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinelyset%2Fpoleica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoinelyset%2Fpoleica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinelyset%2Fpoleica/lists"}