Changed timezone default (to utc).

Old behavior failed when TZ was omitted.
This commit is contained in:
Marcus Scholz 2020-03-09 15:56:28 +01:00
parent 5b4811b081
commit 83977b50bb
2 changed files with 16 additions and 6 deletions

View File

@ -32,10 +32,12 @@ These exported .his files look like this:
## Usage ## Usage
``` ```
usage: exif_rad.py [-h] [-si SIFACTOR] [-o OUTDIR] CSV Photo [Photo ...] usage: exif_rad.py [-h] [-si SIFACTOR] [-tz Timezone] [-d] [-g GPX]
[-o OUTDIR]
CSV Photo [Photo ...]
A tool that writes radiation levels (and optionally geocoordinates) to image A unix-tyle tool that extracts GPS and/or radiation data from GPX/CSV files
files and extracts the infos from external sources. and writes them into the Exif tags of given photos.
positional arguments: positional arguments:
CSV Geiger counter history file in CSV format. CSV Geiger counter history file in CSV format.
@ -46,8 +48,15 @@ optional arguments:
-si SIFACTOR, --sifactor SIFACTOR -si SIFACTOR, --sifactor SIFACTOR
Factor to multiply recorded CPM with. (default: Factor to multiply recorded CPM with. (default:
0.0065) 0.0065)
-tz Timezone, --timezone Timezone
Manually set timezone of CSV / and Photo timestamp,
defaults to localtime if omitted. (default: None)
-d, --dry Dry-run, do not actually write anything. (default:
False)
-g GPX, --gpx GPX GPS track in GPX format (default: None)
-o OUTDIR, --outdir OUTDIR -o OUTDIR, --outdir OUTDIR
Directory to output processed photos (default: .) Directory to output processed photos. (default: .)
``` ```
### Examples ### Examples

View File

@ -31,9 +31,10 @@ parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFo
them into the Exif tags of given photos.''') them into the Exif tags of given photos.''')
parser.add_argument('-si', '--sifactor', type=float, default=0.0065, parser.add_argument('-si', '--sifactor', type=float, default=0.0065,
help='Factor to multiply recorded CPM with.') help='Factor to multiply recorded CPM with.')
parser.add_argument('-tz', '--timezone', type=str, metavar='Timezone', parser.add_argument('-tz', '--timezone', type=str, metavar='Timezone', default='utc',
help='''Manually set timezone of CSV / and Photo timestamp, help='''Manually set timezone of CSV / and Photo timestamp,
defaults to localtime if omitted.''') defaults to UTC if omitted. This is useful, if the GPS-Logger
saves the time incl. timezone''')
parser.add_argument('-d', '--dry', action='store_true', parser.add_argument('-d', '--dry', action='store_true',
help='Dry-run, do not actually write anything.') help='Dry-run, do not actually write anything.')
parser.add_argument('csv', metavar='CSV', type=str, parser.add_argument('csv', metavar='CSV', type=str,