├── _config.yml ├── public ├── galleria │ ├── themes │ │ ├── fullscreen │ │ │ ├── index.html │ │ │ ├── b.png │ │ │ ├── i.png │ │ │ ├── l.gif │ │ │ ├── n.gif │ │ │ ├── p.gif │ │ │ ├── r.gif │ │ │ ├── down.gif │ │ │ ├── fix.gif │ │ │ ├── up.gif │ │ │ ├── l-neg.png │ │ │ ├── loader.gif │ │ │ ├── n-neg.png │ │ │ ├── p-neg.png │ │ │ ├── r-neg.png │ │ │ ├── up-neg.gif │ │ │ ├── down-neg.gif │ │ │ ├── galleria.fullscreen.min.js │ │ │ ├── galleria.fullscreen.min.css │ │ │ ├── galleria.fullscreen.js │ │ │ ├── fullscreen-demo.html │ │ │ ├── fullscreen-demo-cdn.html │ │ │ └── galleria.fullscreen.css │ │ └── classic │ │ │ ├── classic-map.png │ │ │ ├── classic-loader.gif │ │ │ ├── galleria.classic.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).min.js │ │ │ ├── galleria.classic.min.js │ │ │ ├── galleria.classic.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).js │ │ │ ├── galleria.classic.js │ │ │ ├── galleria.classic.min.css │ │ │ ├── galleria.classic.css │ │ │ ├── classic-demo-cdn.html │ │ │ ├── classic-demo.html │ │ │ └── classic-demo-cdn (SFConflict me@a1b0n.com 2017-02-12-23-35-56).html │ └── plugins │ │ ├── flickr │ │ ├── loader.gif │ │ ├── flickr-loader.gif │ │ ├── flickr-demo.html │ │ ├── galleria.flickr.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).min.js │ │ ├── galleria.flickr.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).js │ │ ├── galleria.flickr.min.js │ │ └── galleria.flickr.js │ │ ├── picasa │ │ ├── loader.gif │ │ ├── picasa-demo.html │ │ ├── galleria.picasa.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).min.js │ │ ├── galleria.picasa.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).js │ │ ├── galleria.picasa.min.js │ │ └── galleria.picasa.js │ │ └── history │ │ ├── galleria.history.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).min.js │ │ ├── galleria.history.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).js │ │ ├── galleria.history.min.js │ │ ├── galleria.history.js │ │ └── history-demo.html ├── stylesheets │ ├── style.css │ └── gallery.css └── javascripts │ └── gallery.js ├── views ├── index.hbs ├── error.hbs ├── layout.hbs └── gallery.hbs ├── photos.zip ├── .gitignore ├── routes ├── users.js └── index.js ├── config.js ├── property_group_template.js ├── redismodel.js ├── package.json ├── testprops.js ├── addpeoplescript.js ├── app.js ├── bin └── www ├── taggingscript.js ├── gallery_controller.js ├── scaledownimgscript.js ├── azureservices.js ├── dbxservices.js └── LICENSE /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/index.hbs: -------------------------------------------------------------------------------- 1 |

{{title}}

2 |

Welcome to {{title}}

3 | -------------------------------------------------------------------------------- /photos.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/photos.zip -------------------------------------------------------------------------------- /views/error.hbs: -------------------------------------------------------------------------------- 1 |

{{message}}

2 |

{{error.status}}

3 |
{{error.stack}}
4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node build artifacts 2 | node_modules 3 | npm-debug.log 4 | 5 | # Local development 6 | *.env 7 | package-lock.json -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/b.png -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/i.png -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/l.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/n.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/n.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/p.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/p.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/r.gif -------------------------------------------------------------------------------- /public/galleria/plugins/flickr/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/plugins/flickr/loader.gif -------------------------------------------------------------------------------- /public/galleria/plugins/picasa/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/plugins/picasa/loader.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/down.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/fix.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/fix.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/up.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/l-neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/l-neg.png -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/loader.gif -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/n-neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/n-neg.png -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/p-neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/p-neg.png -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/r-neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/r-neg.png -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/up-neg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/up-neg.gif -------------------------------------------------------------------------------- /public/galleria/themes/classic/classic-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/classic/classic-map.png -------------------------------------------------------------------------------- /public/galleria/themes/fullscreen/down-neg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/fullscreen/down-neg.gif -------------------------------------------------------------------------------- /public/galleria/plugins/flickr/flickr-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/plugins/flickr/flickr-loader.gif -------------------------------------------------------------------------------- /public/galleria/themes/classic/classic-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/gallerywithtagstutorial/master/public/galleria/themes/classic/classic-loader.gif -------------------------------------------------------------------------------- /public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /views/layout.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{title}} 5 | 6 | 7 | 8 | {{{body}}} 9 | 10 | 11 | -------------------------------------------------------------------------------- /routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | DROPBOX_PHOTOS_FOLDER:'/photos', 3 | DROPBOX_LIST_FOLDER_LIMIT: 5, 4 | AZURE_LOCATION:'westcentralus', 5 | AZURE_FACE_ROUTE:'api.cognitive.microsoft.com/face/v1.0', 6 | AZURE_PERSON_GROUP_ID:'dbx-photo-tags', 7 | AZURE_PERSON_GROUP_DESC:'Dropbox images', 8 | } -------------------------------------------------------------------------------- /property_group_template.js: -------------------------------------------------------------------------------- 1 | module.exports.property_group_template = { 2 | name: "tags", 3 | description:"Picture tags", 4 | fields: [ 5 | {"name":"person0" , "description":"first person tagged", "type":"string"}, 6 | {"name":"person1" , "description":"second person tagged", "type":"string"}, 7 | {"name":"person2" , "description":"third person tagged", "type":"string"}, 8 | {"name":"person3" , "description":"fourth person tagged", "type":"string"}, 9 | {"name":"person4" , "description":"fifth person tagged", "type":"string"} 10 | ] 11 | } -------------------------------------------------------------------------------- /redismodel.js: -------------------------------------------------------------------------------- 1 | const 2 | util = require('util'), 3 | redis = require('redis'); 4 | 5 | module.exports.KEY_DBX_GALLERY_CURSOR = 'dbx_gallery_cursor', 6 | module.exports.KEY_DBX_GALLERY_HAS_MORE = 'dbx_gallery_has_more', 7 | module.exports.KEY_DBX_SEARCH_CURSOR = 'dbx_search_cursor', 8 | module.exports.KEY_LAST_MODIFIED_TIMESTAMP = 'last_modified_timestamp', 9 | module.exports.PREFIX_PERSONID = 'personId:'; 10 | 11 | client = redis.createClient(); 12 | module.exports.setAsync = util.promisify(client.set).bind(client); 13 | module.exports.getAsync = util.promisify(client.get).bind(client); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tagmyphotosblog", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.17.1", 10 | "cookie-parser": "~1.4.3", 11 | "debug": "~2.6.3", 12 | "dotenv": "^6.0.0", 13 | "dropbox": "^4.0.9", 14 | "express": "~4.15.2", 15 | "hbs": "~4.0.1", 16 | "isomorphic-fetch": "^2.2.1", 17 | "morgan": "~1.8.1", 18 | "redis": "^2.8.0", 19 | "request": "^2.88.0", 20 | "request-promise": "^4.2.2", 21 | "serve-favicon": "~2.4.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | const gallery_controller = require('../gallery_controller'); 4 | 5 | //Gets an html page with a subset of all the pictures in a folder 6 | router.get('/gallery', gallery_controller.gallery); 7 | 8 | //Gets an array with the next subset of pictures for a folder 9 | router.get('/gallery/continue', gallery_controller.gallery_continue); 10 | 11 | //Gets an html page with a subset of pictures of a search 12 | router.get('/gallery/search', gallery_controller.search); 13 | 14 | //Gets an array with the next subset of pictures of a previous search 15 | router.get('/gallery/search/continue', gallery_controller.search_continue); 16 | 17 | module.exports = router; 18 | -------------------------------------------------------------------------------- /public/stylesheets/gallery.css: -------------------------------------------------------------------------------- 1 | .galleria{ 2 | max-width: 100%; 3 | min-height: 700px; 4 | height: 500px; 5 | margin: 0 auto; 6 | } 7 | 8 | .topnav { 9 | overflow: hidden; 10 | background-color: #e9e9e9; 11 | } 12 | 13 | .topnav .search-container { 14 | float: right; 15 | } 16 | 17 | .topnav input[type=text] { 18 | padding: 6px; 19 | margin-top: 8px; 20 | margin-bottom: 8px; 21 | font-size: 17px; 22 | border: none; 23 | } 24 | 25 | .topnav span { 26 | float: left; 27 | display: block; 28 | color: black; 29 | text-align: center; 30 | padding: 14px 16px; 31 | text-decoration: none; 32 | font-size: 17px; 33 | } 34 | 35 | .topnav .search-container button { 36 | float: right; 37 | padding: 6px 10px; 38 | margin-top: 8px; 39 | margin-right: 16px; 40 | background: #ddd; 41 | font-size: 17px; 42 | border: none; 43 | cursor: pointer; 44 | } 45 | 46 | .topnav .search-container button:hover { 47 | background: #ccc; 48 | } -------------------------------------------------------------------------------- /public/galleria/plugins/history/galleria.history.min (SFConflict me@a1b0n.com 2017-02-12-23-35-56).min.js: -------------------------------------------------------------------------------- 1 | !function(a,b){Galleria.requires(1.25,"The History Plugin requires Galleria version 1.2.5 or later."),Galleria.History=function(){var c,d=[],e=!1,f=b.location,g=b.document,h=Galleria.IE,i="onhashchange"in b&&(void 0===g.mode||g.mode>7),j=function(a){return a=c&&!i&&Galleria.IE?a||c.location:f,parseInt(a.hash.substr(2),10)},k=j(f),l=[],m=function(){a.each(l,function(a,c){c.call(b,j())})},n=function(){a.each(d,function(a,b){b()}),e=!0},o=function(a){return"/"+a};return i&&h<8&&(i=!1),i?n():a(function(){b.setInterval(function(){var a=j();isNaN(a)||a==k||(k=a,f.hash=o(a),m())},50);h?a('