Skip to content

Single file processing#17

Open
borondics wants to merge 1 commit into
biolab:masterfrom
borondics:single_file_reduction
Open

Single file processing#17
borondics wants to merge 1 commit into
biolab:masterfrom
borondics:single_file_reduction

Conversation

@borondics

Copy link
Copy Markdown
Member
Issue
Description of changes

I added a feature to be able to process a single file as well, not only a directory.

Comment thread tools/tinify_images.py
parser.add_argument('-k', '--key', type=str, required=True,
help='API key')

parser.add_argument('-p', '--path', type=str, required=True,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change existing argument names. Old saved commands should still work.

Comment thread tools/tinify_images.py
source = tinify.from_file(file_path)
source.to_file(file_path)
time.sleep(0.1)
elif os.path.isfile(target):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should test this or previous solution depending on how it works with paths that have to expanded, such as ~/dev/orange3.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants