2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-11 07:10:26 +00:00
Commit Graph

28 Commits

Author SHA1 Message Date
Romain
9c581bbd0b feat(albums): optionally generate a ZIP file for each album
Fixes #125
2019-03-17 22:56:48 +01:00
Andrew McOlash
282713f273 Allow generating rectangular thumbnails (#146)
Add rectangular thumbnail
2019-02-25 19:06:03 +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
Romain
9425604dd7 chore(dependencies): upgrade Standard from v11 to v12 which introduces a style change 2018-12-11 23:11:03 +01:00
Andrew McOlash
cbbb067957 Change metadata to only have exif when needed, rename exif flag 2018-10-17 22:03:36 -07: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
79dd36f77b test(core): add unit tests for the relationship/action mapping, e.g. “photo:large” 2018-06-18 00:31:33 +02:00
Romain
3fa8867757 test(all): add unit tests for theme + cleanup logic 2018-06-13 23:30:14 +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
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
24790c075c chore(cleanup): remove old code and console.log() 2018-06-08 00:12:17 +02:00
Romain
36d935a787 feat(core): new option to add watermarks to the gallery
Watermarks only apply to large images, not thumbnails.
2018-05-15 20:28:57 +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
f7d7b827e5 feat(cli): --concurrency also controls the number of batch exiftool processes 2018-05-09 20:16:31 +02:00
Romain
a5740fb94e feat(cli): Expose --photo-quality to control the quality of the converted images 2018-05-09 20:16:21 +02:00
Romain
8f76013539 fix(dependencies) Upgrade downsize for the width/height mixup
The end behaviour stays the same since `--large-size`
always referred to the image height in the docs.
2018-05-08 21:51:09 +02:00
Brandon Lopez
205ec2f3cb Add concurrency argument (#92)
Add concurrency option
2018-04-12 18:53:15 +10:00
Felix Yan
0ff1699c5c Correct a typo in step-index.js 2018-03-23 21:17:34 +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
a5486687e7 feat(log): print more debug logs about how the number of files and tasks 2017-12-10 23:49:33 +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
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
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
30f203af4b Render progress using Listr + split the main process into "steps" which are easier to test 2017-11-06 00:02:42 +11:00