Giter VIP home page Giter VIP logo

shrinkpdf's People

Contributors

aklomp avatar anasem avatar dan0nchik avatar he-ro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

shrinkpdf's Issues

CI: add GitHub Actions

Add a CI pipeline using GitHub Actions.

  • Run shellcheck on every commit to check for common shell-scripting pitfalls.
  • Run the actual script by generating a quick PDF file and trying to shrink it. Maybe converting the README.md to PDF with pandoc or something similar.

Use the C locale to portably parse the PDF header

On a machine where the locale is set to something not equivalent to ASCII, the call to awk in get_pdf_version() will throw the following error:

awk: cmd. line:1: (FILENAME=- FNR=1) warning: Invalid multibyte data detected. There may be a mismatch between your data and your locale. 

This can be fixed by forcing the C locale by prepending the call to awk with LC_ALL=C.

Reported and fixed by Laurent MUGNIER.

Overwrite option

Hi

I've used a personnal script with more or less same feature. As your code looks better I'll change to it :)

A feature miss in my use cas overwrite option. In many case I assume optimization should be done on the original file. Is it possible to add this behavior ?

Thanks

Replace optional positional arguments with option flags

Currently, the script has the usage signature shrinkpdf.sh [-g|-h] <infile> [outfile] [res]. The mix of positional arguments and option arguments is a bit messy. Let's replace the optional positional arguments with option flags.

Proposal for the new usage signature: shrinkpdf [-g|-h] <infile> [-o <outfile>] [-r res]

This should be a bit more future proof if new features are added.

Segfault error

Experiencing Segmentation Fault (core dumped) error for some PDFs. How to solve?

Input from absolute URL

HI @aklomp thanks for this library
Any way/any plan to be able to use absolute url as PDF input file?

So we can use this as API without 'upload'/store the PDF at same location first.

Thanks!

Add default configuration file

Hello

In try to provide a package version, could be nice to allow configuration.

Following debian logic could be an /etc/default/package file as default configuration.
Followign FHS could be an /etc/shrinkpdf file to overwrite configuration

I've tried to do it with 86bad6d
But if we want not be debian centric, should be a test on /etc/shrinkdpf if present.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.