Last active
June 30, 2017 10:22
-
-
Save toomasv/daa58f96e6d113af8bd32b59745f0942 to your computer and use it in GitHub Desktop.
Find recent feats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: {Find recent feats} | |
Usage: {`feats 30` -- find 30 latest feats | |
`see 5` -- see 5th feat's code | |
} | |
Needs: {To improve readability you can use `to-columns` | |
(https://gist.github.com/toomasv/464bd3bc775b75ce734bebf6d7aca190) | |
} | |
] | |
context [ | |
pages: func [n][n + 9 / 10] | |
github: https://github.com | |
feats-page: https://github.com/red/red/search?o=desc&q=FEAT%3A&s=committer-date&type=Commits&p= | |
do %to-columns.red | |
feats-blk: clear [] | |
set 'feats func [num /local ord][ | |
ord: 0 | |
feats-blk: clear [] | |
repeat n pages num [ | |
parse read append copy feats-page n [ | |
some [ | |
thru {<em>FEAT</em>: } copy feat to {</a>} | |
thru {<p class="f6 text-gray mt-1">} thru {">} copy author to {</a>} | |
thru {<relative-time datetime="} copy date to {T} | |
thru {<div class="commit-links-group} thru {<a href="} copy href to {" class} | |
(append feats-blk reduce [ord: ord + 1 date author feat href]) | |
] | |
] | |
] | |
to-columns feats-blk [a b c d e] [pad/left (to-string a) 3 " " (b) " " pad (c) 10 " " (d)] | |
;foreach [a b c d e] feats-blk [print [a b c d]] | |
] | |
set 'see func [num][browse append copy github fifth find feats-blk num] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment