-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrepos.yaml
More file actions
41 lines (36 loc) · 1.19 KB
/
repos.yaml
File metadata and controls
41 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
site: github-trending
name: repos
description: GitHub Trending repositories
domain: github.com
args:
language:
type: string
default: ""
description: "Filter by language (e.g. python, rust)"
since:
type: string
default: "daily"
description: "Time range: daily, weekly, monthly"
choices: ["daily", "weekly", "monthly"]
limit:
type: int
default: 25
pipeline:
- navigate: https://github.com/trending/${{ args.language }}?since=${{ args.since }}
- evaluate: |
(() => {
return [...document.querySelectorAll('article.Box-row')].map((el, i) => {
const name = el.querySelector('h2 a')?.getAttribute('href')?.slice(1) || '';
return {
rank: i + 1,
name,
description: el.querySelector('p')?.textContent?.trim() || '',
language: el.querySelector('[itemprop=programmingLanguage]')?.textContent?.trim() || '',
stars: el.querySelector('.Link--muted.d-inline-block.mr-3')
?.textContent?.trim() || '0',
url: 'https://github.com/' + name,
};
});
})()
- limit: ${{ args.limit }}
columns: [rank, name, language, stars, description]