Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Search: how to search in multiple languages

Tags:

github

search

Github search supports:

<keyword> language:javascript

But I want something like:

<keyword> language:javascript OR language:typescript

So that I can sort them by stars or do other filters in a single search.

The reason is: with typescript becomes more and more popular each day, single filter with language:javascript is not enought anymore.

like image 606
GutenYe Avatar asked Jun 14 '17 03:06

GutenYe


Video Answer


1 Answers

You can do it in the command line by using github Api by a + symbol:

curl "https://api.github.com/search/repositoriesq=$guitar-scales+language:"javascript"+language:"typescript"&per_page=100&page=$i" | jq ".items[] | {name, language}"

And here is a sample from the search result:

{
  "name": "react-boilerplate",
  "language": "JavaScript"
}
{
  "name": "electrode",
  "language": "JavaScript"
}
{
  "name": "claygl",
  "language": "JavaScript"
}
{
  "name": "mean",
  "language": "TypeScript"
}
{
  "name": "rapidpro",
  "language": "JavaScript"
}
{
  "name": "react-native-scaling-drawer",
  "language": "JavaScript"
}
like image 114
bourehim youssef Avatar answered Sep 16 '22 15:09

bourehim youssef