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

Elodie moves files to wrong folder after update #334

Closed
jbarlow83 opened this issue Aug 3, 2019 · 5 comments
Closed

Elodie moves files to wrong folder after update #334

jbarlow83 opened this issue Aug 3, 2019 · 5 comments
Labels

Comments

@jbarlow83
Copy link

Here's my Elodie config. MapQuest (probably) works.

~/.elodie/config.ini

[MapQuest]
key=...
prefer_english_names=True

[Directory]
location=%city
year=%Y
month=%m
full_path=%year-%month/%location
$ ~/elodie/elodie.py import --debug --destination=/tank/media/Photos/Sorted --source /tank/media/Photos/ElodieTest/
/tank/media/Photos/ElodieTest/photoname.jpg -> /tank/media/Photos/Sorted/Unknown Location/2005-06-30_00-24-00-photoname.jpg

As far as I can tell Elodie pretty much ignores full_path does what it wants (where did the %year and %month go?). In any event, I thought, let's see what if I can fix that unknown location....

$ ~/elodie/elodie.py update --debug --location="Seattle, WA" /tank/media/Photos/Sorted/Unknown\ Location/2005-06-30_00-24-00-photoname.jpg
/tank/media/Photos/Sorted/Unknown Location/2005-06-30_00-24-00-photoname.jpg -> /tank/media/Photos/Seattle/2005-06-30_00-24-00-photoname.jpg
{"source":"/tank/media/Photos/Sorted/Unknown Location/2005-06-30_00-24-00-photoname.jpg", "destination":"/tank/media/Photos/Seattle/2005-06-30_00-24-00-photoname.jpg"}

...it moves the file from the root directory where I want it, Photos/Sorted, to the parent directory, Photos. To be clear I have my photo collection at /tank/media/Photos. It's partially organized, and I ultimately want to organize it in place.

And that's where I gave up because either this commit (3ad6c0d) is badly broken or I'm doing something very wrong, since if I can't get a sensible result out of the first two commands I try.

@jmathai
Copy link
Owner

jmathai commented Aug 4, 2019

I added a test to verify that your first command should work. You can see it in #335

Can you confirm that the location of your config file is at ~/.elodie/config.ini?

We can investigate your second command once we figure out what's happening with your first :).

@jmathai
Copy link
Owner

jmathai commented Aug 4, 2019

Looks like my assertion was wrong in the test and it does in fact, fail. Thanks for reporting --- I'll look into why it's failing (and why we didn't have appropriate test coverage to catch it).

@jmathai jmathai added the bug label Aug 5, 2019
@jmathai
Copy link
Owner

jmathai commented Aug 5, 2019

Spent some more time looking at this. Can you try to update your config to use the following?

You can't use specific date placeholders like %Y and %m directly in full path. You need to assign them to a %date placeholder and use that in full_path.

[Directory]
location=%city
date=%Y-%m
full_path=%date/%location

@jmathai jmathai added invalid and removed bug labels Aug 23, 2019
@jmathai
Copy link
Owner

jmathai commented Aug 23, 2019

Please re-open this if you are still having problems.

@jmathai jmathai closed this as completed Aug 23, 2019
@jbarlow83
Copy link
Author

You can't use specific date placeholders like %Y and %m directly in full path.

The config.ini I gave for opening this ticket does not use %Y or %m directly, it assigned them to %year and %month.

Please note that this is one of your example configurations from README.md line 194, verbatim.

It still does not work.

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

No branches or pull requests

2 participants