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

magic-clipboard-folder

v0.0.1

Published

Copy the text of an image you drag into a folder to your clipboard

Downloads

4

Readme

magic-clipboard-folder

The goal of this utility is to provide a simple way to copy text from an image file to your clipboard.

Imagine the following scenario:

A client sends you an email with a screenshot and complains there is something wrong with a specific webpage. The client forgot to add a link in his email to that specific webpage. But luckily you can see the browser's address bar, only... the url is very, very long.

Instead of typing the whole thing over again, you take a smaller screenshot of the address bar part only. You drop that smaller screenshot in a magic folder on your desktop and then simply paste the whole text from your clipboard in the address bar of your own browser.

Installing

Before you begin

This utility uses the Google Cloud Vision API. So you must have a Google Cloud Platform account.

  1. Select or create a Cloud Platform project.

    Go to the projects page

  2. Enable billing for your project.

    Enable billing

  3. Enable the Google Cloud Vision API.

    Enable the API

  4. Set up authentication with a service account so you can access the API from your local workstation.

Tip: Select the role 'Owner' and use JSON as output format. Then save the file somewhere on your local machine and add the following to your .bashrc or .bash_profile:

    export GOOGLE_APPLICATION_CREDENTIALS="/full/path/to/service-account-file.json"

Next

Make sure you have Node.js and npm installed on your local machine.

And finally

    npm install -g magic-clipboard-folder

Usage

Starting the utility

Create the magic folder in a convenient place on your machine. It can be anywhere. I like to keep it on my desktop, because that is where all my screenshots go.

    cd ~/Desktop
    mkdir magic-folder

Watch that folder with this utility.

    cd ~/Desktop/magic-folder
    magic-clipboard-folder

Keep it running! You must rerun this command each time your machine reboots, but alternativly you can set it up with pm2 to start on boot.

Running the script

Finally take a screenshot of some part of the screen with some text in it (on mac command + shift + 4) and drop it in the magic folder. You will hear a system beep when the analysing by Google Cloud Vision is done. Now the text is in your clipboard and you can paste it like any other text.

Credits

Thanks to Christophe Herreman for the words "You can't really copy that because it is in a screenshot."

This is a very simple mashup script of existing npm modules, have alook at the package.json.

License

MIT