-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
37 lines (26 loc) · 1007 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { log, err } = require('./log');
const { getAlbums, getPhotosOfAlbum, filterBlacklist } = require('./flickr');
const blacklist = require('./blacklist');
const chalk = require('chalk');
const runner = async () => {
log('starting processing');
// request flickr for available albums
const albums = await getAlbums();
log(`Gefundene Collections <${albums.length}>`);
// filter against album blacklist
const filteredAlbums = filterBlacklist(albums);
log(`Abgeglichen mit Blacklist <${filteredAlbums.length}>`);
await albums.slice(0, 2).forEach(async a => {
log(`Album: ${chalk.yellow(a.slug)}`);
// request image metadata per album
const photos = await getPhotosOfAlbum(a.id);
console.log(photos);
});
};
runner();
// download image
// select where to store image
// a) all images go to google
// b) if an imgage contains a certain tag it also goes to a local folder
// transform images in local folder to smaller and more efficient ones
// upload to scaleway