Commit Graph

136 Commits (78ae865b7537e1838082b4626738504fb9593cd9)

Author SHA1 Message Date
Romain a5486687e7 feat(log): print more debug logs about how the number of files and tasks 7 years ago
Romain 81ee517062 feat(index): ignore files in a root #recycle folder (Synology recycle bin) 7 years ago
Romain d0bbf94b1c fix(index): don’t crash when trying to parse exiftool output for a badly encoded file 7 years ago
Romain a2042f3128 Fix logging option for non-TTY + highlight URL in welcome / error messages 7 years ago
Romain 47a924883e New --log option to print a full text log with different verbosity levels 7 years ago
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?
7 years ago
Romain 3152361e65 Fix #83: handle IPTC keywords returned as string or array 7 years ago
Romain f66208e052 New options for the {{date}} helper: custom date format + how long ago 7 years ago
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.
7 years ago
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.
7 years ago
Romain d19a230a6c Cleanup unused code 7 years ago
Romain 3e098e2328 Extract Handlebars helpers to prepare for theme structure + add unit tests 7 years ago
Romain cbf8a1f3b4 Don’t index media from Synology thumbnail folders (@eaDir) nor folders starting with “.” 7 years ago
Romain ac520d40ad Fix case insensitive glob + add unit tests for globbing 7 years ago
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
7 years ago
Romain 30f203af4b Render progress using Listr + split the main process into "steps" which are easier to test 7 years ago
Romain b92724472e Fix #71: read both Quicktime CreationDate and CreateDate 7 years ago
Romain 0b27d37881 Read metadata from Picasa.ini if present 7 years ago
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)
7 years ago
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
7 years ago
Romain ac67a08da9 Use new “downsize” package that was split out (to make testing edge cases easier) 7 years ago
Romain dc40fbac09 Fix inferring data from the filename: was getting confused if the folder contained digits 7 years ago
Romain 80f7a88c35 Fix #61: new options to avoid copying original photos to the output folder 7 years ago
Romain 6fde22e9d1 Fix #62: crash prevented the error message from showing when migrating from V1 to V2 7 years ago
Romain 1df4ee48f3 Fix #63: run ffmpeg using <spawn> and don't buffer stdout/stderr 8 years ago
Romain 3531f1e533 Try to infer dates from the filename if there is no "date" metadata 8 years ago
Romain a7ad8dc9fc Fix reading the original creation date of QuickTime and H264 movies 8 years ago
Romain 9a24acc6df Fix copying of --original-photos 8 years ago
Romain 91e55daf9b Upgrade VideoJS to 5.17 8 years ago
Romain 9c78c1cd79 Rename album sorting function for clarity (they don't take a raw File, but a Media object) 8 years ago
Romain fb77791c80 Fix #33: new --cleanup option to remove unused generated thumbnails/media 8 years ago
Romain 39ee2adf05 Read XMP ratings 8 years ago
Romain 449ee0b180 Read the caption from all standard EXIF/IPTC/XMP tags (issue #24) 8 years ago
Romain 7e73e6a10b Refactor album mapping code to be much simpler based on (media) => string 8 years ago
Romain 07ec7702cd Fix #f7451db when counting available CPUs (missing array length) 8 years ago
Romain f7451db36e Run as many photo/video tasks as CPUs 8 years ago
Romain 59b9bdbbd2 Use <standard> for code style, which removed lots of unused variables/requires 8 years ago
Romain e71e5d4207 Replace custom "make" DSL with the output task list (#60) 8 years ago
Romain e719bf15b1 Single source of truth for input/outputs + view model for display (#58) 8 years ago
Romain 794c76c232 Copy missing VideoJS fonts (still using version 4.12.15, current is 5.16.0) 8 years ago
Romain 0c125e90df Thumbnails are back to matching the source extension for now, for compat with V1
Before changing it back, need to list the rules for extension changes. For example:

- should GIF thumbnail should be JPG, to avoid animations on the album page?
- what about transparent GIFs, will they look weird in JPG?
- maybe GIFs should stay as GIFs, but kept to a single frame only for thumbnails
- same thing for pngs, which might be better kept as PNG for transparency
- all other non-browser-friendy formats should become JPG

These rules will be a lot easier to implement when the new input data structure is in place
8 years ago
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
8 years ago
Romain 3a01c678eb Support for IPTC captions 8 years ago
Romain 4e8277b279 Improve progress bar to include ETA , e.g. "3min left" 8 years ago
Romain cc280a2180 Set the DEBUG env var to print verbose logs (including GraphicsMagick commands etc) 8 years ago
Romain 8dccb88f25 Use [exiftool-json-db] to maintain the JSON database of media files 8 years ago
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)
8 years ago
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.
8 years ago
Romain 6772e9c9d9 Fix final options for nested albums, not being passed recursively 8 years ago
Romain 7575da7474 New <footer> config setting to add a line of text (or HTML) at the bottom 8 years ago