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

image-importer

v2.0.9

Published

Rename and Move Image Files

Downloads

17

Readme

image-importer

Introduction

image-importer moves images to a TARGET DIRECTORY and stores them there chronologically with date and time in the folder and image name.

In this way, images from several SOURCE DIRECTORIES (and devices) can be stored chronologically sorted in one place.

Process

  • image-importer is started with the following parameters
    • 1-n SOURCE DIRECTORIES (where the images to be processed are located)
    • 1 DESTINATION DIRECTORY (where the images are to be moved to)
  • each JPG image is processed per source directory
    • first the image creation date is read from the image (Exif data)
    • then a folder is created per date in the TARGET DIRECTORY in the format YYYYMMDD
    • then the image is moved from the SOURCE DIRECTORIES in the TARGET DIRECTORY to the subdirectory YYYYMMDD
    • then the image is renamed with creation date and time in the format YYYYMMDD-HHMMSS.jpg
    • if the image already exists in the TARGET DIRECTORY, the current milliseconds are added to the name in the format YYYYMMDD-HHMMSS-SSS.jpg
    • one output is logged per image

Prerequisites

  • node (with included npm) is installed (https://nodejs.org)
  • test with
    • node -v
    • npm v

Installation

npm install -g image-importer

Usage

$ image-importer -h

Usage: image-importer [options]

Options:
  -s, --source <dirs...>  source dirs with images to process
  -t, --target <dir>      target dir for processed images to move
  -v, --version           output the version number
  -h, --help              display help for command

Example

Here the photos from the desktop + download folder are processed and moved to the photos folder.

$ image-importer --source $HOME/Downloads $HOME/Desktop --target $HOME/Photos

+----------------+
| image-importer |
+----------------+

source dirs : /Users/john/Downloads, /Users/john/Desktop
target dir  : /Users/john/Photos

processing /Users/john/Downloads
- /Users/john/Downloads/DSC01351.jpg -> /Users/john/Photos/20210106/20210106-102336.jpg
- /Users/john/Downloads/DSC01352.jpg -> /Users/john/Photos/20210106/20210106-102420.jpg
- /Users/john/Downloads/DSC01353.jpg -> /Users/john/Photos/20210106/20210106-102601.jpg
- /Users/john/Downloads/DSC01354.jpg -> /Users/john/Photos/20210106/20210106-104425.jpg
- /Users/john/Downloads/DSC01355.jpg -> /Users/john/Photos/20210106/20210106-141907.jpg
- /Users/john/Downloads/DSC01356.jpg -> /Users/john/Photos/20210106/20210106-164916.jpg

processing /Users/john/Desktop
- /Users/john/Desktop/Image01.jpg -> /Users/john/Photos/20210116/20210116-150916.jpg
- /Users/john/Desktop/Image02.jpg -> /Users/john/Photos/20210116/20210116-151308.jpg
- /Users/john/Desktop/Image03.jpg -> /Users/john/Photos/20210116/20210116-151331.jpg