1.0 Update

This commit is contained in:
CronyAkatsuki 2022-09-16 18:58:12 +02:00
parent 538fdc5b7d
commit b1ff88f03f
4 changed files with 14 additions and 41 deletions

View File

@ -1,33 +1,22 @@
# py-adl
My python version of the popular adl wrapper for trackma and anime downloader that currently only works for windblows 10.
I created this program because I really like the idea of the original [adl](https://github.com/RaitaroH/adl) wrapper script for [anime-downloader](https://github.com/anime-dl/anime-downloader) and [trackma](https://github.com/z411/trackma), but wasn't able to use once I got over to windows and now here I'm trying to port it to python.
I created this program because I really like the idea of the original [adl](https://github.com/RaitaroH/adl) wrapper script for [anime-downloader](https://github.com/anime-dl/anime-downloader) and [trackma](https://github.com/z411/trackma), but wasn't able to use once I got over to windows and now here I'm with a python port of it
This is not supposed to be one on one port so that it is easier on my sanity.
## Main differences
Current features:
- Choose trackma account
- retrieve list from trackma
- Choose what player to use from cli
- downloading
- watch next episode of an anime
- watch left episode
- watch all episodes
- watch custom interval
- rewatch current episode
- watch custom episode
- The script is built to be natively used on both windows and linux.
- Instead of anime-downloader I'm using [animdl](https://github.com/justfoolingaround/animdl)
This is not supposped to be one on one port because some things just arent possible to be done in windows terminals (images).
## Features
- anime tracking using trackma
- use different providers
- use multiple possible video players
- update anime meta
- use trackma for tracking your progress
- use anime downloader for streaming and downloading
- watch/download anime
There is more I wanna do, and would love to add some screenshots.
### How to install
### How to use
To be able to use this python script you need to have python installed and have trackma and anime downloader installed. To download and install anime downloader on windows you should checkout out it's [install documentation](https://anime-downlader.readthedocs.io/en/latest/usage/installation.html#windows). To install trackma you have to simply run `pip install -U trackma`.
### How to compile
I have included an compile poweshell script that allows you to compile py-adl into a executable that you can find in the **dist** folder after running it. **But you need to have pyinstaller installed on your system**. To install it run `pip install pyinstaller`.
To run the compile.ps1 script all you have to do is open an powershell window in the directory of the script and type .\compile.ps1 **or** if you don't want to run the script you can run this command in a the powershell or cmd window `pyinstaller .\adl.py --onefile --add-data 'good_title.txt;.' --add-data '.\problem_title.txt;.' --add-data '.\print_fzf.py;.'` and that will compile it on any system.

14
adl.py
View File

@ -15,13 +15,11 @@ if sys.platform == "win32":
os.getlogin()), 'Documents', 'Adl', 'config.json')
DEFAULT_DOWNLOAD_LOCATION = os.path.join(
'C:\\', 'Users', str(os.getlogin()), 'Videos', 'Anime')
CLEAR = 'cls'
else:
CONFIG_FILE_PATH = os.path.join(
'/home', str(os.getlogin()), '.config', 'adl', 'config.json')
DEFAULT_DOWNLOAD_LOCATION = os.path.join(
'/home', str(os.getlogin()), 'Videos', 'Anime')
CLEAR = 'clear'
PROBLEMATIC_TITLES = ['Komi-san wa, Komyushou desu ',
'SK∞']
@ -77,7 +75,6 @@ def color_prommpt(text):
def retrieve_list(account):
color_print(f"Running trackma retrieve for account {account}...")
subprocess.run(["trackma", "-a", account, "retrieve"])
subprocess.run(CLEAR)
# retrieve updated list
@ -85,7 +82,6 @@ def retrieve_list_update(account):
color_print(
f"Running trackma retrieve for account {account} to get the updated list...")
subprocess.run(["trackma", "-a", account, "retrieve"])
subprocess.run(CLEAR)
# load list
@ -101,7 +97,6 @@ def load_list(account):
# exit prompt
def exit_ask():
while True:
subprocess.run(CLEAR)
choice = color_prommpt("Want to watch another anime? [Y/n]: ")
if choice == "N" or choice == "n":
exit_adl()
@ -292,13 +287,11 @@ def wanna_update_title_after_watch(index, title, episode, score, download, accou
# choose what to do with episode
def choose_episode():
subprocess.run(CLEAR)
color_print(CHOOSE_EPISODE)
return color_prommpt("Your choice? [N/l/a/i/0-9/r/c/u/s]: ")
def choose_episode_specific_show():
subprocess.run(CLEAR)
color_print(CHOOSE_EPISODE_SPECIFIC_SHOW)
return color_prommpt("Your choice? [A/i/c/s]: ")
@ -329,8 +322,6 @@ def argument_and_config_parser():
help="Download instead of streaming")
ap.add_argument("-l", "--download-location", required=False,
help="Define downloads location, Default location is in 'User folder/Videos/Anime'")
ap.add_argument("-t", "--test-providers", required=False, type=bool, nargs='?', const=True, default=False,
help="Check the state of possible providers")
ap.add_argument("-v", "--version", required=False, nargs='?', const=True,
help="Display version and exit")
@ -341,11 +332,6 @@ def argument_and_config_parser():
print(f"Py-adl version {VERSION}")
sys.exit()
# check if providers are working
if args["test_providers"]:
subprocess.run(["animdl", "test"])
sys.exit()
# get provider
if args['provider']:
provider = str(args["provider"])

View File

@ -1 +0,0 @@
pyinstaller .\adl.py --onefile --add-data 'good_title.txt;.' --add-data '.\problem_title.txt;.' --add-data '.\print_fzf.py;.'

View File

@ -18,7 +18,6 @@ setup(
},
keywords=['trackma', 'animld', 'anime', 'adl', 'linux', 'windows'],
classifiers=[
'Development Status :: 4 - Beta',
'License :: GPL-3.0 License',
'Programming Language :: Python :: 3',
'Operating System :: POSIX :: Linux :: Windows'