Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: command option added #49

Closed
wants to merge 1 commit into from

Conversation

nikita-sah
Copy link

hi,
I have added the command line option (-C) for executing one or two small commands directly without having to create a script file, as requested in feature requests.

@jesparza
Copy link
Owner

Thanks, @nikita-sah! Let me take a look and I will merge it :) It is a feature I had in mind ;)

@jesparza
Copy link
Owner

jesparza commented May 1, 2016

Mmm, I have checked the code and I think it is better if we avoid writing to a temporary file, but just using the memory. Normally, I don't expect long commands to be passed via command line...

Another potential problem would be that one of the commands uses a comma as part of the command, so the split function would now behave as expected. I think more checking is needed or just accept one command and use several -C.

@jesparza
Copy link
Owner

jesparza commented May 1, 2016

At the end, I used the append action from Cmd to store the commands in a list when the user uses more than one -C parameter ("peepdf.py -C info -C tree mypdf.pdf"). This is a basic implementation, but a more complete solution is also needed. Closing this PR, thanks for sending it! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants