Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Add option to prevent truncation of tags. #56

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
2 changes: 1 addition & 1 deletion f2flickr/uploadr.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def uploadImage( self, image ):
logging.debug("Getting EXIF for %s", image)
f = open(image, 'rb')
try:
exiftags = exifread.process_file(f)
exiftags = exifread.process_file(f, truncate_tags=(configdict.get('truncate_tags', 'true')!='false'))
except MemoryError:
exiftags = {}
f.close()
Expand Down
8 changes: 8 additions & 0 deletions uploadr.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ full_folder_tags = false
# date_posted_utc: GMT zone (Flickr defaults to UTC). Number of hours to be subtracted for obtaining an UTC timestamp from EXIF or fixed date_posted, e.g. +1 or 1 or -6
override_dates = 0

#
## set truncate_tags to false if you wish to override the original (default)
## truncation of EXIF tag data. Originally, tags were truncated to 20 charaters,
## but this can sometimes cause errors. Setting to false should fix this.
## true (Default), tags are truncated
## false, tags are not truncated
truncate_tags = true

#
# Key and Hash codes. Use those established by the original folders2flicker author (default below)
# or alternately request your own from Flickr.
Expand Down