Skip to content

Commit

Permalink
� RELEASE: Restructured and built for release
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubheshDixit committed Dec 2, 2022
1 parent f8f89d4 commit 4866a19
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 16 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
![TorSearch](cli/assets/torsearch_header_big.png "TorSearch")
![License](https://img.shields.io/badge/license-MIT-blue.svg)
# torsearch

A tool designed to help in finding torrent files on the internet gracefully. Can also download files when coupled with any torrent client like qBittorrent.


## Build Using Pyinstaller

```bash
pyinstaller --noconfirm --onefile --console --icon "./assets/torsearch_logo_192.ico" --name "torsearch" --add-data "./torsearch/src/torsearch;." "./torsearch/src/torsearch/__main__.py"
```

## Usage

```bash
$ torsearch search [SEARCH_TERM] -s [SOURCE_NUMBER] -p [PAGE_NUMBER]
```
Binary file added cli/assets/torsearch_header_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cli/assets/torsearch_logo_192.ico
Binary file not shown.
Binary file added cli/assets/torsearch_logo_192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion cli/dist/.last_data

This file was deleted.

Binary file modified cli/dist/torsearch.exe
Binary file not shown.
Binary file removed cli/torsearch/dist/torsearch-0.1.0-py3-none-any.whl
Binary file not shown.
Binary file removed cli/torsearch/dist/torsearch-0.1.0.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions cli/torsearch/src/torsearch/.last_data

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from .src import cli
from torsearch import cli
from torsearch import __app_name__


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

from torsearch import (__app_name__, __version__)

from torsearch.src import torSearch
from torsearch import torSearch

from .constants import SOURCES
from torsearch.constants import SOURCES

app = typer.Typer()

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import inquirer
import clipboard
from .utils.extractor import Extractor
from .utils.downloader import get_qbit_downloader
from .utils.cleaner import screen_clear
from torsearch.utils.extractor import Extractor
from torsearch.utils.downloader import get_qbit_downloader
from torsearch.utils.cleaner import screen_clear
import json
import os
import time
Expand All @@ -21,13 +21,17 @@ def __init__(self) -> None:
self.video_list = []

def save_last_data(self):
last_det = {
'videos_list': self.video_list
}
try:
last_det = {
'videos_list': self.video_list
}

os.chdir(os.getcwd())
with open(f'{SCRIPT_DIR}/.last_data', 'w+') as f:
json.dump(last_det, f)
os.chdir(os.getcwd())
with open(f'./.last_data', 'w+') as f:
json.dump(last_det, f)
except Exception as e:
pass
# print(e)

def search(self, query: str, src: int, page: int):
if src == 1:
Expand Down Expand Up @@ -59,7 +63,7 @@ def show_current(self):
def list_last(self):
os.chdir(os.path.dirname(os.path.realpath(__file__)))
try:
with open(f'{SCRIPT_DIR}/.last_data', 'r') as f:
with open(f'./.last_data', 'r') as f:
data = json.load(f)
self.video_list = data['videos_list']
self.show_list()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time
from bs4 import BeautifulSoup
from .browser import get_browser
from torsearch.utils.browser import get_browser
from selenium.webdriver.common.by import By
import typer

Expand Down
Empty file.
2 changes: 1 addition & 1 deletion cli/torsearch/tests/test_torSearch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typer.testing import CliRunner

from torSearch import __app_name__, __version__, cli
from torsearch import __app_name__, __version__, cli

runner = CliRunner()

Expand Down

0 comments on commit 4866a19

Please sign in to comment.