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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lsc-labs/node-red-contrib-autodocstorage

v1.0.4

Published

Automatic document storage system

Readme

LSC Autodoc Storage

The Autodoc Storage modules will help you to store documents based on their content and naming. The Stirling services are used to read the content of PDF files, but you can use also other mechanism to extract the documents text.

In all nodes, the msg.payload contains the filename that is processed. The message object will be enriched with the text content of the document and properties depending on the content of the file.

Usage example

A workflow for a "pdf document" could be:

  1. Monitor a directory for a droped/new document.
  2. Lock the document - so no further triggers could appear.
  3. Set some fixed properties, like own department name or storage base paths.
  4. Extract the text of the document, to be used for further analyzing. (If no text could be found, enrich the document with text by using the OCR scan Node and repeat this step.)
  5. Set the auto properties, like languages, date / time of file and document content.
  6. Search properties by using regular expressions to find information like "invoice" or company names.
  7. store the document by using the found properties.
  8. Unlock the file - and delete or move the document, if not needed any longer.

The message object

The following elements will be used in the message object while processing.

element|type|content :--|:--|:-- |payload|string|holds the name of the source file to be processed. |textContent|string|OCR parsed document content as string. (Available after read PDF text). |textProperties|map[name,value]|Properties found, while processing the flow. |lastMatchContent|string|Partial text of textContent (last search of a regular expression).

Available nodes

node|short|objective :--|:--|:-- "lock file"|Locks and unlocks the source file|Avoid unexpected removement and supress additional flow triggers. Only when a file has no lock, it can be removed (default) "set props"|setting props|Fixed properties can be set, depending on the flow (i.E.) "Input=CommonArea" "search props"|searching props|Context specific properties, like parts of the filename or the file content. Can search for existing and non existing entries. "auto props"|Automatic props|Set default properties. The language (ENU, DEU, ISO) and timestamp of the document and file can be detected. "read PDF"|read pdf text|Extracts the text of a pdf document. (Needs Stirling Service in place) "ocr scan"|read/scan pdf text|Initiates a OCR scan on a pdf document and extracts the text. Can replace the input file with an enriched version. You should use this node, after "read PDF" can not detect a valid text. (Needs Stirling Service in place) "build PDF"|build a PDF file|Builds a new PDF file from one or more picture (jpg, png). The PDF does NOT contain a valid text, so you should use "scan PDF" after creating. (Needs Stirling Service in place) "store File"|store the file|Store the input file in a location by building the target path and name based on the properties found.

Properties

When setting text properties, you can reflect already existing properties, using the syntax $(propertyname)

If the property does not exist, the result will the string $(propertyname). This is usefull, if you want to define the propertyname in a later step.

Conditional setting of a property

Setting|Result :--|:-- $(propertyname??)|The value will be empty, if the propertyname does not exist $(propertyname?value1:value2)|If propertyname exists, the result will be value1, otherwise value2. Instead of using a static text, you can also use a property by adressing with the same syntax $(otherproperty).

Test cases

In the folder "examples" you find a sample workflow with some test cases for the node, so you can get familiar with it.

See: "Test cases"