New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] parser-friendly stdout #24
Comments
Actually, ainsi seem to make the program crash when calling from
From what I gather, this line is responsible for crashing, and I think it's because of the color formatting? I'm not sure how to find a workaround for that. Should I raise the issue in https://github.com/justfoolingaround/animdl-install? EDIT - Found how to work around that, using |
Added by default. All the values shown in the To make things easier, I've added a This has been pushed to the unstable version (the non-packaged repo) atm and will be pushed to the packaged repo soon.
Ah, that's great to know! |
That's great, that was fast! Could I abuse and ask if it's possible to do the same for I tested |
So, I've added an In case of One Piece, the auto would've just selected the dub version which isn't ideal for most use-cases; hence, using a index would make selecting easy from queries (1; or second item would be the sub one). Keep in mind that the index is a programmer's index so 1 will be equivalent to the second item. Not sure if I even have to mention this xd. |
Also, for the record, these all features are added to all the major commands so yeah, you can avoid the colored stuff and the query selector in those commands ( |
Alright, that's good enough for me. Thanks a lot! I'll probably publish my wrapper and the app I'll make in a few weeks. |
Hey, It's me again! I've discovered while working on it that the I was going to just parse the output (and not use
This is more convenient because, from a query, I can actually get a list of matching animes and their URL, so the user can chose the one they want (same problematic you solved with Alternatively I could make the search with an external API (eg. AniList) but the names are not the exact sames so it's not reliable. TL;DR: I'd like the user to be able to search for an anime, select one, and after use the corresponding link (ie. |
I think I'll add a |
Ah, that seems perfect. 👍 |
Added. I kinda separated the provider argument; you can get the output you desire by using animdl.py search "one piece" --json --quiet Don't worry about 2 calls making your wrapper or normal usage inefficient. The search done by other commands is ignored if the url matches hence, there won't ever be any unnecessary calls. |
You're so fast, this is exactly what I needed. Thanks again! |
Hey,
First - amazing work. I'm very impressed by the efficiency of
animdl
.I have a request, which I would have PR'd myself if only I knew Python, but I believe it's reasonable enough to still ask.
I'm going to make a wrapper around
animdl
for my own usage, and I'd love to avoid having to parse the CLI output. I was thinking that, given a flag, something like--json
, all the output could be just JSON.Ideally, commands like
animdl test
,animdl grab "one piece"
oranimdl grab https://9anime.to/watch/one-piece.ov8
would only output JSON, without color or formatting (though that last command is pretty close).To be clear, I can totally parse everything even now, I just think it'd be very nice to have a reliable way to do so.
The text was updated successfully, but these errors were encountered: