Romain
220b2137ec
feat(media): support suffix based generated paths instead of folder groups
...
Fixes #32 , Fixes #111
2019-02-13 22:18:54 +01:00
Romain
96bb3ad902
feat(resize): new options to control preview images (resize, copy, symlink…)
...
Fixes #115
2019-02-07 22:08:38 +01:00
Romain
9bda0a4835
feat(database): new include/exclude arguments to filter the input folder
2019-01-23 22:48:54 +01:00
Romain
ec6fbf9b0a
test(database): more unit tests for file globbing patterns
2019-01-08 21:53:20 +01:00
Romain
f30eddb6dd
feat(options): new flags to selectively include photos / videos / raw photos
...
fixes #128
2019-01-08 21:45:02 +01:00
Romain
2c2c518f4b
New options --video-format, --video-quality and --video-bitrate
2019-01-07 21:48:44 +01:00
Nikolai Kim
6b7df75ea4
Use Slugify for Albun names
2019-01-06 23:52:21 +03:00
Romain
9425604dd7
chore(dependencies): upgrade Standard from v11 to v12 which introduces a style change
2018-12-11 23:11:03 +01:00
Romain
b15b10fbb9
fix(metadata): support the ContentCreateDate field for videos
2018-09-02 16:55:16 +02:00
Romain
73672ce4dd
refactor(test): replace var with const in tests files when appropriate
2018-08-18 20:25:35 +02:00
Romain
a51904255c
fix(test): fix path to theme helpers in unit tests
2018-07-19 21:05:42 +02:00
Romain
bf60ae4677
refactor(components): bring ListrWorkQueue into this repo to simplify the build process
...
- This component was not published to the rpm registry anyway
- We depended on the repo’s master branch which can break things for everyone
- Its repo was not getting much attention which meant
* no tests, no coverage report
* no linting
* no package linting (e.g. had 2 dependencies that weren’t actually used)
It will be simpler to manage this way
2018-07-13 21:29:52 +02:00
Romain
39591c70a1
feat(theme): support for themes published within a subfolder
...
If a theme has a build process, it will likely publish a subfolder (e.g. “dist”) to npm.
It can simply set “thumbsup.themeRoot” in its package.json so thumbsup looks in the right place.
2018-06-30 14:18:13 +02:00
Romain
00dac76983
test(exiftool): add tests for batch exiftool streaming
2018-06-18 23:31:11 +02:00
Romain
79dd36f77b
test(core): add unit tests for the relationship/action mapping, e.g. “photo:large”
2018-06-18 00:31:33 +02:00
Romain
832673f322
refactor(tests): integration tests as part of the Mocha suite
...
Some benefits:
- no need to check-in a full website to compare against
- targeted asserts, instead of a “should be 100% the same”
- more robust against cosmetic theme changes
- allows for testing more edge cases in the future
- can’t forget to run the integration tests since they’re part of “npm test”
2018-06-16 18:28:58 +02:00
Romain
7dd714c957
refactor(tests): dynamically generate test folders to check more edge cases
2018-06-16 18:26:17 +02:00
Romain
fb4c4fb89f
test(all): add unit tests for Album and Problem
2018-06-15 22:32:45 +02:00
Romain
6d94b6339f
chore(tests): handle rejected promises during tests
2018-06-14 00:02:03 +02:00
Romain
3fd0ee9ba3
chore(tests): capture all logs during the tests so they don’t pollute the output + can be asserted on
2018-06-13 23:58:57 +02:00
Romain
3fa8867757
test(all): add unit tests for theme + cleanup logic
2018-06-13 23:30:14 +02:00
Romain
72a23807f1
chore(build): require all source files in the tests so the coverage report shows untested files
2018-06-13 23:27:40 +02:00
Felix Eckhofer
81a85004c2
Fix behavior for non-traversable directories ( #108 )
...
fix(index): Continue on errors during find
This ensures the gallery is created even when some files are
inaccessible (for example due to invalid names or file permissions).
Requires running the test in Docker as non-root to allow file access test
2018-06-12 22:58:45 +02:00
Romain
bd86ab6535
test(themes): add integration tests using a mock file system
...
This replaces the basic unit tests that used private methods
and didn’t have a very clear intent
2018-06-12 00:54:53 +02:00
Romain
deee049650
refactor(themes): extract the {{relative}} helper to be standalone + add some tests
2018-06-12 00:37:44 +02:00
Romain
be0ee25c64
test(index): don’t run the invalid filename test on macOS
2018-06-11 23:51:33 +02:00
Felix Eckhofer
124d1857b1
test(index): Add test for invalid filename behavior
2018-06-09 23:51:18 +02:00
Romain
899a89e516
test(mapper): fix unit test that relied on a folder called “tmp” to already exist
2018-06-09 23:46:21 +02:00
Romain
e9beb830a2
feat(core): skip files that can’t be processed + show a summary at the end
...
Thumbsup used to stop at the first problem processing a file.
This was a problem on large galleries where you’d need to run it again and again, fixing files as you went.
This change:
- skips problematic files and shows a summary at the end
- logs all warnings/errors to <thumbsup.log> when running the default output
Also refactor and cleanup of the logging logic.
2018-06-09 00:20:29 +02:00
Romain
7208642d95
test(all): increase unit test coverage
2018-06-08 23:39:09 +02:00
Romain
8bbe1186c5
fix(core): custom album mappers using file:// can use a relative path
2018-06-08 23:28:11 +02:00
Romain
0adef54dc8
feat(core): add support for static and animated GIFs
...
GraphicsMagick can’t process animated GIFs well unless all frames are coalesced, which creates very large files.
This means there is a new dependency on Gifsicle which is very good at working with animated GIFs.
- Thumbnails are still processed through GraphicsMagick (more options, e.g. centre-crop)
- Large previews of animated GIFs go through Gifsicle
The startup checks are updated to check for the Gifsicle binary.
Fixes #96 .
2018-06-08 00:49:03 +02:00
Romain
e1517d2fbd
feat(core): when building thumbnails, fallback to JPG if the source is not a browser-friendly format
...
If the source is browser-friendly (jpg, jpeg, png) then keep the exact original extension.
2018-06-08 00:27:44 +02:00
Romain
03a9c9a319
refactor: themes are now standalone folders, to prepare for external loading
...
Every theme is made of { Handlebars + Less + Partials + Helpers + Public }
2018-06-01 23:49:53 +02:00
Romain
3c946621ec
feat(core): new --gm-args flag to pass additional options to GraphicsMagick
...
Example: thumbsup --gm-args ‘modulate 120’ --gm-args ‘equalize’
Closes #89 .
2018-05-14 22:05:33 +02:00
Romain
dd282f92d4
chore(dependencies): update all dependencies to the latest version
2018-05-14 21:22:57 +02:00
klemens
424d2c8b8b
spelling fixes
2018-04-26 11:08:45 +02:00
Romain
03c3b38e82
fix(model): ignore the EXIF date if it’s not valid e.g. 0000:00:00
...
Closes #94
2018-03-29 20:21:58 +11:00
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
fce8d8d8af
refactor(model): album mappers can also return '/' to mean the root album
2017-12-16 20:38:56 +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
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
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
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
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
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
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
Romain
d24c5110cc
Fix #70 : files in the root of the source folder get added to the root gallery (index.html)
...
Before, they were added to an album called “.” which didn’t look good,
and the corresponding “.html” file (no base name) caused issues on web servers
2017-07-22 21:25:43 +10:00
Romain
dc40fbac09
Fix inferring data from the filename: was getting confused if the folder contained digits
2017-06-14 17:43:38 +10:00
Romain
80f7a88c35
Fix #61 : new options to avoid copying original photos to the output folder
2017-06-03 21:25:41 +10:00
Romain
3531f1e533
Try to infer dates from the filename if there is no "date" metadata
2017-04-01 00:07:04 +11:00
Romain
a7ad8dc9fc
Fix reading the original creation date of QuickTime and H264 movies
2017-03-19 00:12:21 +11:00
Romain
39ee2adf05
Read XMP ratings
2017-03-08 21:41:37 +11:00
Romain
449ee0b180
Read the caption from all standard EXIF/IPTC/XMP tags (issue #24 )
2017-03-08 21:40:09 +11:00
Romain
7e73e6a10b
Refactor album mapping code to be much simpler based on (media) => string
2017-03-08 20:12:05 +11:00
Romain
59b9bdbbd2
Use <standard> for code style, which removed lots of unused variables/requires
2017-03-06 23:46:46 +11:00
Romain
e71e5d4207
Replace custom "make" DSL with the output task list ( #60 )
2017-03-06 23:27:44 +11:00
Romain
e719bf15b1
Single source of truth for input/outputs + view model for display ( #58 )
2017-03-06 22:16:36 +11:00
Romain
d3781b8fcf
Fix parsing of MIME Type into Media type (image/video)
...
This fixes download links, and being able to right-click on a video and save-as
2017-02-28 21:40:51 +11:00
Romain
3a01c678eb
Support for IPTC captions
2017-02-28 20:35:09 +11:00
Romain
8dccb88f25
Use [exiftool-json-db] to maintain the JSON database of media files
2017-02-28 00:13:45 +11:00
Romain
e36464a76a
New --albums-output-folder option to write all albums to a subfolder (cleaner output)
...
The main changes are
- this introduces relative paths, since some HTML files have to go ".." to get to public/media
- it also introduces the difference between album.path (OS dependent) and album.url (forward slashes)
2017-02-07 23:37:52 +11:00
Romain
e930af7f49
Add GIF support, fixes #22 .
...
One major change here is that thumbnails will always be generated as ".jpg".
This is potentially a breaking change, in the sense that all "png" or "jpeg" thumbnails
would be to re-calculated and re-uploaded.
2017-02-06 21:37:36 +11:00
Romain
4209466c14
More unit tests for the Album model (tests split into 2 files for legibility)
2017-02-05 18:38:44 +11:00
Romain
6772e9c9d9
Fix final options for nested albums, not being passed recursively
2017-02-05 15:39:52 +11:00
Romain
f235675f86
Don't concatenate the root album name to be 100% compatible with existing version for flat albums
2016-11-17 22:07:04 +11:00
Romain
0208babae1
Pick 10 previews per album, to make the mosaic theme work
2016-11-17 12:34:58 +11:00
Romain
b10e7ca6c9
Unit tests for album constructor + sorting
2016-11-15 13:28:37 +11:00
Romain
93ffff1e90
Move album.previews() test one level up
2016-11-13 13:22:43 +11:00
Romain
fd9bf181fd
Extract model from website generation
2016-11-02 11:35:27 +11:00
Romain Prieto
72fd69bb79
by-date generator supports nested albums + custom album title format
2016-10-17 18:34:45 +11:00
Romain Prieto
f69d2e3d48
Add support for nested folders
2016-10-16 22:24:07 +11:00
Romain Prieto
9c0071c00d
Work in progress: support multiple themes
2016-10-15 23:22:22 +11:00
Romain Prieto
c2f290bbd6
thumbsup v2: rewrite the website around 'albums'
2016-10-13 18:49:15 +11:00