项目作者: tagspaces

项目描述 :
Organizing the flickr export
高级语言: JavaScript
项目地址: git://github.com/tagspaces/flickr-export-organizer.git
创建时间: 2019-01-11T10:34:49Z
项目社区:https://github.com/tagspaces/flickr-export-organizer

开源协议:MIT License

下载


Flickr Export Organizer

This script will organize the files exported from the Flickr service in folders, trying to extract tags and other meta data.

Motivation

According to a recent announcement from Flickr, the users with the free account will lose most of their photos if they don’t update to a paid plan. Thankfully Flickr is providing a way to export all of your photos and videos together with some meta data including useful things such as tags and albums. So we decided to write a small script which purpose is sorting the files by folders and extracting that meta data in a format, which can be later recognized by our open source file management software TagSpaces. The script iterates through all the media files in the export folder and copies the found files in folders. If file is part of album, a folder with the album’s name is create and the file is copied there. If this is not the case the script create a folder, which name corresponds to the date when the image was taken, and copies it there.

Prerequirements

  • Node.js - you will need a running Node.js environment, which can be easily achieved on Windows, macOS or Linux by just installing Node.js from https://nodejs.org/en/#download

  • Your Flickr Data - You have to request and download your Flickr data, as shown in following screenshot.

    • Login to Flickr via the web
    • Click on the profile avatar and then select Settings
    • Go to “Your Flickr Data” area and request your files by clicking the “Request my Flickr data”.
    • After a while the data is prepared and you have to download all the zip-files locally.

How to export Flickr data

Installation and running

  • Create a folder where the script will run.

  • Download the last version of the script directly from here or from the release section of this project.

  • Extract all files from all the zip exports in a sub folder called flickerData.

  • Under Windows you can right click on export-organizer.js and choose Open With… (path_to_nodejs\node.exe)

  • Alternatively you can run the script in a Windows, Linux or macOS terminal like this:

  1. node export-organizer.js

Resulting structure

The folder structure before running the script should look like this:

  1. ~ your working folder
  2. ├── flickrData
  3. ├── img_4376_2723423425_o.jpg - image part of Album1
  4. ├── photo_2723423425_o.json
  5. ├── img_20180823_2723427625_o.jpg - image taken on 2018-08-23
  6. ├── photo_2723427625_o.json
  7. ├── ... - other media files
  8. ├── albums.json
  9. └── ... - other profile json files
  10. └── export-organizer.js

After running the script, you will have the following folder structure:

  1. ~ your working folder
  2. ├── flickrData
  3. ├── img_4376_2723423425_o.jpg - image part of Album1
  4. ├── photo_2723423425_o.json
  5. ├── img_20180823_2723427625_o.jpg - image taken on 2018-08-23
  6. ├── photo_2723427625_o.json
  7. ├── ... - other media file
  8. ├── albums.json - file containing your albums
  9. └── ... - other profile json files
  10. ├── flickrExport
  11. | ├── Album1
  12. | | ├── .ts
  13. | | | ├── img_4376.jpg.json
  14. | | | └── ... other TagSpaces meta data files
  15. | | ├── img_4376.jpg
  16. | | └── ... other media files
  17. | └── 20180823
  18. | ├── .ts
  19. | | ├── img_20180823.jpg.json
  20. | | └── ... other TagSpaces meta data files
  21. | ├── img_4376.jpg
  22. | └── ... other media files
  23. └── ... - other profile json files
  24. └── export-organizer.js

Managing your files with TagSpaces

After the files are organized, you can create a new location in TagSpaces pointing to the flickrExport folder and open it. Now you will be able to navigate your photos in TagSpaces by albums and see the tags you gave to your media files.

TagSpaces showing exported files from Flickr with metadata

Your don’t need of course TagSpaces for just browsing your photos by folders, but if you have spend some time organizing your photos with tags, descriptions and comments, TagSpaces might be helpful.

Licensing

This script is published under the MIT license.