First run of torrents.

This commit is contained in:
Dessalines 2018-10-04 23:24:29 -07:00
parent 69b8241af7
commit f4e74e4cb0
3 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,7 @@
An *upload*, consists of making a pull request after running the `add_torrents.sh` script that adds your new unique torrents to the file, after checking that they aren't already there, and that they have seeders. An *upload*, consists of making a pull request after running the `add_torrents.sh` script that adds your new unique torrents to the file, after checking that they aren't already there, and that they have seeders.
To find torrents run `./find.sh "SEARCH"` To find torrents run `./search.sh "SEARCH"`
To contribute: To contribute:
- [Click here](https://gitlab.com/dessalines/torrents.csv/forks/new) to fork this repo. - [Click here](https://gitlab.com/dessalines/torrents.csv/forks/new) to fork this repo.

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Checking arguments # Checking arguments
# Help line # Help line
torrents_csv="`pwd`/torrents.csv" torrents_csv="`pwd`/torrents.csv"

View File

@ -1,6 +1,7 @@
torrent_csv_file="`pwd`/torrents.csv" torrent_csv_file="`pwd`/torrents.csv"
search=$(grep -i "$1" $torrent_csv_file) search_string=${1// /.*} # turn multiple string regexes into i.*am.*spartacus
search=$(grep -i "$search_string" $torrent_csv_file)
# Sort results by seeders # Sort results by seeders
search=$(echo -e "$search" | sort --field-separator=';' --key=5 -g) search=$(echo -e "$search" | sort --field-separator=';' --key=5 -g)