Released:
Upload a directory of media (pics/videos) to Flickr for showing off your pics on the WEB and as a backup of your local storage. flickr-uploader designed primarly for Synology Devices. Also works on Linux, Mac and Windows systems.
Project description
Pause the Flickr Uploadr for Windows Is bandwidth in short supply? You can pause the Uploadr for as long as you need. Right-click the Uploadr icon in the. Feb 05, 2021 About the Flickr Uploadr for Windows. Download and install the Uploadr today to automatically back up some or all of your photos to your Flickr account, where they're saved privately - so only you can see them. (Note: currently this tool does not support video upload) Pro-only - Uploadr on desktop is only available for Flickr Pro accounts.
by oPromessa, 2017, V2.8.6
- Published on https://github.com/oPromessa/flickr-uploader/
Description
- Upload a directory of media (pics/videos) to Flickr for showing off your picson the WEB and as a backup of your local storage.
- Check Features, Requirements and Setup remarks.
- flickr-uploader designed primarly for Synology Devices.
- Also works on Linux, Mac and Windows systems.
PyPi Download stats (as of Sep/2018)
version | system_name | percent | download_count |
---|---|---|---|
2.8.6 | Linux | 71.70% | 38 |
2.8.6 | Darwin | 13.21% | 7 |
2.8.7a1 | Linux | 7.55% | 4 |
2.8.6 | Windows | 5.66% | 3 |
2.8.6a9 | Linux | 1.89% | 1 |
Features
- Uploads both images and movies (JPG, PNG, GIF, AVI, MOV, 3GP files)
- Personnaly I avoid PNG files which do not support EXIF info
- Multiple loadings in parallel is available (check -p option)
- Stores image information locally using a simple SQLite database
- Creates Flickr 'Sets' (Albums) based on the folder name the media is in(getting existing sets from Flickr is managed also)
- Ignores unwanted directories (like '.picasabackup' for Picasa users or'@eaDir' for Synology NAS users) and you can easily add/configure moreyourself. Check uploadr.ini config file.
- Allows specific files to be ignored (via regular expressions)
- Skips files that are over a configurable size (max flickr size is about 900MB)
- Reuploads modified images as well as Videos (via delete/upload).
- Automatically removes images from Flickr when they are removed from yourlocal hard drive
- Optionally convert RAW files (with use of external tool: exiftool by Phil Harvey).
THIS SCRIPT IS PROVIDED WITH NO WARRANTY WHATSOEVER.PLEASE REVIEW THE SOURCE CODE TO MAKE SURE IT WILL WORK FOR YOUR NEEDS.IF YOU FIND A BUG, PLEASE REPORT IT.
How it works! An example...
Sample file structure
Consider this example to explain how files are uploaded into Sets/Albums on Flickr.
If you have the following folders and pics (the name of the flickr Sets/Albums depends on the uploadr.ini file setting FULL_SET_NAME, but I normally use it as False):
Setting your source folder with FILES_DIR
And you setup FILES_DIR
You should get the following depending on how the setting FULL_SET_NAME is set:
FilePathName | Set/Album Name (FULL_SET_NAME=False) | Set/Album Name (FULL_SET_NAME=True) | Pic | Remarks |
---|---|---|---|---|
/home/user/media/pic00.jpg | media | . | pic00 | |
/home/user/media/Album1/pic01.jpg | Album1 | Album1 | pic01 | |
/home/user/media/Album2/pic02.jpg | Album2 | Album2 | pic02 | |
/home/user/media/Album3/pic03.jpg | Album3 | Album3 | pic03 | |
/home/user/media/folder/Album4/pic04.jpg | Album4 | folder/Album4 | pic04 | |
/home/user/media/folder/Album4/Sub/pic041.jpg | Sub | folder/Album4/Sub | pic041 | |
/home/user/media/newfolder/Album4/pic042.jpg | Album4 | newfolder/Album4 | pic042 | |
/home/user/media/Album5/pic01.jpg | Album5 | Album5 | pic01 | Same pic as in Album01 is loaded twice as it's part of a different Album |
/home/user/media/Album5/Sub/pic051.jpg | Sub | Album5/Sub | pic051 | With FULL_SET_NAME=False it will go into Album 'Sub' |
Requirements
- Python 2.7+ (should work on DSM from Synology (v6.1), Windows and MAC)
- Also compatile with Python 3.6 and 3.7
- Recommendation on Synology DSM: do not install/use the 'Python Module' from the DSM Packages.
- flicrkapi module. May need to install get-pip.py. (Instructions forSynology DSM below.)
- portalocker module for Windows systems. Not mandatory for Synology.
- File write access (for the token and local database)
- Flickr API key (free)
- exiftool, only if you intend to convert RAW files to JPG. Install instructions here.. Note: You need to also install the DSM Package Perl.
Setup on Synology
- Might work on other platforms like Windows also.
- Side note: don't be overwhelmed with this setup. Steps are quite straitghtforward.
- Summary steps:
- Enable SSH access to Synology DSM Server. (Optionally) install Python 3.
- Prepare a local folder location for Python modules install
- Download and install pip
- Download and install flickrapi
- Download and install flickr-uploader
1.Enable SSH access to Synology DSM Server. (Optionally) install Python 3.
- Enable and access your Synology DSM via SSH with an admin user.
- Avoid the use of root for security reasons.
- (Optionally) install via the Synology DSM Packages the 'Python 3' package (corresponds to version 3.5)
2. Prepare a local folder location for Python modules install.
- IMPORTANT NOTE: To avoid messing up with the system files.
- Create a local install destination directory/folder define and export PYTHONPATH variable (ex: for Python 2.7):
- Or, for Python 3.5:
- Create also a
dev
directory/folder to use as working area where to download/extract the files/packages prior to intstallation:
3. Download and install pip
- IMPORTANT NOTE: pip allows you to more easily install python related modules/applications.
- Download get-pip.py
- Extract to ~/dev
- And then install by running
python get-pip.py --prefix=~/apps/Python
- Follow these guidelines for PIP installation.
- IMPORTANT NOTE: Make sure to use the --prefix parameter
4. Download and install flickrapi (2.4.0)
4.1 OPTION #1 (recommended): With PIP (installed in step #3 above)
4.2 OPTION #2: Mannually
- Download flickrapi-2.4.tar.gz from PyPi.Python.Org.
- Extract to ~/dev and run
python setup.py install --prefix=~/apps/Python
- Make sure to use the --prefix parameter
5. Download and install flickr-uploader
5.1 OPTION #1 (recommended): With PIP (installed in step #3 above)
- Now available on Pypi.org for installation also via PIP.
- Installation also copies to '~/apps/Python/etc' folder the data files
uploadr.ini
anduploadr.cron
5.2 OPTION #2: Mannually to be run from local folder
- Download mannually from GitHub flickr-uploader/releases/latest.
- You can find under Assets:
- the source code packages;
- a distribution package Published on https://github.com/oPromessa/flickr-uploader/releases/latest
- Extract the contents of the elected tar file.
- You can then run it from the current folder.
- Edit the uploadr.ini as appropriate (check Configuration section)
5.3 OPTION #3: Mannually to be run from ~/apps/Python/bin
- Download mannually from GitHub flickr-uploader/releases/latest.
- You can find under Assets:
- the source code packages;
- a distribution package Published on https://github.com/oPromessa/flickr-uploader/releases/latest
- Extract the contents of the elected tar file.
- You can then run it from the current folder.
- Edit the uploadr.ini as appropriate (check Configuration section)
- Installation also copies to '~/apps/Python/etc' folder the data files
uploadr.ini
anduploadr.cron
Configuration
Go to http://www.flickr.com/services/apps/create/apply and apply for an APIkey.
- Edit the following variables in the uploadr.ini
Refer to https://www.flickr.com/services/api/upload.api.html for what eachof the upload arguments above correspond to for Flickr's API.
- Before running uploadr.py make sure you run the command below:
- To avoid running this command exerytime you log-in into your system, follow the notes on this link to edit file ~/.bashrc and place this command there.
Flickr Uploadr For Mac
- On the first run you need to authenticate the applicaiton against Flickr.
- use the
-a
option - uploadr.py will provide you a URL/link which you need to run
- use the
- Following runs can be launched unattended:
Usage/Arguments/Options
Place the file uploadr.py in any directory and run via ssh(execution privs required).It will crawl through all the files from the FILES_DIR directory and beginthe upload process.
To check what files uploadr.py would upload and delete you can run thescript with option --dry-run
:
Run ./uploadr.py --help
for up to the minute information on arguments:
Task Scheduler (cron)
On Synology systems, run with Task Scheduler (Synology/Control Panel)
- Log into your Synology system via Web interface.
- Go to Control Panel-> Task Scheduler
- Create a new 'User Defined Script'
- Adjust the run schedule settings, the email notifications
- Under 'Run Command' include a reference to the uploadr.cron file
/full/path/to/uploadr.cron
- Use sample file uploadr.cron added to the distribution and adapt to your needs.
- Synology Help Article on Task Scheduler may also be helpful.
- IMPORTANT: Do not use crontab directly. Having Task Scheduler replaces crontab.
On Linux/Unix/Mac based systems, run via crontab
- Use upload.cron added to the distribution and adapt to your needs.
- Use either 'crontab -e' or vi /etc/crontab according to your system.
Launch from the command line in Daemon mode (-d option).
- Recommendation is to use Task Scheduler or cron.
- With -d option it runs in daemon mode and checks for files every SLEEP_TIME seconds (as configured on uploadr.ini)
- It simply loads the files. It does not create Albums/Sets.
- SLEEP_TIME is only used in this case.
Recognition
Inspired by:
Makes dynamic use of the following libraries:
- https://github.com/jruere/multiprocessing-logging under GNU LESSER GENERAL PUBLIC LICENSE
Final remarks
Download Flickr Pc
You may use this code however you see fit in any form whatsoever.And enjoy!!!
Questions & Answers
Q: Who is this script designed for?
- Those people comfortable with the command line that want to backup their media on Flickr in full resolution.
Q: Why don't you use OAuth?
- I do! As of November 2017
Q: Are you a python ninja?
- No, sorry. I just picked up the language to write this script because python can easily be installed on a Synology Diskstation.
Q: Is this script feature complete and fully tested?
- Nope. It's a work in progress. I've tested it as needed for my needs, but it's possible to build additional features by contributing to the script.
- Have a few starsand feedback that it is being used by several people.
Q: Do I need to install the 'Python Module' from DSM Installation Package?
- No.
- The standard out-of-the-box python 2.7 installed with Synology (on versions up to DSM 6.2 a the time of writing this) is more than enough.
- In fact,in one particular report I received, this package was causing several conflicts so, please, don't install it.
Q: How to automate it with a Synology NAS ?
- First you will need to run script at least one time in a ssh client to get the token file.Refer to the 'Task Scheduler (cron)' section above.Then with DSM 6.1, create an automate task, make it run once a day for example, and put this in the textbox without quotes 'path_to_your_python_program path_to_your_script'. For example, assuming you installed Python package from Synocommunity, command should look like '/usr/local/python/bin/python /volume1/script/flickr-uploader/uploadr.py'.
Q: What if I have different folders to sync?
- the standard mode of operation should be to sync always the same main folder structure with all your subfolder/pics.
- syncing different folders on each run does work and uploads new pics; but uploadr was not originally designed for that.
- What happens to previously loaded pics depends if they still exist and Uploadr can still find them (depending if FILES_DIR was set as an absolute folder or relative folder path)
- File to upload: /home/user/media/2014/05/05/photo.jpg
- FULL_SET_NAME:
- False: 05
- True: 2014/05/05
- What happens to previously loaded pics depends if they still exist and Uploadr can still find them (depending if FILES_DIR was set as an absolute folder or relative folder path)
- Uploadr saves the (full or relative depending on FILES_DIR) path name for the pics loaded. So, event though you provide a new origin folder, if the previously loaded pics still exist on their original locations, they are not deleted. If they are deleted from such original location or uploadr has no access to them, then they will be deleted from flickr.
- If using relative FILES_DIR and two files exist on the same subfolder, it will not be re-uploaded.
- So, in a nutshell, too many issues if you play around changing the FILES_DIR location.
Q: 'my understanding is that this is a sync script, which means when I later delete a pic from a synced folder, it will get deleted from Flickr'
- Yes a file removed locally will be deleted from Flickr.
- Remark: I'm assuming in between each run you keep the contents of the flickrdb control database and do not remove it.
Q: 'What about previously existing folders (they didn't seem to get deleted)'
- If all files from a folder (and corresponding Album on flickr) are deleted, then the actual Album will be also eliminated. Again, if you do not chnage the FILES_DIR in between runs.
Q: What about when I sync a folder with the same name of a previously existing folder? (you mentiongetting existing sets from Flickr is managed also
- hmmm... if you mean 'sync a folder' via setting FILES_DIR... it would depend if you use full or relative pathname on FILES_DIR. Check the section 'Clarification' above. It will delete the files he cannot find locally.
- hmmm... if you mean two subfolders with the same name, to which Set/Album will be added depends on the setting FULL_SET_NAME. Check the section 'Clarification' above for example pic042.
Q: What about when I run the script on ~/pictures/parent_folder/folder_A and then later on ~/pictures/parentfolder will the script recongize the folder_A within parentfolder as being the one it uploaded before becaues its content will have matching checksums?
- Again it depends on FULL_SET_NAME setting and FILE_DIR being an absolute or relative path and the match is initially done by full pathname + filename. So, in your example ~/pictures will expand to a full path so it would recognize the same files and not upload them again.
Q: I thought I read a mention of checksum as a way to detect file modification: what about the same file in 2 different folders, is it then upoad each time (in a set with the folder name) or only once?
- same file on two folders loads up twice. Check example above with Album5/pic02.jpg
Q: How to read the final report:
- Initial Found Files: Number of files found for processing.
- Bad Files:
- Files which failed to load previously due to Flickr error 5 ('type not recognized') or 8 ('file to large')
- Check explanation on '-b' and '-c' options.
- The remark 'some Bad files may no longer exist!' indicates that previously recorded badfiles may already been deleted from the local filesystem. Check possible use of '-c' option.
- Bad Files:
- Photos count:
- Local: Number of local pics found.
- Flickr: Number of pics indicated by Flickr (may be off by 1 immediately after upload due to Flickr refres)
- Flickr-Local: Difference of Flickr to Local pics (for easier reading/tracking)
- Not in sets on Flickr: Indicates just that. It may indicate errors if it is bigger than 0, as all uploaded pics by uploadr should be on an Album. What I do normally, is to delete such pics from Flickr directly from the flickr/organize interface. But I've seen other users which have other tools uploading pics to Flickr to ignore this number.
- Initial Found Files: Number of files found for processing.
Q: What happens if the local control Database (flickrdb) is deleted?
- By re-running the program without the -u opiotn it will go thru your local files and check/search for already loaded pics with same checksum+Set and re-builds the local database.
Q: Is all sensitive information (albums and filenames) masked with the -u option?
- Please note the -u masking option does not filter every sensitive information. In particular when DEBUG error level is set.
Release historyRelease notifications | RSS feed
2.8.7
2.8.7a1 pre-release
2.8.6
2.8.6a9 pre-release
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size flickr_uploader-2.8.7-py2.py3-none-any.whl (73.0 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes |
Filename, size flickr-uploader-2.8.7.tar.gz (74.9 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for flickr_uploader-2.8.7-py2.py3-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | 43be75c65af2eeebd7fe881f17afbc7373ea1a6dd610ca899fca88795155317b |
MD5 | 7b009f2cb8b57dfdd3f9a074626c2045 |
BLAKE2-256 | 54dfc7f499cff4aaff82b7a617ad10cd117edc7e1e3f723627aac31f72ff873f |
Hashes for flickr-uploader-2.8.7.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | ef678ce11c9ae0da20cc9b4702b0a089a2a9d248389cd70bbe590195917c490f |
MD5 | 90d735a50667e7097f501cd44d5e63d3 |
BLAKE2-256 | 01bd935b85e2bc0104792f04b1a6412e0c0cde0c40b7d5de1596f3b9198e63b8 |
Over the past 8 years, you’ve made Flickr your home for more than 7 billion photos. We here at Flickr HQ are constantly amazed by the places you’ve been, the moments you capture, and the millions of stories that are told through your images every day. Today, we’re excited to announce a new feature that will make it even easier and faster for you to upload your photos and share them with the people who matter to you. Introducing the new Flickr Uploadr!
Here’s a peek at some of the new features:
Easily preview and arrange your photos
We’re utilizing some advanced HTML 5 browser technology to bring you a completely new uploading experience on Flickr. You can now add photos by dragging them into the browser. We also show preview thumbnails, where supported, so you can use the intuitive drag and drop interface to manage and reorder photos before they hit your photostream. You can also easily zoom, rotate or sort your photos by title.
Share the story behind your photo
We’ve made it even easier for you to add titles, descriptions and tags, and you can organize your photos into sets like Death Valley 2012 or Beards of my Life. You can now also tag your friends in photos and change licensing, content type and other advanced options right from the uploadr page before publishing to your photostream. So go ahead and tell everyone about your photos!
Faster is better
You may also notice a huge improvement to our upload speeds – between 20-30% faster on average, and up to 50-60% faster for some of our international users.
File sizes: now more bigger!
You asked for it, and we’ve delivered. We increased the file size limits for our Pro users up to 50MB and for our free users up to 30MB. That’s huge! Now you can easily save high-resolution images to Flickr and see your photos in pixel-perfect detail.
Flickr Uploadr 3.2.1
And even more
But wait, there’s more! We’re still hard at work on even more features for the Flickr Uploadr. Check back often to see what else we have in store for you and keep letting us know what you think of the new Flickr.
We’ll be rolling out this feature to our users over the next couple weeks, so don’t worry if you don’t have it yet – it will be your Upload experience by default soon. For more information check out our handy list of FAQs, and please let us know if you have any bugs or feedback to share with us. If you’re interested in the technical bits of how we made the Uploadr work, also check out this awesome post on the Flickr code blog.
Flickr Uploader For Windows
*Currently, we are supporting versions of Chrome 6, Safari 5, Firefox 8 and up.