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

pimatic-save

v0.2.0

Published

Save files to a backup medium

Downloads

42

Readme

pimatic-save

Plugin for saving files to backup media

With this plugin you can save files from the system Pimatic is running to a backup medium. The supported media in this release are FTP and mail.

The save of a file is done via an action rule. The medium independent action syntax is

save "[localpath/]filename" [with timestamp] to SaveFtpDevice | SaveMailDevice

The optional 'with timestamp' adds a timestamp in front of the filename. The 24-hour timestamp format is "yyyy-mm-dd_hhmmss". With 24-hour format. The filename can hold a local path and should follow the local operating system conventions (linux, windows). When adding an action the existance of the file is checked. The file needs to exist for the rule to be saved. The base of the filename is the home directory of Pimatic. For rpi thats mostly the /home/pi/pimatic-app directory. You could use directory navigation like "../.." in the filename to select files outside the base directory.

To make a daily backup during the night at 1:00 of your config.json the rule is

when 'its 1:00' then 'save "config.json" with timestamp to <your FtpOrDropboxOrMail Device>'

The SaveFtpDevice

With this device files will be saved to a Ftp server. The following device config.

host:
  description: "Url to the backup server"
  type: "string"
port:
  description: "Port of the backup server"
  type: "number"
  default: 21
username:
  description: "Username of the backup server"
  type: "string"
password:
  description: "Password of the backup server"
  type: "string"
path:
  description: "Remote path of the backup server where the config should be saved"
  type: "string"

The path is the path from the login root that is specific for your ftp account. The path needs to exist on the ftp server! When a file already exists, the old version will be overwritten!

The FTP connection is made only when a file is saved. So the presence dot will only be presence on saving a file.

The SaveDropboxDevice (NOT AVAILABLE ANYMORE)

The SaveMailDevice

With this device a file (attachement) will be saved (sent) to an email address. The following device config.

address:
  description: "Your email address"
  type: "string"
password:
  description: "The password for your email"
  type: "string"
server:
  description: "The mailserver smtp address"
  type: "string"
port:
  description: "The smtp port used, default 587"
  type: "number"
to:
  description: "The email address the mail is sent to. If empty the 'from' email is used (=address)"
  type: "string"
subject:
  description: "The optional subject for the save mail"
  type: "string"
text:
  description: "The optional text for the save mail"
  type: "boolean"

The presence dot goes present after first successful save and absent after an error in save.


The plugin is in development. You could backup Pimatic before you are using this plugin!