57 lines
1.6 KiB
Markdown
57 lines
1.6 KiB
Markdown
|
# disspam
|
||
|
|
||
|
## Scripts
|
||
|
|
||
|
### discrawl.py
|
||
|
|
||
|
Crawls the explore tab to list public repos.
|
||
|
|
||
|
### disimport.py
|
||
|
|
||
|
Parses the html downloaded by discrawl.py and saves it in an sqlite database.
|
||
|
|
||
|
### disserve.py
|
||
|
|
||
|
Serves a web interface for tagging repos as good or bad. This uses the
|
||
|
`disrepos.db` database file created by disimport.py.
|
||
|
|
||
|
Run: `flask --app disserve --debug run` (tested with Flask 2.2.2)
|
||
|
|
||
|
Display:
|
||
|
|
||
|
Repos that are marked good or bad have their first column change the background
|
||
|
color to green or red.
|
||
|
|
||
|
Repo owners with at least one bad repo are shown with a red background color on
|
||
|
all of their repos. Note that this isn't immediately applied after marking one
|
||
|
of their repos, the table has to be updated first.
|
||
|
|
||
|
The currently selected row has a yellow background color. The selection is used
|
||
|
for keyboard shortcuts that operate on a row.
|
||
|
|
||
|
The row currently being hovered with the mouse has a light pink background color
|
||
|
to make the table easier to read.
|
||
|
|
||
|
Controls:
|
||
|
|
||
|
- W: Open repo owner in new tab
|
||
|
- E: Open repo itself in new tab
|
||
|
- A: Mark as bad
|
||
|
- S: Remove mark
|
||
|
- D: Mark as good
|
||
|
- Up/Down: Select previous/next row
|
||
|
- Click: Select clicked row
|
||
|
|
||
|
The "Filter" box takes an expression to filter the table of shown repos.
|
||
|
Expressions can use the columns shown in the table. For example,
|
||
|
`!stars && !forks && desc` would show only repos with no forks or stars and a
|
||
|
non-empty description.
|
||
|
|
||
|
To match repos marked a specific way, use `flag === "notSpam"` for good repos,
|
||
|
`flag === "spam"` for bad repos and `!flag` for unmarked repos.
|
||
|
|
||
|
Feature wishlist:
|
||
|
|
||
|
- Multiple selection
|
||
|
- Hide mirrors
|