2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-05 12:01:04 +00:00
Commit Graph

289 Commits

Author SHA1 Message Date
Romain
e5f6df3d28 refactor(cli): deprecated options logic now handled in <options> module 2017-12-23 21:33:43 +11:00
Romain
286dc8d15f feat(albums): --albums-from can be a list of patterns with special keywords
- %path expands to the path of the photo/video
- %keywords expands to the IPTC keywords of the photo
- {format} expands to the photo's EXIF date, e.g. {YYYY MM}
2017-12-23 20:32:10 +11:00
Romain
23f19566d0 test(cli): add unit tests for options parsing, especially custom logic on top of yargs 2017-12-22 22:28:37 +11:00
Romain
2c2d9ce43f 2.2.1 2017-12-16 22:00:59 +11:00
Romain
2f8a15c058 fix(resize): upgrade downsize to fix Infinity% when reporting video progress 2017-12-16 20:40:34 +11:00
Romain
fce8d8d8af refactor(model): album mappers can also return '/' to mean the root album 2017-12-16 20:38:56 +11:00
Romain
78ae865b75 2.2.0 2017-12-11 23:18:29 +11:00
Romain
7a9c5f4b08 fix(dependencies): upgrade chalk to latest major version v1 -> v2 2017-12-11 22:55:31 +11:00
Romain
74c981fb4c feat(analytics): rename --no-usage-report to --no-usage-stats to be more explicit
This is not a breaking change since the version hadn’t been published since introduced
2017-12-11 22:55:27 +11:00
Romain
21b0e121d5 fix(log): use debug.enable() instead of setting process.env.DEBUG to set the log level dynamically
The `debug` package reads DEBUG on first require to configure itself.
So far `log.js` is the first file to require it so it works, but if `yargs` started using `debug`
then setting `process.env.DEBUG` would do nothing here.

Instead we can use `debug.enable()` method to set the filter dynamically.
2017-12-10 23:59:36 +11:00
Romain
a5486687e7 feat(log): print more debug logs about how the number of files and tasks 2017-12-10 23:49:33 +11:00
Romain
81ee517062 feat(index): ignore files in a root #recycle folder (Synology recycle bin) 2017-12-10 23:34:32 +11:00
Romain
0686ce3b37 fix(dependencies): upgrade dependencies to latest 2017-12-10 23:33:47 +11:00
Romain
91528ad076 test(index): cleanup thumbsup.db between test runs, otherwise the test does nothing 2017-12-10 10:40:12 +11:00
Romain
d0bbf94b1c fix(index): don’t crash when trying to parse exiftool output for a badly encoded file 2017-12-09 23:22:20 +11:00
Romain
a2042f3128 Fix logging option for non-TTY + highlight URL in welcome / error messages 2017-12-08 21:28:04 +11:00
Romain
47a924883e New --log option to print a full text log with different verbosity levels 2017-12-08 00:06:35 +11:00
Romain
06ecd2edad Add usage reporting with Google Analytics + greeting/error messages
This will help understand usage patterns to know what to focus on, e.g.
- are many people using thumbsup on Windows?
- are there many galleries with > 10,000 photos?
2017-12-08 00:04:16 +11:00
Romain
3152361e65 Fix #83: handle IPTC keywords returned as string or array 2017-12-02 22:54:37 +11:00
Romain
f66208e052 New options for the {{date}} helper: custom date format + how long ago 2017-11-29 21:11:12 +11:00
Romain
067238c8e4 2.2.0-alpha.3 2017-11-29 21:06:42 +11:00
Romain
515ce3e8c1 Fix bug in #compare and #times Handlebars templates introduced in 3e0982e
When declared with () => instead of function (), the context is missing from child blocks.
2017-11-29 20:58:13 +11:00
Romain
0b8eb5bbd9 2.2.0-alpha.2 2017-11-29 08:49:26 +11:00
Romain
8882b8a2e8 ignore dev-only files from npm 2017-11-29 08:49:15 +11:00
Romain
d7d01adc82 Fix #78: ignore invalid photos / videos
The current code doesn't create an output structure for them, so we don't create thumbnails.
This is good since the thumbnail generation would likely fail.

However we still try to render thumbnails in the themes.
The themes could be smart enough to skip invalid files, but it's easier to ignore them from the start.
2017-11-28 21:54:26 +11:00
Romain
d19a230a6c Cleanup unused code 2017-11-28 21:50:44 +11:00
Romain
e9e5f32970 Add test coverage + clean up build scripts 2017-11-28 07:53:55 +11:00
Romain
3e098e2328 Extract Handlebars helpers to prepare for theme structure + add unit tests 2017-11-28 07:53:51 +11:00
Romain
2a0a8d6631 Upgrade mock-fs to support Node 8 (includes dynamic require workaround) 2017-11-26 22:47:51 +11:00
Romain
cbf8a1f3b4 Don’t index media from Synology thumbnail folders (@eaDir) nor folders starting with “.” 2017-11-26 22:32:03 +11:00
Romain
ac520d40ad Fix case insensitive glob + add unit tests for globbing 2017-11-26 21:21:15 +11:00
Romain
d66b28b12c 2.2.0-alpha.1 2017-11-26 09:18:00 +11:00
Romain
8d6cec3884 TravisCI: run the build inside Docker
- This is the simplest way to ensure all dependencies are there
- Also much faster than installing them on every build
- Especially since Travis runs Ubuntu Trusty, which doesn’t have ffmpeg in its repositories (must be compiled from source)
2017-11-25 22:32:07 +11:00
Romain
870b60de17 Simplify test scripts & document them in CONTRIBUTING.md 2017-11-25 22:29:21 +11:00
Romain
208f0f0212 Run full integration tests inside Docker. Travis runs unit + integration. 2017-11-25 22:01:30 +11:00
Romain
9a2da3e5ea Temporarily remove the recursive nav from the Classic theme
- The recursive call within Handlebars was causing huge memory spikes
- It seems it deep cloned (?) the entire Album objects at every recursive call
- This itself could bloat to several hundred megs of RAM for very large galleries

Replacing it with a simple breadcrumbs navigation for now.
2017-11-24 22:35:22 +11:00
Romain
24b2f9bd7c Major optimisations: SQLite index + faster disk glob + new exiftool streaming
1. Move from a JSON index to a SQLite database.
  - This allows the indexing to be interrupted & resumed
  - Updating the index consumes less RAM than loading / saving an entire JSON object
  - Loading the index consumes less RAM since it can be streamed, only exacting the properties we need every time (instead of loading all EXIF data in memory, only to discard most of it later)
  - These make a big difference when processing 10,000+ photos

2. Switch from <glob> to a manual <readdir>
  - Glob would take several hundred or GB of RAM when asked to find several thousand files
  - Manual approach with <micromatch> library does the same thing in a fraction of the time / memory usage

3. Exiftool optimisations
  - Run 1 exiftool process per CPU, still in batch mode (divide all files to be read into 1 bucket per CPU)
  - Stream the exiftool output instead of buffering it in memory
2017-11-24 22:08:59 +11:00
Romain
bfdebe2c0f Smarter fuzzy comparison for the “snapshot” integration test 2017-11-24 21:56:45 +11:00
Romain
19a28a08c0 Basic production Dockerfile (doesn’t run the tests yet) 2017-11-24 21:55:26 +11:00
Romain
29654444cd Move screenshots and banners to subfolder 2017-11-24 21:52:10 +11:00
Romain
30f203af4b Render progress using Listr + split the main process into "steps" which are easier to test 2017-11-06 00:02:42 +11:00
Romain
179cc57644 Update “debug” package to fix insecure vulnerability warning 2017-10-12 20:18:11 +11:00
Romain
56235266bb Stop supporting Node v4 to enable newer ES6 syntax 2017-10-12 20:13:27 +11:00
Romain
97a6e348cc Update all dependencies 2017-10-12 20:12:50 +11:00
Romain
6e2f7e2ffb README - clarify Docker usage 2017-09-12 12:36:27 +10:00
Romain
35f9ee96b6 Update many dependencies to latest 2017-08-15 19:08:53 +10:00
Romain
011902c528 Fix integration test data for #71: set movie metadata to expected date 2017-08-15 19:08:40 +10:00
Romain
b92724472e Fix #71: read both Quicktime CreationDate and CreateDate 2017-08-13 21:28:00 +10:00
Romain
0b27d37881 Read metadata from Picasa.ini if present 2017-08-07 22:53:04 +10:00
Romain
3e64d2ab38 Create a Metadata model attached to input files
- for easier unit testing
- to enable input filtering (e.g. only include photos with this keyword)
2017-08-07 22:52:26 +10:00