remove old stuff

This commit is contained in:
Cédric Leporcq 2021-10-24 19:28:51 +02:00
parent 38d7cb6841
commit 4184d753ac
27 changed files with 0 additions and 8401 deletions

View File

@ -1,54 +0,0 @@
# Hello, I'm Elodie's GUI
~~ *Your Personal EXIF-based Photo, Video and Audio Assistant* ~~
<p align="center"><img src ="../../../blob/master/creative/logo@300x.png" /></p>
You can download [my latest GUI from the releases page](https://github.com/jmathai/elodie/releases).
My GUI taskbar app sits nestled away in your taskbar until you need me.
Let's say you took a few hundred photos in New York City. I'll have put the photos into a folder named *New York City*. You decide you'd rather organize those photos into a folder named *Summer in NYC*. What you'd do is select the photos using Finder and drag them onto my taskbar icon. I'll display a few options and one of them would be to *Create album*. Type in an album name and I'll add this to the EXIF of your photos and move them to a folder with the same name.
*NOTE: I've extensively used the GUI but it's a work in progress.*
## See me in action
Updating EXIF of photos using the GUI taskbar app.
[![IMAGE ALT TEXT](http://img.youtube.com/vi/fF_jGCaMog0/0.jpg)](http://www.youtube.com/watch?v=fF_jGCaMog0 "Updating Photos Using GUI Taskbar App")
## Building the app
You'll need to bundle up the python dependencies and create an electron app using Node.js.
### Bundling the python libraries
First you'll need to [install the python dependencies](../../../#install-everything-you-need).
Once you've done that you'll need to install `pyinstaller`.
```
pip install pyinstaller
```
Next you can `cd` to the root of the repository and run `pyinstaller`.
```
pyinstaller elodie.spec
```
This should create a `dist` folder that bundles all of the dependencies. Now you're ready to build the GUI app.
### Building the GUI app
The GUI app is written using [Node.js](https://github.com/nodejs) and [Electron](https://github.com/atom/electron) and you'll need [electron-packager](https://github.com/maxogden/electron-packager) to create an executable file for your operating system.
I'm going to assume you've got *Node.js* installed. I've successfully built the app using version `5.1.0` on OS X.
```
# use --platform=win32 for Windows or --platform=linux for linux
electron-packager . Elodie --platform=darwin --arch=x64 --version=0.34.2 --overwrite
```
This will create a folder named `Elodie-darwin-x64` which contains the executable. Running the executable should add my face to your taskbar which you can click on or drag photos over.

View File

@ -1,6 +0,0 @@
<html>
<head></head>
<body>
<div style="width:100%; height:100%; background-color:#fff;"></div>
</body>
</html>

View File

@ -1,34 +0,0 @@
<html>
<head>
<script src="js/handlers.js"></script>
<link href='https://fonts.googleapis.com/css?family=Lato:400,100,300,100italic,300italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css"></script>
<link rel="stylesheet" href="css/boilerplate.css"></script>
<link rel="stylesheet" href="css/styles.css"></script>
<link rel="stylesheet" href="css/fontello/css/animation.css"></script>
<link rel="stylesheet" href="css/fontello/css/elodie.css"></script>
</head>
<body>
<div class="titlebar">
<!--<a href="" class="left quit quitProgram"><i class="icon-cancel-circle"></i></a>
<a href="" class="left minus minimizeProgram"><i class="icon-minus-circle"></i></a>-->
How can I help you? <em>-- Elodie</em><i></i>
</div>
<form class="updateConfig" action="" method="post">
<div class="content">
<p>
Doesn't look like you have a MapQuest API key. Get one for free <a href="#" class="launchUrl" data-url="https://developer.mapquest.com/plan_purchase/steps/business_edition/business_edition_free">here</a>.
</p>
<div class="location">
<label for="mapquest-api-key-field"><i class="icon-map"></i>MapQuest API Key</label>
<input id="mapquest-api-key-field" type="text" placeholder="i.e. pzjNKTtTjLydLtxUBwdgKAIC8OQbGLUy">
<button type="submit" class="push">Get Started<i></i></button>
</div>
</div>
</form>
<script>
document.getElementById('location-field').focus();
</script>
</body>
</html>

View File

@ -1,293 +0,0 @@
/*
* HTML5 Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
*
* ==|== normalize ==========================================================
*/
/* =============================================================================
HTML5 display definitions
========================================================================== */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; }
/* =============================================================================
Base
========================================================================== */
/*
* 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
* 2. Force vertical scrollbar in non-IE
* 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
*/
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body { margin: 0; font-size: 13px; line-height: 1.231; }
body, button, input, select, textarea { font-family: sans-serif; color: #222; }
/*
* Remove text-shadow in selection highlight: h5bp.com/i
* These selection declarations have to be separate
* Also: hot pink! (or customize the background color to match your design)
*/
::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
::selection { background: #fe57a1; color: #fff; text-shadow: none; }
/* =============================================================================
Links
========================================================================== */
a { color: #00e; }
a:visited { color: #551a8b; }
a:hover { color: #06e; }
a:focus { outline: thin dotted; }
/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
a:hover, a:active { outline: 0; }
/* =============================================================================
Typography
========================================================================== */
abbr[title] { border-bottom: 1px dotted; }
b, strong { font-weight: bold; }
blockquote { margin: 1em 40px; }
dfn { font-style: italic; }
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
ins { background: #ff9; color: #000; text-decoration: none; }
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
/* Redeclare monospace font family: h5bp.com/j */
pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; }
/* Improve readability of pre-formatted text in all browsers */
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
q { quotes: none; }
q:before, q:after { content: ""; content: none; }
small { font-size: 85%; }
/* Position subscript and superscript content without affecting line-height: h5bp.com/k */
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
/* =============================================================================
Lists
========================================================================== */
ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
dd { margin: 0 0 0 40px; }
nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
/* =============================================================================
Embedded content
========================================================================== */
/*
* 1. Improve image quality when scaled in IE7: h5bp.com/d
* 2. Remove the gap between images and borders on image containers: h5bp.com/e
*/
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
/*
* Correct overflow not hidden in IE9
*/
svg:not(:root) { overflow: hidden; }
/* =============================================================================
Figures
========================================================================== */
figure { margin: 0; }
/* =============================================================================
Forms
========================================================================== */
form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }
/* Indicate that 'label' will shift focus to the associated form element */
label { cursor: pointer; }
/*
* 1. Correct color not inheriting in IE6/7/8/9
* 2. Correct alignment displayed oddly in IE6/7
*/
legend { border: 0; *margin-left: -7px; padding: 0; }
/*
* 1. Correct font-size not inheriting in all browsers
* 2. Remove margins in FF3/4 S5 Chrome
* 3. Define consistent vertical alignment display in all browsers
*/
button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
/*
* 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
* 2. Correct inner spacing displayed oddly in IE6/7
*/
button, input { line-height: normal; *overflow: visible; }
/*
* Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
*/
table button, table input { *overflow: auto; }
/*
* 1. Display hand cursor for clickable form elements
* 2. Allow styling of clickable form elements in iOS
*/
button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
/*
* Consistent box sizing and appearance
*/
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; }
input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
/*
* Remove inner padding and border in FF3/4: h5bp.com/l
*/
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
/*
* 1. Remove default vertical scrollbar in IE6/7/8/9
* 2. Allow only vertical resizing
*/
textarea { overflow: auto; vertical-align: top; resize: vertical; }
/* Colors for form validity */
input:valid, textarea:valid { }
input:invalid, textarea:invalid { background-color: #f0dddd; }
/* =============================================================================
Tables
========================================================================== */
table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }
/* ==|== primary styles =====================================================
Author:
========================================================================== */
/* ==|== media queries ======================================================
PLACEHOLDER Media Queries for Responsive Design.
These override the primary ('mobile first') styles
Modify as content requires.
========================================================================== */
@media only screen and (min-width: 480px) {
/* Style adjustments for viewports 480px and over go here */
}
@media only screen and (min-width: 768px) {
/* Style adjustments for viewports 768px and over go here */
}
/* ==|== non-semantic helper classes ========================================
Please define your styles before this section.
========================================================================== */
/* For image replacement */
.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; }
.ir br { display: none; }
/* Hide from both screenreaders and browsers: h5bp.com/u */
.hidden { display: none !important; visibility: hidden; }
/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }
/* Contain floats: h5bp.com/q */
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
/* ==|== print styles =======================================================
Print styles.
Inlined to avoid required HTTP connection: h5bp.com/r
========================================================================== */
@media print {
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
a, a:visited { text-decoration: underline; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* h5bp.com/t */
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
}

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
Font license info
## Fontelico
Copyright (C) 2012 by Fontello project
Author: Crowdsourced, for Fontello project
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://fontello.com
## Modern Pictograms
Copyright (c) 2012 by John Caserta. All rights reserved.
Author: John Caserta
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://thedesignoffice.org/project/modern-pictograms/
## Typicons
(c) Stephen Hutchings 2012
Author: Stephen Hutchings
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://typicons.com/

View File

@ -1,88 +0,0 @@
{
"name": "elodie",
"css_prefix_text": "icon-",
"css_use_suffix": false,
"hinting": true,
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "c64623255a4a7c72436b199b05296c4f",
"css": "happy",
"code": 59392,
"src": "fontelico"
},
{
"uid": "53ed8570225581269cd7eff5795e8bea",
"css": "unhappy",
"code": 59396,
"src": "fontelico"
},
{
"uid": "f0c301ac841dafc38d8eb1b933fc73e5",
"css": "spin",
"code": 59393,
"src": "fontelico"
},
{
"uid": "0f99ab40ab0b4d64a74f2d0deeb03e42",
"css": "video",
"code": 59397,
"src": "fontawesome"
},
{
"uid": "b091a8bd0fdade174951f17d936f51e4",
"css": "folder-closed",
"code": 59402,
"src": "fontawesome"
},
{
"uid": "6533bdc16ab201eb3f3b27ce989cab33",
"css": "folder-open",
"code": 59401,
"src": "fontawesome"
},
{
"uid": "c5845105a87df2ee1999826d90622f6a",
"css": "title",
"code": 59399,
"src": "fontawesome"
},
{
"uid": "87d337fee4866c2c28f6082994ce0f41",
"css": "map",
"code": 59395,
"src": "typicons"
},
{
"uid": "bd517dbd6ccbc464f6d80efca97abb7d",
"css": "media-add",
"code": 59400,
"src": "typicons"
},
{
"uid": "dplw5xo88mzzr7b45nvjcamyyhni6drs",
"css": "book",
"code": 59394,
"src": "modernpics"
},
{
"uid": "64abb7c56aefca89046bb69f7251d2e2",
"css": "calendar",
"code": 59398,
"src": "elusive"
},
{
"uid": "15739f3032c2aa3df67efc96b3ffef56",
"css": "cancel-circle",
"code": 59403,
"src": "websymbols"
},
{
"uid": "994eaa764b3f30721f3839c64c390ce3",
"css": "minus-circle",
"code": 59404,
"src": "websymbols"
}
]
}

View File

@ -1,85 +0,0 @@
/*
Animation example, for spinners
*/
.animate-spin {
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
-webkit-animation: spin 2s infinite linear;
animation: spin 2s infinite linear;
display: inline-block;
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-webkit-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-o-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-ms-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}

View File

@ -1,40 +0,0 @@
{
"name": "elodie",
"css_prefix_text": "icon-",
"css_use_suffix": false,
"hinting": true,
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "c64623255a4a7c72436b199b05296c4f",
"css": "happy",
"code": 59392,
"src": "fontelico"
},
{
"uid": "53ed8570225581269cd7eff5795e8bea",
"css": "emo-unhappy",
"code": 59396,
"src": "fontelico"
},
{
"uid": "f0c301ac841dafc38d8eb1b933fc73e5",
"css": "spin",
"code": 59393,
"src": "fontelico"
},
{
"uid": "87d337fee4866c2c28f6082994ce0f41",
"css": "map",
"code": 59395,
"src": "typicons"
},
{
"uid": "dplw5xo88mzzr7b45nvjcamyyhni6drs",
"css": "book",
"code": 59394,
"src": "modernpics"
}
]
}

View File

@ -1,69 +0,0 @@
@font-face {
font-family: 'elodie';
src: url('../font/elodie.eot?99803888');
src: url('../font/elodie.eot?99803888#iefix') format('embedded-opentype'),
url('../font/elodie.woff?99803888') format('woff'),
url('../font/elodie.ttf?99803888') format('truetype'),
url('../font/elodie.svg?99803888#elodie') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'elodie';
src: url('../font/elodie.svg?99803888#elodie') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "elodie";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-happy:before { content: '\e800'; } /* '' */
.icon-spin:before { content: '\e801'; } /* '' */
.icon-book:before { content: '\e802'; } /* '' */
.icon-map:before { content: '\e803'; } /* '' */
.icon-unhappy:before { content: '\e804'; } /* '' */
.icon-video:before { content: '\e805'; } /* '' */
.icon-calendar:before { content: '\e806'; } /* '' */
.icon-title:before { content: '\e807'; } /* '' */
.icon-media-add:before { content: '\e808'; } /* '' */
.icon-folder-open:before { content: '\e809'; } /* '' */
.icon-folder-closed:before { content: '\e80a'; } /* '' */
.icon-cancel-circle:before { content: '\e80b'; } /* '' */
.icon-minus-circle:before { content: '\e80c'; } /* '' */

View File

@ -1,24 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2015 by original authors @ fontello.com</metadata>
<defs>
<font id="elodie" horiz-adv-x="1000" >
<font-face font-family="elodie" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="happy" unicode="&#xe800;" d="m261 800c-60 0-109-65-109-144 0-80 49-145 109-145s110 65 110 145c0 79-49 144-110 144z m477 0c-61 0-110-65-110-144 0-80 49-145 110-145 60 0 110 65 110 145 0 79-50 144-110 144z m208-599c-13 0-27-5-37-16-4-4-8-8-12-12-111-109-253-164-396-165-142-2-285 50-396 155l-3 3-12 12c-21 21-54 20-75-1-20-21-20-55 1-76 3-4 8-8 14-14l3-3c132-124 301-186 469-184 169 1 337 67 468 195 5 5 9 10 14 14 20 22 20 56-1 77-10 10-23 15-37 15z" horiz-adv-x="999" />
<glyph glyph-name="spin" unicode="&#xe801;" d="m46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-38-4-12-7-26-9-39-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-3-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" />
<glyph glyph-name="book" unicode="&#xe802;" d="m600 630l35 0 0-672-502 0c-74 0-133 52-133 128l0 581c0 41 34 75 75 75l465 0 0-576-407 0c-52 0-88-28-88-78l0-2c0-50 36-83 88-83l467 0 0 627z m-60-562l-402 0c-12 0-22 7-22 19 0 10 10 16 22 16l402 0 0-35z" horiz-adv-x="635" />
<glyph glyph-name="map" unicode="&#xe803;" d="m53-93q-23 0-38 16t-15 36l0 521q0 21 15 36l235 235q14 14 34 15t35-11l224-179 202 201q25 25 57 10t32-47l0-520q0-21-16-38l-234-233q-14-14-35-15t-35 11l-224 179-201-202q-15-15-36-15z m51 178q152 150 156 152l0 378-156-156 0-374z m215 149l202-162 0 389-208 165 0-389q1-1 3-2t3-1z m410 7l0 374q-153-151-156-154l0-376z" horiz-adv-x="834" />
<glyph glyph-name="unhappy" unicode="&#xe804;" d="m261 800c-60 0-109-65-109-144 0-80 49-145 109-145s110 65 110 145c0 79-49 144-110 144z m477 0c-61 0-110-65-110-144 0-80 49-145 110-145 60 0 110 65 110 145 0 79-50 144-110 144z m-244-599c-165 0-331-62-461-184l-3-3c-6-5-11-10-14-14-21-21-21-55-1-76 21-21 54-21 75-1l12 12 3 3c111 105 254 157 396 155 143-1 285-56 396-165 4-4 8-8 12-12 20-21 54-21 74-1 21 21 21 55 1 77-5 5-9 10-14 14-131 129-299 194-468 195-3 0-6 0-8 0z" horiz-adv-x="999" />
<glyph glyph-name="video" unicode="&#xe805;" d="m1000 654v-608q0-23-22-32-7-3-14-3-15 0-25 10l-225 225v-92q0-67-47-114t-113-47h-393q-67 0-114 47t-47 114v392q0 67 47 114t114 47h393q66 0 113-47t47-114v-92l225 225q10 10 25 10 7 0 14-3 22-9 22-32z" horiz-adv-x="1000" />
<glyph glyph-name="calendar" unicode="&#xe806;" d="m0-150l0 649 893 0 0-649-893 0z m0 705l0 221 109 0 0-141 200 0 0 141 275 0 0-141 199 0 0 141 110 0 0-221-893 0z m168 139l0 156 82 0 0-156-82 0z m59-619q0-112 123-112 47 0 84 32 39 31 39 80 0 68-78 90 48 15 64 48 12 28-2 73-27 62-107 62-51 0-86-26t-37-77l72 0q0 45 49 46 43 0 45-52 0-49-84-47l0-57q48 0 68-8 23-11 23-46 0-57-54-61-43 0-47 55l-72 0z m281 146q49 14 88 47l0-297 70 0 0 371-64 0q-38-37-94-58l0-63z m135 473l0 156 82 0 0-156-82 0z" horiz-adv-x="893" />
<glyph glyph-name="title" unicode="&#xe807;" d="m713 745v-41q0-16-10-34t-24-18q-28 0-30-1-15-3-18-17-2-6-2-36v-643q0-14-10-24t-24-10h-60q-14 0-24 10t-10 24v680h-80v-680q0-14-9-24t-25-10h-60q-14 0-24 10t-10 24v277q-82 7-137 33-70 33-107 100-36 65-36 145 0 92 50 159 49 66 116 89 62 21 233 21h267q14 0 24-10t10-24z" horiz-adv-x="714.3" />
<glyph glyph-name="media-add" unicode="&#xe808;" d="m573 350q21 0 36-15t16-37-16-36-36-15l-104 0 0-105q0-22-16-37t-37-15-36 15-15 37l0 105-105 0q-21 0-36 15t-15 36 15 37 36 15l105 0 0 104q0 21 15 37t36 16 37-16 16-37l0-104 104 0z m245 245q16-16 16-36l0-521q0-65-46-111t-110-46l-522 0q-65 0-110 46t-46 111l0 625q0 65 46 110t110 46l417 0q22 0 37-15z m-110-36l-135 134 0-56q0-32 23-55t55-23l57 0z m-30-574q21 0 36 16t15 37l0 469-78 0q-53 0-92 38t-38 92l0 78-365 0q-21 0-37-15t-15-37l0-625q0-21 15-37t37-16l522 0z" horiz-adv-x="834" />
<glyph glyph-name="folder-open" unicode="&#xe809;" d="m994 330q0 20-30 20h-607q-22 0-48-12t-39-29l-164-203q-11-13-11-22 0-20 30-20h607q22 0 48 13t40 29l164 203q10 12 10 21z m-637 91h429v90q0 22-16 38t-38 15h-321q-23 0-38 16t-16 38v36q0 22-15 38t-38 15h-179q-22 0-38-15t-16-38v-476l143 175q25 30 65 49t78 19z m708-91q0-34-25-66l-165-203q-24-30-65-49t-78-19h-607q-51 0-88 37t-37 88v536q0 51 37 88t88 37h179q51 0 88-37t37-88v-18h303q51 0 88-37t37-88v-90h107q30 0 56-13t37-40q8-17 8-38z" horiz-adv-x="1071.4" />
<glyph glyph-name="folder-closed" unicode="&#xe80a;" d="m857 118v393q0 22-15 38t-38 15h-393q-23 0-38 16t-16 38v36q0 22-15 38t-38 15h-179q-22 0-38-15t-16-38v-536q0-22 16-38t38-16h679q22 0 38 16t15 38z m72 393v-393q0-51-37-88t-88-37h-679q-51 0-88 37t-37 88v536q0 51 37 88t88 37h179q51 0 88-37t37-88v-18h375q51 0 88-37t37-88z" horiz-adv-x="928.6" />
<glyph glyph-name="cancel-circle" unicode="&#xe80b;" d="m1000 349q0-136-67-251t-182-182-251-67-251 67-182 182-67 251 67 251 182 182 251 67 251-67 182-182 67-251z m-339-232l71 71-161 161 161 161-71 71-161-161-161 161-71-71 161-161-161-161 71-71 161 161z" horiz-adv-x="1000" />
<glyph glyph-name="minus-circle" unicode="&#xe80c;" d="m1000 349q0-136-67-251t-182-182-251-67-251 67-182 182-67 251 67 251 182 182 251 67 251-67 182-182 67-251z m-794-58h589v118h-589v-118z" horiz-adv-x="1000" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -1,188 +0,0 @@
body {
-webkit-animation: fadein 1s;
}
/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
*, body, div {
font-family: 'Lato', 'Helvetica';
font-weight: 300;
font-size: 1.1em;
color: #444;
}
body {
padding: 0;
margin: 0;
}
::-webkit-input-placeholder {
color: #ddd;
}
.titlebar {
height: 45px;
padding-top:10px;
text-align: center;
background-color: #eee;
border-bottom: solid 1.5px #aaa;
}
.titlebar a {
font-weight: 300;
font-size:.7em;
padding-top:5px;
}
.titlebar a.right {
float:right;
}
.titlebar a.left {
float:left;
}
.titlebar a.quit i {
color: #ff4136 !important;
}
.titlebar a.minus i {
color: #ffba00 !important;
}
.x-titlebar em {
padding-right: 28px;
background: url("../img/logo@18x22.png") no-repeat right 4px;
}
.content, .content-index {
padding: 0 10px 10px 10px;
font-size: 1em;
}
.content > div {
border-bottom: solid 1px #eee;
padding: 10px 0;
}
.content > p {
padding: 10px 0;
}
.content .import-success, .content .import-success a {
font-size:.9em;
}
.status {
display: none;
}
.status ul {
list-style-type:none;
padding:0;
margin:20px 0 0;
font-size:.8em;
}
.status ul li {
font-size:.9em;
padding:0;
margin:0 0 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.status ul li .destination {
width: 100%;
font-size: .75em;
padding-top: 0;
}
.preview {
position: relative;
padding: 20px 0;
}
.preview .center-cropped {
display: inline-block;
border-radius: 2px;
border: solid 1px #ddd;
margin: 1px;
width: 42px;
height: 42px;
background-position: center center;
background-size: cover;
}
.preview .center-cropped.video:before {
font-family: "elodie";
color: #eee;
content: '\e805';
position: absolute;
margin-top: 6px;
margin-left: 8px;
font-size: 1.5em;
}
i {
color: #555;
}
i.icon-happy {
color: #6cc644;
}
i.icon-unhappy {
color: #bd2c00;
}
label {
font-size: .9em;
font-weight: 300;
display: block;
padding-bottom:3px;
}
input, button {
font-family: 'Lato', 'Helvetica';
font-weight: 300;
font-size: .9em;
color: #666;
border: solid 1px #eee;
border-radius: 3px;
}
input:focus,
select:focus,
textarea:focus,
button:focus {
outline: none;
}
input {
padding: 4px;
width: 100%;
}
input[type="file"] {
height:0px;
width:0px;
overflow:hidden;
display:none;
}
button {
cursor: pointer;
background-color: #eee;
padding: 4px 10px;
margin-top: 10px;
}
small {
font-size:.7em;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,37 +0,0 @@
<html>
<head>
<script src="js/handlers.js"></script>
<link href='https://fonts.googleapis.com/css?family=Lato:400,100,300,100italic,300italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css"></script>
<link rel="stylesheet" href="css/boilerplate.css"></script>
<link rel="stylesheet" href="css/styles.css"></script>
<link rel="stylesheet" href="css/fontello/css/animation.css"></script>
<link rel="stylesheet" href="css/fontello/css/elodie.css"></script>
</head>
<body>
<div class="titlebar">
<!--<a href="" class="left quit quitProgram"><i class="icon-cancel-circle"></i></a>
<a href="" class="left minus minimizeProgram"><i class="icon-minus-circle"></i></a>-->
How can I help you? <em>-- Elodie</em><i></i>
</div>
<form class="importPhotos" action="" method="post">
<div id="content" class="content">
<p>
Let me know where your photos are and where you'd like me to put them as I sort them.
<small><em>(You can drop your photos here to update its information.)</em></small>
</p>
<div>
<label for="source"><i class="icon-folder-open"></i> What folder are your photos in now?</label>
<input type="text" name="source" id="source" placeholder="Path to your photos folder">
<small><em>Hint: Right clicking on your folder in Finder, pressing option and clicking "Copy as Pathname" will put the full path on your clipboard</em></small>
</div>
<div>
<label for="destination"><i class="icon-folder-closed"></i> Where would you like me to organize them to?</label>
<input type="text" name="destination" id="destination" placeholder="Path to your photos folder">
<button type="submit" class="push">Start Organizing<i></i></button>
</div>
<div class="import-success"></div>
</div>
</form>
</body>
</html>

View File

@ -1,250 +0,0 @@
var __constants__ = {
baseUrl : 'http://localhost:5000'
};
var __process__ = {};
if(typeof(require) === 'function') {
var ipc = require('ipc');
var path = require('path');
var os = require('os');
ipc.on('files', function(files) {
__process__.files = files;
});
ipc.on('preview', function(files) {
handlers.renderPreview(files);
});
ipc.on('update-import-success', function(args) {
//var response = JSON.parse(args['stdout']);
handlers.setSuccessTitle();
handlers.removeProgressIcons();
handlers.addSuccessImportMessage(args);
});
ipc.on('update-import-no-photos', function(args) {
//var response = JSON.parse(args['stdout']);
handlers.removeProgressIcons();
});
ipc.on('update-config-status', function(args) {
if(args) {
// @TODO: We should really handle this in the nodejs code.
handlers.removeProgressIcons();
location.href = 'index.html';
} else {
}
});
ipc.on('update-photos-success', function(args) {
if(os.platform() == 'win32'){
var response = JSON.parse(args['stdout'].replace(/\\/g, '\\\\'));
}else{
var response = JSON.parse(args['stdout']);
}
handlers.setSuccessTitle();
handlers.removeProgressIcons();
handlers.updateStatus(response);
});
function Broadcast() {
this.send = function(name, message) {
ipc.send(name, message);
};
}
window.onload = function () {
var broadcast = new Broadcast();
window.ondragover = function (e){ e.preventDefault(); return false };
window.ondragover = function (e){ e.preventDefault(); return false };
var holder = document.getElementById('content');
if(holder != null){
holder.ondrop = function (e) {
e.preventDefault();
files = []
for (var i = 0; i < e.dataTransfer.files.length; ++i) {
console.log(e.dataTransfer.files[i].path);
files.push(e.dataTransfer.files[i].path);
}
broadcast.send('load-update-photos', files);
return false;
};
}
};
};
function Handlers() {
var self = this;
var broadcast = new Broadcast();
this.click = {};
this.submit = {};
this.change = {};
// CHANGE
this.change.fileSelected = function(ev) {
var el = ev.target,
dir = el.value.substr(el.value.lastIndexOf("\\")+1),
tgt = document.querySelector(el.dataset.display);
tgt.innerHTML = dir;
};
// CLICK
this.click.selectFile = function(ev) {
var el = ev.target,
tgt = document.querySelector(el.dataset.for);
ev.preventDefault();
tgt.click();
};
this.click.launchFinder = function(ev) {
var el = ev.target,
tgt = el.dataset.path;
ev.preventDefault();
broadcast.send('launch-finder', tgt);
};
this.click.launchUrl = function(ev) {
var el = ev.target,
tgt = el.dataset.url;
ev.preventDefault();
broadcast.send('launch-url', tgt);
};
this.click.quitProgram = function(ev) {
//ev.preventDefault();
console.log('quit');
broadcast.send('program-quit');
};
// SUBMIT
this.submit.importPhotos = function(ev) {
var el = ev.target,
cls = el.className,
params;
ev.preventDefault();
params = {};
params['source'] = document.querySelector('input[name="source"]').value
params['destination'] = document.querySelector('input[name="destination"]').value
if(params['destination'].length === 0 || params['source'].length === 0) {
return;
}
document.querySelector('button.push i').className = 'icon-spin animate-spin';
broadcast.send('import-photos', params);
};
this.submit.updateConfig = function(ev) {
var el = ev.target,
cls = el.className,
params;
ev.preventDefault();
document.querySelector('button.push i').className = 'icon-spin animate-spin';
params = {};
params['mapQuestKey'] = document.querySelector('input[id="mapquest-api-key-field"]').value;
if(params['mapQuestKey'].length === 0) {
return;
}
broadcast.send('update-config', params);
};
this.submit.updatePhotos = function(ev) {
var el = ev.target,
cls = el.className,
params;
ev.preventDefault();
document.querySelector('button.push i').className = 'icon-spin animate-spin';
params = {};
params['location'] = document.querySelector('input[id="location-field"]').value;
params['datetime'] = document.querySelector('input[id="datetime-field"]').value;
params['album'] = document.querySelector('input[id="album-field"]').value;
params['title'] = document.querySelector('input[id="title-field"]').value;
if(params['location'].length === 0 && params['datetime'].length === 0 && params['album'].length === 0 && params['title'].length === 0) {
return;
}
params['files'] = __process__.files;
broadcast.send('update-photos', params);
};
this.addSuccessImportMessage = function(args) {
document.querySelector('.import-success').innerHTML = 'Your photos were successfully imported. <a href="#" class="launchFinder" data-path="'+args['destination'] +'">View them here</a>.';
};
this.dispatch = function(ev) {
var classes = ev.target.className.split(' ');
for(i=0; i<classes.length; i++) {
if(typeof(self[ev.type][classes[i]]) !== 'undefined') {
self[ev.type][classes[i]](ev);
}
}
};
this.removeProgressIcons = function() {
var els = document.querySelectorAll('i.icon-spin');
for(el in els) {
els[el].className = '';
}
};
this.renderPreview = function(files) {
html = '<label>You selected ' + (files.length > 1 ? 'these photos' : 'this photo') + '</label>';
for(var i=0; i<files.length && i<16; i++) {
if(files[i].match(/(mov|mp4|3gp|avi)/i) === null) {
html += '<div class="center-cropped" style="background-image:url(\'file://'+fileUrl(files[i])+'\');" title="'+files[i]+'"></div>';
} else {
html += '<div class="center-cropped video"></div>';
}
}
if(files.length >= 16) {
html += '<br>...and ' + (files.length -16) + ' more.';
}
document.querySelector('.preview').innerHTML = html;
};
this.setSuccessTitle = function() {
var el = document.querySelector('.titlebar i').className = 'icon-happy';
};
this.updateStatus = function(response) {
var el = document.querySelector('.status'),
source, destination, html;
console.log('update status');
console.log(response);;
if(response.length > 0) {
html = '<label>Status</label><ul>';
for(i=0; i<response.length; i++) {
source = response[i]['source'] || null;
destination = response[i]['destination'] || null;
sourceFileName = source.substr(source.lastIndexOf('/')+1);
if(destination === null) {
html += '<li><i class="icon-unhappy"></i> ' + sourceFileName + '</li>';
} else {
html += '<li><i class="icon-happy"></i> ' + sourceFileName + '<div class="destination" title="'+destination+'">'+destination+'</div></li>';
}
}
html += '</ul>';
el.innerHTML = html;
el.style.display = 'block';
}
};
function fileUrl(str) {
if (typeof str !== 'string') {
throw new Error('Expected a string');
}
var pathName = path.resolve(str).replace(/\\/g, '/');
// Windows drive letter must be prefixed with a slash
if (pathName[0] !== '/') {
pathName = '/' + pathName;
}
return encodeURI('file://' + pathName);
};
}
var handlers = new Handlers();
window.addEventListener('click', handlers.dispatch);
window.addEventListener('submit', handlers.dispatch);
window.addEventListener('change', handlers.dispatch);

View File

@ -1,71 +0,0 @@
<html>
<head>
<script src="js/handlers.js"></script>
<link href='https://fonts.googleapis.com/css?family=Lato:400,100,300,100italic,300italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css"></script>
<link rel="stylesheet" href="css/boilerplate.css"></script>
<link rel="stylesheet" href="css/styles.css"></script>
<link rel="stylesheet" href="css/fontello/css/animation.css"></script>
<link rel="stylesheet" href="css/fontello/css/elodie.css"></script>
</head>
<body>
<div class="titlebar">
<div class="left">
<!--<a href="" class="left quit quitProgram"><i class="icon-cancel-circle"></i></a>
<a href="" class="left minus minimizeProgram"><i class="icon-minus-circle"></i></a>-->
</div>
How can I help you? <em>-- Elodie</em><i></i>
<a href="index.html" class="right"><i class="icon-media-add"></i></a>
</div>
<form class="updatePhotos" action="" method="post">
<div id="content" class="content">
<div class="location">
<label for="location-field"><i class="icon-map"></i>Change geolocation</label>
<input id="location-field" type="text" placeholder="i.e. Sunnyvale, CA">
</div>
<div class="datetime">
<label for="datetime-field"><i class="icon-calendar"></i>Change date and time</label>
<input id="datetime-field" type="text" placeholder="i.e. 2015-07-31">
</div>
<div class="title">
<label for="title-field"><i class="icon-title"></i>Change title</label>
<input id="title-field" type="text" placeholder="i.e. Elodie smiling at dinner">
</div>
<div class="album">
<label for="album-field"><i class="icon-book"></i>Create album</label>
<input id="album-field" type="text" placeholder="i.e. Elodie's Birthday Party">
<button class="push" type="submit">Update<i></i></button>
<!--<button class="push add-location updatePhotos">Update Photos<i></i></button>
<button class="push add-datetime updatePhotos">Update<i></i></button>
<button class="push add-title updatePhotos">Update<i></i></button>
<button class="push add-album updatePhotos">Update<i></i></button>-->
</div>
<div class="status">
<!--<ul>
<li>IMG_6365.JPG <i class="icon-happy"></i><div class="destination" title="/Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg">/Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg</div></li>
<li>IMG_1234.JPG <i class="icon-unhappy"></i><div class="destination" title="/Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg">/Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg</div></li>
</ul>-->
</div>
<div class="preview">
<!--<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped video"></div>
<div class="center-cropped video"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>
<div class="center-cropped" style="background-image:url('file:///Users/jaisenmathai/Downloads/media/2015-10-Oct/Sunnyvale/2015-10-17_01-03-50-img_6365.jpg');"></div>-->
</div>
</div>
</form>
<script>
document.getElementById('location-field').focus();
</script>
</body>
</html>

View File

@ -1,19 +0,0 @@
var ipc = require('ipc'),
toolbarUi = require('./modules/toolbar-ui.js'),
broadcast = require('./modules/broadcast.js');
toolbarUi.app.on('ready', toolbarUi.ready);
toolbarUi.app.on('create-window', toolbarUi.createWindow);
toolbarUi.app.on('after-create-window', toolbarUi.afterCreateWindow);
toolbarUi.app.on('show', toolbarUi.show);
toolbarUi.app.on('after-show', toolbarUi.afterShow);
toolbarUi.app.on('hide', toolbarUi.show);
toolbarUi.app.on('after-hide', toolbarUi.afterHide);
ipc.on('import-photos', broadcast.importPhotos);
ipc.on('update-config', broadcast.updateConfig);
ipc.on('update-photos', broadcast.updatePhotos);
ipc.on('launch-finder', broadcast.launchFinder);
ipc.on('launch-url', broadcast.launchUrl);
ipc.on('program-quit', broadcast.programQuit);
ipc.on('load-update-photos', toolbarUi.onDropFiles);

View File

@ -1,123 +0,0 @@
var exports = module.exports = {};
var path = require('path');
var exec = require('child_process').exec,
config = require('./config.js');
// The main process listens for events from the web renderer.
// When photos are dragged onto the toolbar and photos are requested to be updated it will fire an 'update-photos' ipc event.
// The web renderer will send the list of photos, type of update and new value to apply
// Once this main process completes the update it will send a 'update-photos-completed' event back to the renderer with information
// so a proper response can be displayed.
exports.importPhotos = function(event, args) {
var params = args,
normalize;
console.log('import-photos');
console.log(args);
if(typeof(args['source']) === 'undefined' || args['source'].length === 0 || typeof(args['destination']) === 'undefined' || args['destination'].length === 0) {
console.log('no source or destination passed in to import-photos');
event.sender.send('update-import-no-photos', null);
return;
}
args['source'] = args['source'].normalize();
args['destination'] = args['destination'].normalize();
update_command = path.normalize(__dirname + '/../../dist/elodie/elodie') + ' import --source="' + args['source'] + '" --destination="' + args['destination'] + '"';
//update_command = __dirname + '/../../elodie.py import --source="' + args['source'] + '" --destination="' + args['destination'] + '"';
console.log(update_command);
exec(update_command, function(error, stdout, stderr) {
console.log('out ' + stdout);
console.log('err ' + stderr);
/*params['error'] = error
params['stdout'] = '[' + stdout.replace(/\n/g,',').replace(/\,+$/g, '').replace(/\n/g,'') + ']'
params['stderr'] = stderr
console.log('parsed')
console.log(params['stdout'])*/
event.sender.send('update-import-success', args);
});
};
exports.updateConfig = function(event, args) {
var params = args,
status;
status = config.writeConfig(params);
if(status) {
event.sender.send('update-config-status', true);
} else {
event.sender.send('update-config-status', false);
}
};
// When photos are dragged onto the toolbar and photos are requested to be updated it will fire an 'update-photos' ipc event.
// The web renderer will send the list of photos, type of update and new value to apply
// Once this main process completes the update it will send a 'update-photos-completed' event back to the renderer with information
// so a proper response can be displayed.
exports.updatePhotos = function(event, args) {
var params = args,
normalize;
console.log('update-photos');
console.log(args);
if(typeof(args['files']) === 'undefined' || args['files'].length === 0) {
console.log('no files passed in to update-photos');
return;
}
normalize = function(files) {
for(var i=0; i<files.length; i++) {
files[i] = files[i].normalize()
}
return files
}
files = normalize(args['files'])
elodie_path = path.normalize(__dirname + '/../../dist/elodie/elodie');
update_command = elodie_path +' update'
//update_command = __dirname + '/../../elodie.py update'
if(args['location'].length > 0) {
update_command += ' --location="' + args['location'] + '"';
}
if(args['album'].length > 0) {
update_command += ' --album="' + args['album'] + '"';
}
if(args['datetime'].length > 0) {
update_command += ' --time="' + args['datetime'] + '"';
}
if(args['title'].length > 0) {
update_command += ' --title="' + args['title'] + '"';
}
update_command += ' "' + files.join('" "') + '"'
console.log(update_command)
exec(update_command, function(error, stdout, stderr) {
console.log('out ' + stdout)
console.log('err ' + stderr)
params['error'] = error
params['stdout'] = '[' + stdout.replace(/\n/g,',').replace(/\,+$/g, '').replace(/\n/g,'') + ']'
params['stderr'] = stderr
console.log('parsed')
console.log(params['stdout'])
event.sender.send('update-photos-success', params);
});
};
exports.launchFinder = function(event, path) {
console.log(path);
var shell = require('shell');
shell.showItemInFolder(path);
};
exports.launchUrl = function(event, url) {
console.log(url);
var shell = require('shell');
shell.openExternal(url);
};
exports.programQuit = function(event, path) {
console.log('program-quit');
//mb.tray.destroy();
mb.quit();
};

View File

@ -1,38 +0,0 @@
var exports = module.exports = {};
var fs = require('fs'),
os = require('os'),
defaultConfigFile = (function() {
var f = __dirname;
for(var i=0; i<2; i++) {
f = f.substr(0, f.lastIndexOf(os.platform() == 'win32' ? '\\' : '/'));
}
return f + (os.platform() == 'win32' ? '\\config.ini-sample': '/config.ini-sample');
})(),
configFile = (process.env.HOME || process.env.USERPROFILE) + (os.platform() == 'win32' ? '\\.elodie\\config.ini' : '/.elodie/config.ini'),
hasConfig,
setConfig;
exports.hasConfig = function() {
console.log(defaultConfigFile);
console.log(configFile);
return fs.existsSync(configFile);
};
exports.writeConfig = function(params) {
var contents;
try {
if(exports.hasConfig()) {
contents = fs.readFileSync(configFile).toString();
} else {
contents = fs.readFileSync(defaultConfigFile).toString();
}
console.log(contents);
contents = contents.replace(/key=[\s\S]+$/,'key='+params['mapQuestKey']);
fs.writeFileSync(configFile, contents);
return true;
} catch(e) {
console.log(e);
return false;
}
};

View File

@ -1,111 +0,0 @@
var exports = module.exports = {};
var menubar = require('menubar'),
menu = require('menu'),
tray = require('tray'),
config = require('./config.js'),
loadUrl = null;
var os = require('os')
var s_dir = __dirname.substr(0,__dirname.lastIndexOf(os.platform() == 'win32' ? '\\' : '/')) +
(os.platform() == 'win32' ? '\\html' : '/html');
exports.app = app = menubar(
{
preloadWindow: true,
dir: s_dir,
index: 'index.html',
pages: {
'blank': 'blank.html',
'config': 'config.html',
'location': 'location.html'
},
width: 400,
height: 500,
'window-position': 'trayCenter',
'frame': os.platform() == 'win32' ? true : false,
'always-on-top': os.platform() == 'win32' ? true : false
}
);
exports.ready = function() {
console.log('app is ready');
var template = [{
label: "Application",
submenu: [
{ label: "Quit", accelerator: "Command+Q", click: function() { app.quit(); }}
]}, {
label: "Edit",
submenu: [
{ label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" },
{ label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" },
{ label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" },
{ label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" },
{ label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" },
{ label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" }
]}
];
menu.setApplicationMenu(menu.buildFromTemplate(template));
this.tray.setToolTip('Drag and drop files here');
console.log(app.getOption('dir'));
this.tray.setImage(app.getOption('dir') + '/img/logo@18x22xbw.png');
this.tray.on('clicked', function clicked () {
console.log('tray-clicked')
});
this.tray.on('drop-files', function dropFiles (ev, files) {
loadUrl = app.getOption('pages')['location'];
app.showWindow();
//app.window.openDevTools();
app.window.webContents.on('did-finish-load', function() {
app.window.webContents.send('files', files);
app.window.webContents.send('preview', files);
});
});
};
exports.onDropFiles = function(event, args) {
var files = args;
loadUrl = app.getOption('pages')['location'];
app.showWindow();
app.window.webContents.on('did-finish-load', function() {
app.window.webContents.send('files', files);
app.window.webContents.send('preview', files);
});
};
exports.createWindow = function() {
console.log('create-window')
};
exports.afterCreateWindow = function() {
console.log('after-create-window')
};
exports.show = function() {
if(!config.hasConfig()) {
loadUrl = this.getOption('pages')['config'];
} else if(loadUrl === null) {
loadUrl = this.getOption('index');
}
this.window.loadUrl('file://' + this.getOption('dir') + '/' + loadUrl);
loadUrl = null;
//app.window.openDevTools();
};
exports.afterShow = function() {
console.log('after-show');
};
exports.hide = function() {
console.log('hide');
};
exports.afterHide = function() {
console.log('after-hide')
this.window.loadUrl('file://' + this.getOption('dir') + '/' + this.getOption('pages')['blank']);
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View File

@ -1,41 +0,0 @@
#!/usr/bin/env python
import nose
import os
import shutil
import sys
import tempfile
if __name__ == "__main__":
# test_directory is what we pass nose.run for where to find tests
test_directory = os.path.abspath('tests')
# create a temporary directory to use for the application directory while running tests
temporary_application_directory = tempfile.mkdtemp('-elodie-tests')
os.environ['ELODIE_APPLICATION_DIRECTORY'] = temporary_application_directory
# copy config.ini-sample over to the test application directory
temporary_config_file_sample = '{}/config.ini-sample'.format(os.path.dirname(test_directory))
temporary_config_file = '{}/config.ini'.format(temporary_application_directory)
shutil.copy2(
temporary_config_file_sample,
temporary_config_file,
)
# read the sample config file and store contents to be replaced
with open(temporary_config_file_sample, 'r') as f:
config_contents = f.read()
# set the mapquest key in the temporary config file and write it to the temporary application directory
config_contents = config_contents.replace('your-api-key-goes-here', 'x8wQLqGhW7qK3sFpjYtVTogVtoMK0S8s')
with open(temporary_config_file, 'w+') as f:
f.write(config_contents)
test_argv = sys.argv
test_argv.append('--verbosity=2')
test_argv.append('-s')
result = nose.run(argv=test_argv)
if(result):
sys.exit(0)
else:
sys.exit(1)