npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

life-diary

v0.3.5

Published

Life Diary ❤️ your albums, your journey, your data

Downloads

100

Readme

Life Diary ❤️

your albums, your journey, your data

Youtube Showcase

About

Storing images in the cloud, or in our favorite social, is awesome, but it comes with a price:

  • there's likely some lost data when images get optimized for the Web
  • the backup from the cloud is rarely well organized / easy to surf, or it rarely contains our original content as is
  • images and places are not always related or shown in a map
  • there is a cross platform friction when changing phone, laptop, or Operating System
  • surfing media content online is great only if we have great connettivity

As I love to travel, and organize folders / albums with all relevant pictures, I wanted to create a very simple, Web based, intranet oriented service, able to upload, surf, describe, and show map related details within my local home network, and this is all this project is about: keep your albums, journeys, and original data, within your own home hard disk, 'cause sharing is great, but caring about proprietary videos and pictures is also important.

So here I am, with a tiny utility that works even on a Raspberry Pi, as long as its SD Card has a lot of space, or its external HD is capable and fast enough, but literally any Linux, macOS, or Windows based device, with NodeJS support, should work out of the box, as long as requirements are met.

Requirements

This project requires an exiftool executable in the system.

After a lot of investigation, I've decided this is the best way to go, also for the following reasons:

  • EXIF related modules are mostly all old, unmaintained, broken, or shipping old versions of the exiftool
  • every more updated module, uses exiftool behind the scene anyway, so I prefered not to have a "man in the middle" for something deadly easy to install in every Linux distribution, but also in any macOS or even Windows, if that's your cup of tea

Optional Requirements

If ffmpeg is available, Life Diary will convert .MOV files into .mp4, meaning that these kind of files might take very long time to be processes, in case the original .MOV is a big one.

To avoid converting these files use the --no-ffmpeg flag, but keep in mind not every browser might be able to show .mov files.

Try it ❤️

Once exiftool is reachable through the command line, and assuming nodejs and npm are installed, choose any readable/writable folder in any of your hard disks, and bootstrap life-diary through the following terminal command:

npx life-diary ~/MyDiary

If everything was OK, the terminal should show something like this:

Life Diary ❤️
 version  x.x.x
 visit    http://192.168.1.123:8080/
 folder   /home/my-name/MyDiary

At this point, it should be possible to reach the http://192.168.X.X:8080/ IP address, by typing it in any modern browser URL bar.

We can start creating new albums, and upload as many files at once we'd like, and once these files are uploaded, the album starts to populate itself with content, either images or videos, and per each content, it allows to add a title or a description.

It is possible to delete content too, or to visualize it fullscreen, by simply clicking the image or video.

If there was some EXIF data associated to such media, a Map symbol should appear on the top corner of the screen, and clicking it will show the location where such image was taken, and once in fullscreen mode, it is possible to navigate the album by clicking right or left arrows, and it's always possible to exit from fullscreen by typing the Escape key.

Instructions

  • create a new album by giving it a name
  • upload one or more picture/video to the album using the input field
  • edit title and description of each media, when needed or appropriate
  • show fullscreen images or videos
    • use right or left arrow keys to navigate the album, swipe otherwise
    • click the map button to see Geo location data
    • use rightclick do add, or update, Geo location data
    • use right or left arrow keys to navigate in map mode or click the map button again to close the map
    • exit fullscreen by either pressing Escape or, on Safari mobile, by double clicking when not on map
  • go back home through the 🏡 button

Features

To know features and options, try npx life-diary --help, and this is a summary:

  • optional basic realm protection for either viewing and editing albums, or only to edit, so that guests can see but they won't be able to edit/delete anything.
  • unlimited files upload at once, as long as there is enough disk space and your network is fast enough to handle that (also server side RAM and swap might be relevant for big uploaded files)
  • optimized images previews for a quick scan through the album
  • unmodified images and videos qualities for enjoying these in full screen
  • interface (ugly but ...) 100% keyboard navigable, everything should be a Tab away
  • automatic adoption of foreign folders already containing images or videos (currently in beta, please provide cleaned up folders)
  • automatic EXIF data extraction, and possibility to associate data to any entry (currently title and description)
  • automatic Map discovery when EXIF data exists, and its Geo coordinates can be converted, modified, or saved
  • it is possible to provide a custom tile server, whenever you have one running locally, and/or a custom attribution

Most importantly, the content is always local, and beside the Map feature, everything should run out of the box within a local network, without ever requiring access to the Internet.

What is still missing

To start with, I am not a designer, so that I'd love to have some help improving the layout in any possible way, but techincally speaking, these are the future achievements I'd like to unlock in the future:

Client Side

  • I've made it work, I've made it (kinda) fast, now I need your help to make it beautiful
  • add a heart icon to fave pictures or videos (once favorties BE is in place)

Server Side

Mostly all functionalities are in, but there could be streatch goals, as example:

  • add a Fevorites album that will show only favorites pictures or videos
  • store most basic info per file into SQLite, so that it's possible to query the whole database without crawling each folder
  • maybe order by creation time, instead of name ...
  • maybe add a search per title, description, and/or country, within the home page ...
  • and maybe * provide a GET end point to download an album as .zip folder, so that a single album can be used for any other purpose (is this useful though? the folder is already in the drive)

If you have an other suggestion for either client or server side, I'm listening!

Compatibility

This project is a showcase of modern Web technologies and JS features, and a modern browser is mandatory, as nothing in here will ever see the light on the Internet, and nobody uses IE with phones, PCs, or laptops at home.

In few words, evergreen browsers are the only goal of this project, so be sure your browser is up-to-date.

As a rule of thumbs, if your browser doesn't support dynamic import(...) change phone, or update your browser, or use somebody else device.

However, if your browser supports dynamic import(...), and something doesn't work, please file a bug, mentioning the model, browser version, how to reproduce the issue, etc, thank you!

Credits

This project wouldn't be possible without the amount of awesome Open Source projects I've used to make it, including:

  • Leaflet map, and OpenStreetMap
  • the NoSleep helper, which I hoped I wouldn't need, but then again the wake lock API doesn't work via HTTP, even if it's your own private network. Please note this module is enabled/disabled only during the upload, to prevent your phone to fall asleep and stop uploading data ... an awesome Web shenanigan if you ask me but ... hey, we can't have it all
  • the #sharp module that I've been using in various of my projects too: it's just awesome
  • the other NodeJS related modules around Epxress, which might not be the fastest thing out there, and yet it made the development of this project a pleasure: thank you!
  • Social media photo by Carli Jeen on Unsplash