Comments (4)
convert is a command tool ImageMagick provides
from sh.
Hi Du, unfortunately this is a problem with how pbs and shlex split up arguments. There will be a workaround in v1.0 if I can find it, but in the meantime, you can do this:
pbs.convert("-crop", "+0+67", "some.jpg", "crop.jpg")
from sh.
Just an update, there will be no workaround in v1.0. It seems that the best way to handle passing arguments to commands is to split them up with the understanding that 1 argument to the pbs command should correspond to 1 argument being passed to the subprocess. I've updated the readme to reflect this.
So in other words, this:
pbs.convert("-crop +0+67", "some.jpg", "crop.jpg")
should always be this:
pbs.convert("-crop", "+0+67", "some.jpg", "crop.jpg")
Because "-crop" and "+0+67" are separate arguments to the "convert" binary, and using shlex.split() to split up arguments automagically is broken and full of problems.
from sh.
pbs.convert("-crop", "+0+67", "some.jpg", "crop.jpg") works.
thanks, amoffat.
from sh.
Related Issues (20)
- Is test_general_signal timing sensitive? HOT 2
- ssh contrib doesn't interact HOT 5
- Can you run `gum filter` with sh?
- piping not working HOT 3
- Nested contexts duplicate commands HOT 1
- 2.0.4: pytest is failing in two units HOT 6
- Requires 3.8.1 specifically, instead of just 3.8 HOT 5
- RFE: please start making github releases HOT 6
- Automate github releases
- "Bad" signals can't be ignored with _ok_code HOT 5
- cannot import name 'pg_dump' from 'sh' HOT 2
- Github page link 404s HOT 2
- glob wrapper breaks glob(.., root_dir=someething) HOT 1
- Special kwarg _cwd and sh.pushd() not working HOT 5
- baking piped commands HOT 2
- piped commands via ssh? HOT 4
- RFH: Unable to pipe `sudo` process to `sudo` process HOT 3
- sh doesn't print output unless wrapped in print() HOT 1
- Feature proposal: _except callback HOT 6
- documentation has bad example code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sh.