trackma icon indicating copy to clipboard operation
trackma copied to clipboard

Option to "list" in a different format (raw data) [feature request]

Open RaitaroH opened this issue 1 year ago • 2 comments

Hi,

Thank you for the awesome program. I am heavily using it with my adl script.

I think it would be very helpful, both to me for my adl script, but also others like justchokingaround/trackma-wrapper to allow trackma -a 1 list to output in a different format upon request. What I mean is, by default it shows a table, but for scripting purposes having it in a character delimited format, or even json would be much better.

For example, right now the output looks like this if I copy paste it:

| Index  Title                                           Progress  Score  |
|   1    [0;34mBlue Lock[0m......................................   9 / 24   5.5   |
|   2    [0;34mBocchi the Rock![0m...............................   9 / 12   6.5   |
|   3    [0;34mChainsaw Man[0m...................................   9 / 12   5.5   |
|   4    [0;34mDo It Yourself!![0m...............................  10 / 12    6    |
|   5    [0;31mIsekai Oji-san[0m.................................   9 / 13   6.5   |
|   6    Kyokou Suiri...................................   4 / 12    0    |
|   7    [0;34mMairimashita! Iruma-kun 3[0m......................   9 / 21    5    |
|   8    [0;34mMeitantei Conan[0m................................ 1066 / ?   7.5   |
|   9    [0;34mSPY×FAMILY Part 2[0m..............................  10 / 13    7    |
|   10   [0;34mTensei Shitara Ken Deshita[0m.....................  11 / 12    5    |
|   11   [0;31mUchi no Shishou wa Shippo ga Nai[0m...............  10 / 13   6.5   |
11 results

This requires a bit of scripting to clean up and to get anime titles, or to use trackma info index which is slow.

As such I believe that following would be much nicer: trackma -a 1 list raw

1|"Blue Lock"|9|24|5.5
2|"Bocchi the Rock!"|9|12|6.5

This allows for very simple awk -F'|' '{print $n}' type commands.

RaitaroH avatar Dec 09 '22 16:12 RaitaroH