vortirb.blogg.se

Node flickr gallery
Node flickr gallery









node flickr gallery
  1. Node flickr gallery code#
  2. Node flickr gallery download#

Once it's done, you should have a local mirror of all your Flickr data. Run through the authentication procedure, and then just wait for it to finish. If you just want to immediately downsync all your data right now, simply use the test.js application with the -downsync runtime argument: add your Flickr API key information to the. Downloading shortcut: one-step downsyncing userdata/me/ directory that contains the images and ia dirs with your personal data. data for the flickr API information, but also a.

Opinionsįor me it has been a really good learning experience, especially considering the fact that it was a good scenario to use asynchronous code dealing with several parallel Http requests.Īs I still consider it a learning experience I would really love you (probably more experienced than me with Node.js) to give some opinions, critics, new (flickrOptions, flickrapi.downsync("userdata/me")) Again, more precise informations are included in the official documentation. It’s a small side project anyway so I don’t expect to put so much effort on it again unless it gets adopted by a relevant number of people (which, quite frankly, is really unlikely to happen).īeing an open source project I obviously tried to put in place all the basic infrastructure (tests, code standards, repository, versioning, etc.) to make it easy for other people to work on improving it. It’s to be considered ALPHA quality and I expect it to be fully of bugs and uncovered edge cases. The project has been developed in a weekend as a “learning project” and tested just by me on few Flickr galleries. If you’re interested on using it I suggest you to read the official documentation on GitHub, but it should be quite easy to understand and use it if you are a developer (and it’s not meant to be used by other people who are comfortable with the command line!) Current status You can find out how I implemented this specific logic on GitHub. Thanks to the Async.parallelLimit() function it’s even possible to run the tasks with a configurable concurrency level. Then I just needed to replicate this task for every photo and run all of them in parallel. Thanks to Async it was very easy to create a task function that figured out the specific URL of a given photo and then downloads it into a file. The first API call is the starting point and then, since you now have all the IDs, you can make all the other requests in parallel.

Once you got the URL you can simply use that to download a photo into your local drive. This method gives you all the URLs to download all the different sizes of a given photo. Then, to find out the URL of every photo you need to call the API method. To download a photo from Flickr, starting from a gallery, you need to make several API calls before you have the right URL to download the photo.įirst of all you need to call the API method to find out the IDs of all the photos in the set. Going asynchronous and execute requests in parallel

  • Gemnasium: service that checks your dependencies and alerts you if they get out of date.
  • Coveralls: service to keep track of the coverage changes after every new commit.
  • Travis CI: continous integration service.
  • Nock: amazing module to “mock” the Http requests and avoid to hit Flickr servers in my tests.
  • Mocha and Chai: test runner and assertion frameworks for the unit testing.
  • JSCS: to check the code standard I adopted.
  • Async: to manage all the asynchronous tasks in parallel and with a configurable level of concurrency (one of the features that in my humble opinion makes node/javascript stand out from the crowd of the interpreted programming languages).
  • Request: to simplify the creation of the Http request to call the Flickr APIs.
  • Commander, Cli and Prompt for the command line facilities (Options/Arguments parsing, help generation, progress bar, receiving input from the user).
  • As part of my learning process, I tried to not reinvent the wheel and to follow ” the Node way” so I used some very good modules as the foundation to build this app: How it’s built?Īs I said it’s built using Node.js. Given that I am currently getting into deep of Node.js this was the perfect chance to develop something practical.

    node flickr gallery

    I also wasn’t able, after a quick search, to find something simple to solve this task. To be honest I had myself the need to download a large set of photos (more than 400 photos) from Flickr and I didn’t wanted to do it manually. I recently developed a small command line app that allows you to download an entire gallery from Flickr, it’s called flickr-set-get and you can find it on NPM and GitHub. #javascript, #http, #node-js, #api, #flickr comments











    Node flickr gallery