Display a random image and a related quote in a beautiful way.
- For image viewing, currently ascii-image-converter or viu are supported. You may download their binaries easily.
- python 3.11 or higher (because of tomllib). No other python dependencies.
- Clone this project with:
git clone --depth 1 https://github.com/Fansesi/tiq.git- Prepare folders with images in them. ascii-image-converter and viu both supports jpeg, png, webp and gif.
- Create a
quote.jsonfile for each folder and put the quotes in a list as like this:
[
"This is the quote 1.",
"This is the quote 2.",
"This is the quote 3."
]- Move the prepared folders to a location of your desire. In default configuration this folder is called
categoriesunder the root of the project. - If successfully installed, you may run a command to create the settings for each image:
tiq create --categories-dir PATH/TO/CATEGORIES/FOLDER --user-settings PATH/TO/user_settings.toml[!note] You may run
tiq create --helpto see the default paths.
This will create a settings.json for each folder (category). Each settings.json file hosts the individual settings of each image for ascii-image-converter and/or viu to use. You may refer their documentation for the settings explanation.
- Finally, run the program with:
tiq normal --categories-dir PATH/TO/CATEGORIES/FOLDER --user-settings PATH/TO/user_settings.toml[!note] Similarly, you may run
tiq normal --helpto see the default paths.
user_settings.toml hosts couple of settings about the displayer and text appearance. You may tweak them as you like.
create:- Create the settings for each category.
- Will not override already created individual image settings. Only updates
settings.jsonfile if an image is added or deleted. - If
--categoryis provided, will only generate settings for that category.
normal:- Randomly select an image and quote to display.
reset:- Hard reset settings. Will override everything.
- If
--categoryis provided, only reset the settings on that category. - Uses
default_img_settings.json, therefore if you change anything in the default settings, you can update every setting with this.
check:- Display every image into screen to check if there is a problem with displaying the image. (Especially handy with ascii-image-converter)
- If
--categoryis provided, only display the images on that category.
debug:- For debugging a single image.
- Uses
debug_settings.json. - You can provide the json file path with
--debug-settingsargument.
static:- Show a static image and/or quote. Setting 'RANDOM' to
QUOTEorCATEGORYwill make those settings randomized. - You can provide the json file path with
--static-settingsargument.
- Show a static image and/or quote. Setting 'RANDOM' to
Displayer class has display_img function that calls message preparation functions. They are titled prepare_viu_msg and prepare_ascii_msg. You may write you own prepare_*_msg function for a different displayer toolkit.

