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

Research command line template argument/s (-t) #7

Closed
ldexterldesign opened this issue Mar 30, 2015 · 12 comments
Closed

Research command line template argument/s (-t) #7

ldexterldesign opened this issue Mar 30, 2015 · 12 comments

Comments

@ldexterldesign
Copy link

Hey,

Could you offer some documentation on using the -t argument via command line?

I'd like to specify custom file names, beyond the default

Yours hopefully

@dylansmith
Copy link
Owner

Hi! What kind of documentation are you specifically interested in? As a quick example of usage, you can try to run the following command from your local copy of the repository:

./bin/exif-renamer -t './{{datetime "yyyy-mm"}}:{{file}}' -d demo/img/exif.jpg

This shows how you would pass a quoted template string using the -t argument. I posted some docs on the format of the template string in the readme, but perhaps if you can tell me about your requirements I could be more helpful?

@ldexterldesign
Copy link
Author

Thanks for reply

Need to batch process some image files

Now having problems with the file name extensions - can I ignore them when using -t?

Cheers

@dylansmith
Copy link
Owner

Yes, that is possible. The template controls all aspects of the filename. For example, the following will generate a file without an extension:

./bin/exif-renamer -t './{{datetime "yyyy-mm"}}:{{name}}' -d demo/img/exif.jpg

Take a look at the metadata section of the readme for all the available variables.

@ldexterldesign
Copy link
Author

Thank you!

@dylansmith
Copy link
Owner

No problem. Hope you enjoy using this tool (it would be awesome if you could star it if you do)!

@ldexterldesign
Copy link
Author

Sorry, "ignore" the extension, as in leave it/them intact

I don't need to mess with the extension

Cheers

@ldexterldesign
Copy link
Author

Apologies, I'm with you now ;)

exif-renamer -t '{{datetime}}.{{ext}}' -d .

Hope this helps someone else

Kind thanks

@ldexterldesign
Copy link
Author

Is there comprehensive metadata documentation available; similar to: https://www.npmjs.com/package/exif ?

Yours hopefully

@ldexterldesign
Copy link
Author

exif-renamer -e IMG_20150312_013213.jpg

Hehe, sorry for the noise - I may as well be writing the documentation at this rate :/

Apologies,

@ldexterldesign
Copy link
Author

@dylansmith
Copy link
Owner

Thanks very much Lewis, I'll include your -e recommendation in the readme.

@dylansmith
Copy link
Owner

Hi Lewis, I have added a new -l switch which lists all the metadata passed to the templating function.

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

No branches or pull requests

2 participants