Comments (6)
Sketching an idea out, would it make sense to have this in config.ini
?
[Directory]
key=%Y-%m-%d
Then, in filesystem.py
from configparser import ConfigParser
__DIR__ = None
def get_dir():
global __DIR__
if __DIR__ is not None:
return __DIR__
config_file = '%s/config.ini' % constants.application_directory
if not path.exists(config_file):
return None
config = ConfigParser()
config.read(config_file)
if('Directory' not in config.sections()):
return None
__DIR__ = config.get('Directory', 'dir')
return __DIR__
Which would then allow you to do
time.strftime(__DIR__, time_obj)
and path.append(time.strftime(__DIR__, metadata['date_taken']))
I'm happy to write a PR if that looks suitable? Of course, it only lets you set a date based path, so no good if you want /place/date
or anything like that.
from elodie.
PR merged. You can now customize the folder path as documented here. https://github.com/jmathai/elodie#create-your-own-folder-structure
Customizing the file name is being tracked in #107.
from elodie.
@patricksan A few folks have asked about this. The ability to define what the folder structure is would be nice. The folder names can't have reserved characters though.
You may want /%location%/%date%
in addition to just wanting different date formats.
from elodie.
I think something to the effect of defining the format string like so:
FILENAME_FORMAT = "/{exif.date:%Y-%m-%d}/{exif.location}"
I don't know that I see a problem with putting reserved (i.e. path separator) characters in. Some may want a slightly different folder structure. Here are some I can think of off the top of my head:
- (current)
/{date:%Y-%d-%b}/{location}/{filename}
/{date:%Y-%m-%d}/{location}/{filename}
/{location}/{date:%Y-%m-%d}/{filename}
/{date:%Y}/{date:%m}/{date:%d}/{filename}
from elodie.
@waynew I like that format and I think it's something we can easily parse.
There are some considerations to keep in mind though. Right now, for example, the leaf folder can be either a location name or an album name. If the album exists in EXIF that takes precedent over location.
I think we want to keep that level of customization included when we try to solve this.
from elodie.
PR looks great. Moving discussion there.
from elodie.
Related Issues (20)
- Move automated tests from Travis to CircleCI
- Remove link to getelodie.com from Readme.
- ImportError: cannot import name 'Iterable' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py) HOT 1
- Any tips and tricks on how to figure out why most of my pictures got discarded? HOT 1
- api key generation fails HOT 3
- keywords based dynamic albums HOT 1
- imghdr going away
- Crash on text file NOT containing us-ascii or utf-8 in first line
- feature: able to create symlinks instead of copying
- Calculate checksum of image without EXIF-data
- Unknown Location - invalid AppKey HOT 14
- Support a time offset in addition to absolute time
- ISO 8601 datetime without capitalising the rest of the filename? HOT 1
- Dockerfile no longer resolves to a valid url for Exiftool download
- Dockerfile no longer works with debian:jessie as the base
- Unexpected int returned instead of string from metadata[part] in filesystem.py HOT 1
- Will there be an official Elodie docker image published on the cloud (ie not the Dockerfile) ?
- Elodie not recognizing videos with the .mkv file extension HOT 2
- Feature request: support for NRW and RAF files
- config.ini ignored HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elodie.