Code Monkey home page Code Monkey logo

metasearch's Introduction

Metasearch

Metasearch is a tool for searching many other tools in parallel:

Metasearch screenshot

The full list of supported data sources:

Setup

Using Docker

  1. Download and customize config.yaml
  2. In the local directory that contains config.yaml, run docker run -p 3000:3000 -v "$PWD:/data" duolingo/metasearch

Using Git, Make, and Node.js

  1. Clone this repo and customize its config.yaml
  2. Run make

Metasearch runs at http://localhost:3000.

Contributing

Want to search something like SharePoint or MediaWiki that isn't currently supported? This repo is only around 3000 lines of TypeScript, and adding support for a new data source requires fewer than 100 lines on average. Feel free to open a PR!


Duolingo is hiring! Apply at https://www.duolingo.com/careers

metasearch's People

Contributors

artnc avatar d-rk avatar dependabot[bot] avatar dlh3 avatar jimmatthews avatar josealvarez97 avatar jrarmstro avatar michael-peng-hs avatar nobishino avatar radaduolingo avatar spacephoton avatar tobymellor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metasearch's Issues

Possibility of implementing new engines

Is the project open to receive new engine implementations?

I thought about adding a feature flag to enable / disable engines.

New Engine Suggest:

  • Google Workspace
  • HubSpot
  • Outline - Open Source Knowledge Base for Teams
  • Google Calendar
  • Gmail
  • Google Vault
  • New Relic
  • BambooHR
  • Lever
  • ToriiHQ
  • Sentry
  • Opsgenie
  • Thinkfic LMS
  • GitLab (done #19)
  • BitBucket
  • CircleCI
  • TracisCI
  • Satismeter
  • Outlook
  • Fyipe - Monitor Services and Log Aggregation
  • Mattermost (done #20)

Sourcegraph will be very useful

Adding sourcegraph may cover not only Github but also packages published on npm which may be developed not only on Github

docker build fails because of a memory issue

docker build . fails and outputs the following logs:

> [4/4] RUN make build:                                                                                                                            
#9 0.220 Installing NPM dependencies...                                                                                                             
#9 5.815                                                                                                                                            
#9 5.815 > [email protected] postinstall /code/node_modules/ejs                                                                                             
#9 5.815 > node --harmony ./postinstall.js                                                                                                          
#9 5.815 
#9 5.880 Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
#9 5.880 
#9 5.938 added 205 packages in 5.074s
#9 5.958 Compiling TypeScript...
#9 28.04 
#9 28.04 <--- Last few GCs --->
#9 28.04 
#9 28.04 [29:0x5d5c160]    21532 ms: Mark-sweep (reduce) 989.7 (994.4) -> 988.9 (995.4) MB, 540.9 / 0.0 ms  (average mu = 0.102, current mu = 0.032) allocation failure scavenge might not succeed
#9 28.04 
#9 28.04 
#9 28.04 <--- JS stacktrace --->
#9 28.04 
#9 28.04 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
#9 28.05  1: 0xa04200 node::Abort() [node]
#9 28.05  2: 0x94e4e9 node::FatalError(char const*, char const*) [node]
#9 28.05  3: 0xb7978e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
#9 28.05  4: 0xb79b07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
#9 28.05  5: 0xd34395  [node]
#9 28.05  6: 0xd34f1f  [node]
#9 28.05  7: 0xd42fab v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
#9 28.05  8: 0xd46b6c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
#9 28.06  9: 0xd1524b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
#9 28.06 10: 0x105b23f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
#9 28.06 11: 0x1401219  [node]
#9 28.33 Makefile:34: recipe for target '_ts' failed
#9 28.33 make: *** [_ts] Aborted
------
executor failed running [/bin/sh -c make build]: exit code: 2

Reprodusible steps

  • git clone
  • cd metasearch
  • docker build .

I expect the build to succeed, but it fails.

Environment

  • Mac OS Big Sur(11.2.3)
  • Architecture: amd64

output of docker version:

docker version
Client:
 Cloud integration: 1.0.17
 Version:           20.10.8
 API version:       1.41
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:55:20 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.8
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.6
  Git commit:       75249d8
  Built:            Fri Jul 30 19:52:10 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.9
  GitCommit:        e25210fe30a0a703442421b0f60afac609f950a3
 runc:
  Version:          1.0.1
  GitCommit:        v1.0.1-0-g4144b63
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

A possible way to avoid the issue

I could avoid this issue by adding NODE_OPTIONS=--max_old_space_size=4096 environment variable to the Makefile (or Dockerfile) like this commit.

I wonder if this is the right way to go. (If so, I'd like to create a PR.)

jenkins with auth?

The Jenkins engine assumes jobs are searchable as anonymous - jenkins is often setup to require authentication.

Skipping A Circle By A Test

Hi, Duolingo! How are you?
I didn't get a respond from you to my letter that I sent at the beginning of the year through Duolingo's website, therefore I will try to approach you here. Thank you in advance!
In this letter, I wish to ask to bring back the feature of skipping a circle of lessons by a test (or by one lesson). I am a "Super Duolingo" user and, unfortunatelly, with your last major update I stopped to use Duolingo, because it started to be too tedious and anoying. It is mentally unbearable to return to the same words a thousand times during one circle, while I already remember perfectly all the words of the circle. If one is a fast learner, you tottaly missed him with the slow pace that you are offering in the app. I need to finish faster and I am willing to pay for it. Please allow this skip explicitly with the button (witch you already had in the past - and it was the main reason to buy the Super package, see attached file).
The option to skip several circles with the "Jump here" option dous not resolve the issue and it is an overkill for me, I don't want to skip several circles, I wish to finish the circle in one lesson.
Please please please, bring this option back! Unfortunatelly, if it will remain this way, I will have to cancel my subscription, because there is no gain for me with the current setting.
Thank you a lot in advance!
Attached: the place where the button I talked about was placed in the previous vesrions.
Post Scriptum: If this repository is not releveant to the app's developers team, I will be very happy if you could help and to transfer this message to them. Thank you a lot 🙏
photo1700472730

Notion engine is not working—assumes the wrong format in Notion API response

There follows an example response of a POST request to the the Notion API (https://api.notion.com/v1/search). (You may reproduce it by adding console.log(result); to the callback in line 59 of notion.ts.)

{
  object: 'page',
  id: '452e4692-996d-4db0-a692-ee3446ffcd8d',
  created_time: '2022-03-02T00:49:00.000Z',
  last_edited_time: '2022-03-02T00:49:00.000Z',
  created_by: { object: 'user', id: '846fba0f-3f02-49ec-89f7-245a2b2e87c2' },
  last_edited_by: { object: 'user', id: '846fba0f-3f02-49ec-89f7-245a2b2e87c2' },
  cover: null,
  icon: null,
  parent: { type: 'page_id', page_id: 'ba228e9f-0248-42e5-8f80-0c20e29332dc' },
  archived: false,
  properties: { title: { id: 'title', type: 'title', title: [Array] } },
  url: 'https://www.notion.so/Test-452e4692996d4db0a692ee3446ffcd8d'
}

However, if we look carefully at lines 60-62 of notion.ts, we will realize that the current code is assuming the wrong format.

        const title = result.properties.Name
          ? result.properties.Name.title[0]
          : result.properties.title && result.properties.title[0];

There is no Name key in properties, but this is validated in the code. Still, the alternative result.properties.title[0] cannot be accessed because the real structure is result.properties.title.title[0].

The unfortunate consequence is that the callback (see line 63 of notion.ts) will fail because titles will be undefined. This will lead the search engine to always report 0 results.

I suggest modifying the Page interface to resemble the real structure. (Otherwise, the TypeScript compiler will complain saying that Property 'title' does not exist on type 'RichText[]'.)

interface Page {
  object: "page";
  id: string;
  last_edited_time: string;
  properties: {
    Name?: {
      type: "title";
      title: RichText[];
    };
    /*title?: RichText[];*/ // Current code
    title?: { // Suggested change
      type: "title";
      title: RichText[];
    };
  } & { [propertyName: string]: string };
}

Then, we will be able to query our Notion workspaces! 😃

image

P.S. This is such an amazing tool by the way! 💯 I was going to add support for other engines (e.g., Evernote or Google Calendar), but I stumbled upon this issue while I was trying to test it for the first time on my own Notion workspaces.

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.