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

Fix typos #464

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ I only do 3 things.

* Firstly I organize your existing collection of photos into a customizable folder structure.
* Second I help make it easy for all the photos you haven't taken yet to flow into the exact location they belong.
* Third but not least I promise to do all this without a yucky propietary database that some friends of mine use.
* Third but not least I promise to do all this without a yucky proprietary database that some friends of mine use.

*NOTE: make sure you've installed everything I need before running the commands below. [Instructions](#quickstart-guide) at the top of this page.*

Expand Down Expand Up @@ -193,7 +193,7 @@ You can add a custom folder structure by editing your `config.ini` file (which s

#### Custom folder examples

Sometimes examples are easier to understand than explainations so I'll start there. If you'd like to understand my magic I explain it in more detail below these examples. You customize your folder structure in the `Directory` section of your `config.ini`. For details of the supported formats see [strftime.org](http://strftime.org/)
Sometimes examples are easier to understand than explanations so I'll start there. If you'd like to understand my magic I explain it in more detail below these examples. You customize your folder structure in the `Directory` section of your `config.ini`. For details of the supported formats see [strftime.org](http://strftime.org/)

```
[Directory]
Expand Down Expand Up @@ -377,7 +377,7 @@ When I organize photos I look at the embedded metadata. Here are the details of
| Location (video, audio) | XMP:GPSLatitude, Composite:GPSLatitude, XMP:GPSLongitude, Composite:GPSLongitude | Composite tags are read-only |
| Title (photo) | XMP:Title | |
| Title (video, audio) | XMP:DisplayName | |
| Album | XMP-xmpDM:Album, XMP:Album | XMP:Album is user defined in `configs/ExifTool_config` for backwards compatability |
| Album | XMP-xmpDM:Album, XMP:Album | XMP:Album is user defined in `configs/ExifTool_config` for backwards compatibility |
| Camera Make (photo, video) | EXIF:Make, QuickTime:Make | |
| Camera Model (photo, video) | EXIF:Model, QuickTime:Model | |

Expand Down
2 changes: 1 addition & 1 deletion elodie.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from elodie import constants
from elodie import geolocation
from elodie import log
from elodie.compatability import _decode
from elodie.compatibility import _decode
from elodie.config import load_config
from elodie.filesystem import FileSystem
from elodie.localstorage import Db
Expand Down
2 changes: 1 addition & 1 deletion elodie/compatability.py → elodie/compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _copyfile(src, dst):
pass


# If you want cross-platform overwriting of the destination,
# If you want cross-platform overwriting of the destination,
# use os.replace() instead of rename().
# https://docs.python.org/3/library/os.html#os.rename
def _rename(src, dst):
Expand Down
6 changes: 3 additions & 3 deletions elodie/external/pyexiftool.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def strip_nl (s):


# Error checking function
# Note: They are quite fragile, beacsue teh just parse the output text from exiftool
# Note: They are quite fragile, beacsue the just parse the output text from exiftool
def check_ok (result):
"""Evaluates the output from a exiftool write operation (e.g. `set_tags`)
Expand Down Expand Up @@ -166,7 +166,7 @@ class ExifTool(object, with_metaclass(Singleton)):
"""Run the `exiftool` command-line tool and communicate to it.
You can pass two arguments to the constructor:
- ``addedargs`` (list of strings): contains additional paramaters for
- ``addedargs`` (list of strings): contains additional parameters for
the stay-open instance of exiftool
- ``executable`` (string): file name of the ``exiftool`` executable.
The default value ``exiftool`` will only work if the executable
Expand All @@ -193,7 +193,7 @@ class ExifTool(object, with_metaclass(Singleton)):
options will be silently ignored by exiftool, so there's not
much that can be done in that regard. You should avoid passing
non-existent files to any of the methods, since this will lead
to undefied behaviour.
to undefined behaviour.
.. py:attribute:: running
Expand Down
6 changes: 3 additions & 3 deletions elodie/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import shutil
import time

from elodie import compatability
from elodie import compatibility
from elodie import geolocation
from elodie import log
from elodie.config import load_config
Expand Down Expand Up @@ -180,7 +180,7 @@ def get_file_name(self, metadata):
this_value = os.path.splitext(metadata['original_name'])[0]
else:
# We didn't always store original_name so this is
# for backwards compatability.
# for backwards compatibility.
# We want to remove the hardcoded date prefix we used
# to add to the name.
# This helps when re-running the program on file
Expand Down Expand Up @@ -583,7 +583,7 @@ def process_file(self, _file, destination, media, **kwargs):
# Move the exif _original back to the initial source file
shutil.move(exif_original_file, _file)
else:
compatability._copyfile(_file, dest_path)
compatibility._copyfile(_file, dest_path)

# Set the utime based on what the original file contained
# before we made any changes.
Expand Down
8 changes: 4 additions & 4 deletions elodie/geolocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def coordinates_by_name(name):
# geocodeQuality=city.
geolocation_result = geolocation_info['results'][0]
use_location = geolocation_result['locations'][0]['latLng']
# Loop over the locations to see if we come accross a
# Loop over the locations to see if we come across a
# geocodeQuality=city.
# If we find a city we set that to the use_location and break
for location in geolocation_result['locations']:
Expand Down Expand Up @@ -147,7 +147,7 @@ def place_name(lat, lon):

# Try to get cached location first
db = Db()
# 3km distace radious for a match
# 3km distance radious for a match
cached_place_name = db.get_location_name(lat, lon, 3000)
# We check that it's a dict to coerce an upgrade of the location
# db from a string location to a dictionary. See gh-160.
Expand All @@ -159,7 +159,7 @@ def place_name(lat, lon):
if(geolocation_info is not None and 'address' in geolocation_info):
address = geolocation_info['address']
# gh-386 adds support for town
# taking precedence after city for backwards compatability
# taking precedence after city for backwards compatibility
for loc in ['city', 'town', 'state', 'country']:
if(loc in address):
lookup_place_name[loc] = address[loc]
Expand Down Expand Up @@ -246,7 +246,7 @@ def parse_result(result):
def parse_result_address(result):
# We want to store the city, state and country
# The only way determined to identify an unfound address is
# that none of the indicies were found
# that none of the indices were found
if( 'results' not in result or
len(result['results']) == 0 or
'locations' not in result['results'][0] or
Expand Down
4 changes: 2 additions & 2 deletions elodie/media/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_coordinate(self, type='latitude'):

# The lat/lon _keys array has an order of precedence.
# The first key is writable and we will give the writable
# key precence when reading.
# key presence when reading.
direction_multiplier = 1.0
for key in self.latitude_keys + self.longitude_keys:
if key not in exif:
Expand Down Expand Up @@ -252,7 +252,7 @@ def set_location(self, latitude, longitude):

# The lat/lon _keys array has an order of precedence.
# The first key is writable and we will give the writable
# key precence when reading.
# key presence when reading.
tags = {
self.latitude_keys[0]: latitude,
self.longitude_keys[0]: longitude,
Expand Down
2 changes: 1 addition & 1 deletion elodie/plugins/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from sys import exc_info
from traceback import format_exc

from elodie.compatability import _bytes
from elodie.compatibility import _bytes
from elodie.config import load_config_for_plugin, load_plugin_config
from elodie.constants import application_directory
from elodie import log
Expand Down
4 changes: 2 additions & 2 deletions elodie/tests/geolocation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_lookup_debug_mapquest_url():

@mock.patch('elodie.constants.location_db', '%s/location.json-cached' % gettempdir())
def test_place_name_deprecated_string_cached():
# See gh-160 for backwards compatability needed when a string is stored instead of a dict
# See gh-160 for backwards compatibility needed when a string is stored instead of a dict
helper.reset_dbs()
with open('%s/location.json-cached' % gettempdir(), 'w') as f:
f.write("""
Expand All @@ -156,7 +156,7 @@ def test_place_name_cached():
assert place_name['city'] == 'UNITTEST', place_name

def test_place_name_no_default():
# See gh-160 for backwards compatability needed when a string is stored instead of a dict
# See gh-160 for backwards compatibility needed when a string is stored instead of a dict
helper.reset_dbs()
place_name = geolocation.place_name(123456.000, 123456.000)
helper.restore_dbs()
Expand Down
2 changes: 1 addition & 1 deletion elodie/tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from datetime import datetime
from datetime import timedelta

from elodie.compatability import _rename
from elodie.compatibility import _rename
from elodie.external.pyexiftool import ExifTool
from elodie.dependencies import get_exiftool
from elodie import constants
Expand Down
4 changes: 2 additions & 2 deletions elodie/tests/media/photo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def _test_photo_type_get(type, date):
if not photo_file:
photo_file = helper.download_file(photo_name, folder)
if not photo_file or not os.path.isfile(photo_file):
raise SkipTest('{} file not downlaoded'.format(type))
raise SkipTest('{} file not downloaded'.format(type))

# downloading for each test is costly so we save it in the working directory
file_path_save_as = helper.get_file_path(photo_name)
Expand All @@ -401,7 +401,7 @@ def _test_photo_type_set(type, date):
if not photo_file:
photo_file = helper.download_file(photo_name, folder)
if not photo_file or not os.path.isfile(photo_file):
raise SkipTest('{} file not downlaoded'.format(type))
raise SkipTest('{} file not downloaded'.format(type))

shutil.copyfile(photo_file, origin)

Expand Down
2 changes: 1 addition & 1 deletion elodie/tools/add_original_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from elodie import constants
from elodie import geolocation
from elodie import log
from elodie.compatability import _decode
from elodie.compatibility import _decode
from elodie.filesystem import FileSystem
from elodie.localstorage import Db
from elodie.media.base import Base, get_all_subclasses
Expand Down