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

Feature Request: User added art + displaying random art without the placeholder "title" text. #57

Closed
Heimekyo opened this issue Nov 15, 2023 · 3 comments

Comments

@Heimekyo
Copy link

Heimekyo commented Nov 15, 2023

The ability to add my own ASCII art would be neat.
I'm also mildly annoyed by the "Costum message for art goes here" when using --random.
As I use a terminal widget on my desktop that runs random art at boot.

Would this be possible by modifying any configs? I tried looking around, but couldn't find much.

Thanks!

@poetaman
Copy link
Owner

poetaman commented Nov 16, 2023

@Heimekyo Yes, I can understand that. Both of your requests are possible today. Here are the steps:

  • To not display the default message string from artfile, add -t " " to your command. You can always change the message displayed there by pressing m, and either a) typing+entering a new message string, b) pressing up/down arrow to select from previously entered messages, c) typing+entering orig to select default message string from respective art file, d) (space/s) to clear it again.

  • For adding your own ASCII art... good catch, I missed adding that to the wiki. You can add art directly to install location or first to your local git repository.

Let's say you want to add it directly in the install location for a quick tour. To understand how to add new art, let's create a one based on existing art.

  • Go to directory containing all artfiles: cd "$(dirname $(command -v arttime))/../share/arttime/textart". All arts are in individual text files (artfiles) there. Changing an artfile there will change how it gets displayed in arttime.
  • Create a new art file from existing one, cp seal seal2 (you can pick any name).
  • Open seal2 in any text editor.
  • Edit first line to change the default text message shown under seal2. Edit rest of the lines to make minor change the art. Save the file.
  • Open arttime --nolearn -a seal2, and you would notice your changes.

By this time you have perhaps realized that every art is nothing but a file in this directory, with the following format:

  • File name is art name
  • First line has default message shown under text art
  • Text art starts from line 2 and continues to bottom of file. Note: the north west corner of text art is aligned with beginning of line 2.

Perhaps delete seal2 and create your own art file by taking inspiration from other files.

If you are going to edit/add new art files, it is safer to do so in share/arttime/textart directory of local arttime git repository. Reason: let's say you create an art file named wonderland and add it directly to the installed location. In future release, if arttime project adds wonderland and you upgrade, the contents of your wonderland will be replaced by one added by arttime project. If you instead have wonderland in a git repo, doing git pull will show you merge conflict on wonderland. Then you can take appropriate actions. Same goes for editing existing art files, they will get overwritten with every upgrade. After doing git pull, and resolving merge conflicts, you would have to manually run ./install.sh from the git root directory. Also check ./install.sh --help for install options.


Corollary: To delete an art from collection, simply delete its file from installation directory "$(dirname $(command -v arttime))/../share/arttime/textart", and perhaps from your local arttime git repo's share/arttime/textart.

@Heimekyo
Copy link
Author

Heimekyo commented Nov 17, 2023

Love to see it! Thank you for your work, this little program is a really nice way to start the morning. Cheers 🥂

@poetaman
Copy link
Owner

@Heimekyo Sounds great! Feel free to spread the word, cheers 🥂

@poetaman poetaman pinned this issue Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants