Closed Baitinq closed 5 years ago
Actually I am not sure why that happens. And is not a fzf issue, seems to be something else.
trackma list
Results into a table as wide as your terminal.
Doesn't look the same and it gets cut:
tlist=$(trackma list) #or tlist=`trackma list`
echo "$tlist"
trackma list > list.txt
cat list.txt
or
trackma list 1> list.txt
cat list.txt
{ tlist=$(trackma list | tee >(cat - >&5)); } 5>&1
exec > >(tee -ia script.log)
trackma list
Should we maybe ask that question on a forum? Because it is indeed super weird
Well I did try anything I thought of. I also looked on the trackma issues but honestly didn't find anything. I am starting to think this might be a trackma list
thing rather than a bash thing. I even run zsh by default so I really have no idea.
I will open a trackma issue but I don't have my hopes high.
Maybe there is some weird character in the trackma list output that makes it do that.
I will install trackma-git
from the AUR and see.
Also OMG I have my very own entry in the AUR... by you. Thx.
Nope still the same. Actually exact same version 0.8.2 between git and pip.
@Baitinq I opened the issue as I said. I also have nr 453 as well because trackma has an issue where the missing dot for entry 1 is enough to throw an error. As you know adl strips those dots for processing.
Yea hahah I like to have all the programs I use in the aur
Ill comment on the issue now to try and make it more visible. Thanks
@Baitinq you will also be affected by https://github.com/z411/trackma/issues/453 if you have an anime ending with a .
Okay thanks for the info, lets hope this gets solved soon.
@RaitaroH It seems like someone has found a fix for this. Check the trackma issue page
@Baitinq I did look at it. Unfortunately until the PR is merged one needs to go in and change that file on their own, or adl will not even work. I might just add like a custom test just to see if the file was modified... except I used pip --user
for that so where I have trackma and where you will have it etc etc are different.
Untill the PR is merged adl remains the same.
@Baitinq make the following change get_list() { tlist=$(LINES=25 COLUMNS=130 trackma list | head -n -2 | tail -n +2) ;}
and you get the benefits of this.
In my case 90 columns is sufficient. I will go with that for now.
I am getting this error when changing that get_list() function
Traceback (most recent call last): File "/usr/bin/trackma", line 11, in <module> load_entry_point('Trackma==0.8.2', 'console_scripts', 'trackma')() File "/usr/lib/python3.7/site-packages/trackma/ui/cli.py", line 1042, in main main_cmd.execute(args.cmd, args.args, args.cmd) File "/usr/lib/python3.7/site-packages/trackma/ui/cli.py", line 782, in execute return func(args) File "/usr/lib/python3.7/site-packages/trackma/ui/cli.py", line 357, in do_list self._make_list(self.sortedlist) File "/usr/lib/python3.7/site-packages/trackma/ui/cli.py", line 877, in _make_list max_title_length = width - col_id_length - col_episodes_length - col_score_length - col_index_length - 5 TypeError: unsupported operand type(s) for -: 'str' and 'int'
Do I have to apply the pull request manually for this to work?
I am getting this other error when I apply the patch and change the get_list() function:
Traceback (most recent call last): File "/usr/bin/trackma", line 11, in <module> load_entry_point('Trackma==0.8.2', 'console_scripts', 'trackma')() File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point return ep.load() File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2443, in load return self.resolve() File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3.7/site-packages/trackma/ui/cli.py", line 34, in <module> from trackma.engine import Engine File "/usr/lib/python3.7/site-packages/trackma/engine.py", line 28, in <module> from trackma import data File "/usr/lib/python3.7/site-packages/trackma/data.py", line 22, in <module> from trackma import utils File "/usr/lib/python3.7/site-packages/trackma/utils.py", line 295 except: ^ SyntaxError: invalid syntax
Apply the PR manually of course.
@Baitinq I did look at it. Unfortunately until the PR is merged one needs to go in and change that file on their own, or adl will not even work.
^^^ I did tell you.
For me the PR works perfectly.
get_list() { tlist=$(LINES=25 COLUMNS=90 trackma list | head -n -2 | tail -n +2) ;}
hmm that is so weird
@RaitaroH nvm, I was able to fix it. Thanks
@RaitaroH Could you add the LINES=25 COLUMNS=130
to adl? Thanks a lot.
@Baitinq thx for notifying me about the merge: https://github.com/z411/trackma/commit/020c0a25637f7368e6c075bcbe67cd938a51b818
When you have an anime in your anime list with a lot of characters (as an example: JoJo's Bizarre Adventure: Stardust Crusaders - Battle in Egypt), fzf shortens it to
JoJo's Bizarre Adventure: Stardust Crusaders -
, meaning that it will not show up as the first option in the next screen. This isnt a problem right now but if you end up implementing the -y option it could become a problem. (Also it isnt aesthetic to see your anime name shortened like that). I know it is a fzf problem but maybe there is an option to prevent this?Thanks
EDIT: It also makes it so you cant increase the nr, resulting in a real problem