-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat: tweak document file naming #831
Conversation
I'm not convinced by the suffix logic in here. One thing that's not great: if the user adds more PDF files without |
Great improvement! ❤️
Can you explain a bit what the problem is here? It sounds like that would be the expected behaviour? Or do you think the default should be warning of clashes and abort? |
I was mostly thinking that if you give |
Oh right, yeah that really isn't intuitive! |
cb8d769
to
819e8e8
Compare
819e8e8
to
80e233d
Compare
80e233d
to
33b8f0f
Compare
Finally got back to this a bit. With the new version it should
For a few examples of the results (ignoring any bugs, fingers crossed)
$ papis add some-file.pdf some-other-file.pdf some-other-file.md
["some-file.pdf", "some-other-file.pdf", "some-other-file.md"]
$ papis add some-file.pdf some-file.pdf some-other-file.md
["some-file.pdf", "some-file-a.pdf", "some-other-file.md"] we don't do any actual deduplication of whatever the user passed on the command line, so both those files will go in :\
$ papis add some-file.pdf some-other-file.pdf some-other-file.md
["1918-einstein.pdf", "1918-einstein-a.pdf", "1918-einstein.md"] and
This looks pretty good to me, so unless someone notices a bug, it should go in soon-ish 😁 |
66b5772
to
33b8f0f
Compare
Thanks very much! I don't know if I should be arsed to test it since your comment describes the cases so well, looks good and am excited for this 😄 |
Thank you for taking a look! I'll go ahead and merge it then. Feel free to open issues if you find some bugs in there 😁 |
This tries to be a bit smarter about adding suffixes to files in
papis add
andpapis addto
. Namely:papis.paths.rename_document_files
.file.pdf
andfile.md
it will now not rename them like<something>.pdf
and<something>-a.md
(with thea
suffix).