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

token dir option #61

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
15 changes: 14 additions & 1 deletion f2flickr/uploadr.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,20 @@
#
# Location to scan for new images
#
IMAGE_DIR = configdict.get('imagedir')
IMAGE_DIR = " ".join(sys.argv[1:])
if IMAGE_DIR:
IMAGE_DIR = IMAGE_DIR
else:
IMAGE_DIR = configdict.get('imagedir')
print "Using image dir: " + IMAGE_DIR

TOKEN_DIR = configdict.get('tokendir')
if TOKEN_DIR:
print "Using token dir: " + TOKEN_DIR
os.chdir(TOKEN_DIR)
else:
print "Using token dir: current directory"

#
# Flickr settings
#
Expand Down
9 changes: 5 additions & 4 deletions uploadr.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Location to scan for new images (no trailing \)
#
# Example: imagedir = d:\pictures
imagedir =
imagedir =
tokendir =

#
# File we keep the history of uploaded images in.
Expand All @@ -20,13 +21,13 @@ family = 1
# Hide from public searches (if not set, this is the default):
hidden = 2

# set this to true if name of the auto generated flickr sets should be only name of the last sub folder
# set this to true if name of the auto generated flickr sets should be only name of the last sub folder
# e.g. Crete when folder is d:\testpictures\holidays\Crete\123img.jpg
only_sub_sets = false

# set full_folder_tags to true if you wish to override the original (default) parsing
# set full_folder_tags to true if you wish to override the original (default) parsing
# of folder tags and instead treat each sub-folder name as a complete tag.
# Example:
# Example:
# /path to/my picture/
# false (Default), tags are parsed: "path" "to" "my" "picture"
# true, tags are parsed: "path to" "my picture"
Expand Down