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

s3-cloud

v0.1.3

Published

Poor man's cloud, backed on S3

Downloads

6

Readme

s3-cloud

Poor man's cloud, backed on S3.

This tool allows to synchronize, manage and share files on an S3 bucket as well as render Markdown documents as PDF files for administrative communication.

It uses s3cmd for all AWS API calls (it is intended as a convenience tool, not a breakthrough in any way). It is expected s3cmd has been configured first.

Below, the notion of endpoint is defined as an S3 URL; it translates to a local path as follows for swift handling:

  • s3://my-bucket/documents: ~/Documents

Commands

  • push
  • pull
  • sync
  • delete
  • share
  • render

push command

Push objects to an S3 endpoint.

Options:

  • -d, --delete: allow object deletion

Sample usage:

s3-cloud push s3://my-bucket/documents

pull command

Pull objects from an S3 endpoint.

Options:

  • -d, --delete: allow object deletion

Sample usage:

s3-cloud pull s3://my-bucket/documents

sync command

Synchronize objects with an S3 endpoint (pull and push).

Options:

  • -d, --delete: allow object deletion

Sample usage:

s3-cloud sync s3://my-bucket/documents

delete command

Delete an object on an S3 bucket.

Sample usage:

s3-cloud delete s3://my-bucket/documents/test.pdf

share command

Generate a sharing link for an S3 object.

Options:

  • -e, --expire: set link expiry time, eg. 7d

Sample usage:

s3-cloud share s3://my-bucket/documents/test.pdf -e 7d

render command

Render a Markdown file as a PDF.

Options:

  • -p, --preview: automatically preview document
  • -t, --timestamp: timestamp PDF file
  • -s, --css: CSS stylesheet
  • -f, --format: paper format, eg. A4 (default)
  • -m, --margins: paper margins, eg. 2cm (default)
  • -o, --orientation: document orientation

Sample usage:

s3-cloud render s3://my-bucket/documents/test.md -p

Markdown rendering supports custom classes through annotations (eg. {right}); here are some classes defined in the default CSS:

  • right: align a block of text on the right-half of the page
  • letter-indent: add 3em worth of indentation for the first line in paragraphs
  • t-2 to t-10: add 2 to 10 em worth of top margin
  • b-2 to b-10: add 2 to 10 em worth of bottom margin
  • l-pad-1 to l-pad-3: add 1 to 3 em worth of left padding
  • signature: limit an image's width to 10em
  • pull-right: make an element float to the right
  • break: insert a page break before an element
  • centered: centered text
  • light: lighter gray text
  • small: smaller texter (0.9em)
  • cv: set of stlye changes designed to make writing a CV possible, specifically it sets a smaller font size, resets title boldness and adds a border under level 2 titles

It also contains rules for links, code, citations, tables and horizontal rules.