Giter Club home page Giter Club logo

spyglass's Introduction

Spyglass

tl; dr: Spyglass is a search platform that lives on your device, indexing what you want, exposing it to you in a super simple & fast interface.

⚠️ Spyglass is very much in its early stages, but it’s in a place where it's functional and can be used to replace basic searches. ⚠️

Installation

Stable compiled builds are provided on the releases pages. Download the appriopriate file for your OS (e.g. .deb for linux, .dmg for macOS and .msi for Windows)

If you're interested in building from source, after checking out the repository run the following:

make setup-dev
make build-release

Spyglass in action

Once launched, press Cmd + Shift + / to open Spyglass. Queries prefixed with / will search through your installed lenses, otherwise it'll search through your index.

Use the arrow keys to select the result you want and hit Enter to open the link in the browser of your choice!

Spyglass in action!

Why Spyglass?

Spyglass is a solution to address the following common issues when searching the web.

  • Do you add terms such as reddit or wiki to your searches to narrow it down?
  • Do you skip over a full-page of ads before getting to your actual search results
  • Do you scroll past dozens of SEO spam pages to find the recipe/review/blog post you were looking for?
  • Do you get frustrated with overzealous autocorrect on your search terms?

How does it know what to crawl?

Spyglass expands on the ideas outlined in this paper by the Brave Search Team.

You can add different lenses that clue the application into what you want to have indexed. Here are some examples that I've been personally using:

Curated recipe searching

Interested in cooking & recipes? Add a "recipe" lens which will go index a curated set of websites with high quality recipes.

(
    version: "1",
    name: "recipes",
    description: Some(r#"
        A curated collection of websites with useful, high-quality recipes.
    "#),
    domains: [

        # Major sites that often have really good recipes
        "www.seriouseats.com",
        "cooking.nytimes.com",
        ...

        # Specific cuisines/sites that I've found randomly w/ high-quality recipes
        "www.hungryhuy.com",
        "www.vickypham.com",
    ],

    # Not yet supported but ideally more ways to filter URLs within a domain
    urls: [
        "www.reddit.com/r/recipes/*",
    ]
)

Narrowing down by a specific topic

Interested in the Rust programming language? Add the "rustlang" lens which will index the Rust book, rust docs, crate.io, and other sites that are related to the programming language and not the Rust game / The Rust Belt / oxidation / etc.

(
    version: "1",
    name: "rustlang",
    description: Some("Rustlang targeted websites"),
    domains: [
        # Support for wildcards in domain names
        "*.rust-lang.org",
        "docs.rs",
        "rustconf.com",
        "crates.io",
        "this-week-in-rust.org",
        ...
    ],

    # Again not yet supported but an example of indexing specific communities that
    # are relevant to the topic
    urls: [
        "www.reddit.com/r/rust",
        "www.reddit.com/r/rust_gamedev",
        "https://github.com/topics/rust"
    ]
)

Settings

The settings.ron file can be found by "Show Settings folder". If there is no file found in their directory on startup, a default one will be created.

(
    # The max number of pages to index per domain
    domain_crawl_limit: Finite(1000),
    # The max number of crawlers per domain
    inflight_domain_limit: Finite(2),
    # The max number of crawlers in total
    inflight_crawl_limit: Finite(10),
    # Not used... yet!
    run_wizard: false,
    # Not used... yet!
    allow_list: [],
    # Domains to completely ignore.
    block_list: [
      "web.archive.org",
      "w3schools.com"
    ],
)

spyglass's People

Contributors

a5huynh avatar joelcourtney 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.