Skip to content
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

Specify custom artdir #63

Open
panki27 opened this issue Oct 2, 2024 · 1 comment
Open

Specify custom artdir #63

panki27 opened this issue Oct 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@panki27
Copy link

panki27 commented Oct 2, 2024

Hi, I'm trying to get artprint to print random tarot cards, no other art.
There apparently used to be a --random tarot option, but it seems like this has been removed.

(Tarot cards now look great in WSL when using the latest wezterm nightly!)

If I could specify the artdir path as a commandline argument (or an environment variable), I could create a new directory containing only the art I want to be displayed, and pass that as artdir.

Another thing: Is it possible to "identify" all colored textart? I guess I could grep for the escape sequences, but is there a built-in way?

EDIT: I came up with the following one-liner as a workaround, but I still think this would be a great config option to add.

artprint -a $(basename $(find ~/arttime/share/arttime/textart -name 'tarot-*' | shuf -n 1))
@poetaman
Copy link
Owner

poetaman commented Oct 14, 2024

@panki27 Thanks for filing this and the update regarding WSL. There are three aspects of this issue: 1) recreating the effect of removed feature --random tarot 2) specifying a custom artdir, 3) identifying colored vs uncolored art.

  1. For arttime, it is possible to get the effect with printf 'ooooooooooooy' | arttime, adjust the number of o's to your liking (just 1 would work too). For artprint, please checkout older version of arttime and use artprint from there.
git clone https://github.com/poetaman/arttime.git
cd arttime
git checkout v2.1.3
./bin/artprint --random tarot --height 0 -t-

It is recommend to set an alias like artprint_old="path_to_arttime_repo/bin/artprint" and using it in your script. For scripts where you want to display other random art, I would recommend using artprint from your up-to-date installation as there was performance enhancement done after v2.1.3.

  1. This is there in my todo list, and you will see this feature in a future update.

  2. This was considered in past... It's a problem of categorizing art, and art can be categorized along many axes. All of the solutions appear to either have some downsides, are ugly, or conflict with arttime's goal of zero/ near-zero dependencies. Let me think again...

@poetaman poetaman added the enhancement New feature or request label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants