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

hubot-googledrive-search

v3.0.2

Published

Google drive search for hubot!

Downloads

4

Readme

hubot-googledrive-search

Search your google drive with hubot! Authentication handeled by hubot-google-auth.

Installation

  • In your project repo run:
    npm install hubot-googledrive-search --save
  • Then add the follwing to your external-scripts.json:
    [
      'hubot-googledrive-search'
    ]

Configuration

This script requires you to generate oauth2 credentials for the drive account that you want hubot to be able to access. Currently this scipt is configured to give hubot access to all of drive (the specific scope used is: 'https://www.googleapis.com/auth/drive').

  1. Generate a client secret.json file by following step 1 here
  2. Set these required environemnt variables (found in your client secret.json file):
    • HUBOT_DRIVE_CLIENT_ID**="your_client_id"
    • HUBOT_DRIVE_CLIENT_SECRET**="your_client_secret"
    • HUBOT_DRIVE_REDIRECT_URL**="the_first_uri_in_the_list"
  3. Load the script and attempt to interact with hubot. You will have to authorize the app to get your inital token and refresh token. The script will then store the refresh token in the hubot brain for future use, so this process should only need to be done once. Here's a sample initial interaction:
user>> @hubot drive search title= My Cool File
hubot>> Authorize this app by visiting: https://google.com/some_thing_with_your_client_info
        Then use @hubot drive set code <code>
user>> @hubot drive set code 123412351235
hubot>> Hubot drive code successfully set!
user>> @hubot search title= Cool File
hubot>> 1.) This is a Cool File
		https://google.drive/1234h123h4123h
        2.) Some Cool File
        https://google.drive/qwer1353451asfds

Features

This script can be used to search your drive in a variety of ways:

  1. Use a google query string to search drive. Find information on query strings here: https://developers.google.com/drive/v2/web/search-parameters
user>> @hubot drive search query= fullText contains 'important' and trashed = true
  1. Use either a title and/or a contains parameter. Equivalent query string shown below each example.
user>> @hubot drive search title= My Cool File
#equivalent to:
user>> @hubot drive search query= title contains 'My Cool File'

user>> @hubot drive search contains= This is the coolest file ever
#equivalent to:
user>> @hubot drive search query= fullText contains 'This is the coolest file ever'

user>> @hubot drive search title= My Cool File contains= This is the coolest file ever
#equivalent to:
user>> @hubot drive search query= title contains 'My Cool File' and fullText contains 'This is the coolest file ever'

Notes

Since hubot needs to use the redis brain to store the drive tokens and expiration time make sure that the following keys don't conflict with any other keys being used in the brain:

'HUBOT_DRIVE_GOOGLE_AUTH_TOKEN'
'HUBOT_DRIVE_GOOGLE_AUTH_REFRESH_TOKEN'
'HUBOT_DRIVE_GOOGLE_AUTH_EXPIRE_TIME'