GithubHelp home page GithubHelp logo

searchlink-plugins's Introduction

SearchLink Plugins

A collection of plugins for SearchLink.

Installation

Just save any of these plugins to ~/.local/searchlink/plugins and SearchLink will add them as valid searches. You could, if you wanted to, clone the entire project to that folder with:

$ mkdir -p ~/.local/searchlink
$ cd ~/.local/searchlink
$ git clone [email protected]:ttscoff/searchlink-plugins.git plugins

If you intend to develop your own plugins or make modifications to existing ones, fork the repo first and close that to your local drive, allowing you to make pull requests from your fork.

About Plugins

All of SearchLink's searches are defined as plugins. You can duplicate any of them into the plugins folder and override default functionality, or use them as examples for developing your own.

Plugins

Calendar

Another example of a text filter. This one can insert a Markdown calendar for any month and year. You can define the month and year like !cal 5 2024 to get a calendar for May, 2024. If you use !cal now it will insert a calendar for the current month and year. It can also print how many days are in a month with !days 2 2024 to show how many days are in February, 2024. Silly, and would probably be better as a TextExpander snippet, but I'm just experimenting with extending SearchLink.

Custom Google

This plugin demonstrates adding your own custom search engine through Google. Create a custom engine here to search specific pages/sites, then modify the plugin according to the comments at the top to create your own custom site search.

Requires a Google API key.

IMDB

This plugin uses a custom site search from Google Programmable Search to search IMDB, actors, or titles. Just another demo of how to use custom engines to create plugins. Requires a Google API key.

Adds searches !imdb, !imdba (actor search), and !imdbt (tv/movie title search).

Lyrics

This plugin will search https://genius.com for a song, returning either a link (!lyric) or embedding the actual lyrics (!lyrice). It demonstrates both search and embed functionality, and is fully commented to serve as an example plugin.

MakeADate

This is a port of a TextExpander snippet I use. It takes a natural language date and inserts a formatted date. It provides the following formats:

Abbr Result
!ddate tomorrow 8am 2023-11-02 8:00am
!dshort tomorrow 8am 2023-11-2 8:00am
!diso tomorrow 8am 2023-11-02 08:00
!dlong tomorrow 8am Thursday, November 2nd, 2023 at 8:00am

This plugin requires that PHP be installed on the system, either with the Apple Command Line Utilties (I think), or with Homebrew (brew install php).

ManPage

This plugin searches mapages.org for a matching command and returns the url, including command name and man section, e.g. https://manpages.org/lsof/8, as well as a title with a brief description of the command. So running SearchLink on !man lsof would return [lsof](https://manpages.org/lsof/8 "lsof (8): list open files"). If the search term contains multiple words, they'll be parsed individually until one of the words gets at least a partial search result, the shortest of which will be used.

MixCase

This plugin is a text filter that will turn !mix A string of text into A STRInG of TExT, randomly capitalizing characters. It's just to demonstrate how easily a text filter can be implemented.

Contributing

Use the sample code in lyrics.rb (documented in the SearchLink wiki) to generate your own plugins. Feel free to fork and submit a PR to this repository if you create something you'd like to share!

searchlink-plugins's People

Contributors

ttscoff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.