Package: sarina-cli
SarinaSarina: An ASCII Art generator command line tool to create word clouds from text words based on contours of the given image.The program is dedicated toSarina Esmailzadeh, a 16-year-old teenager who lost her life during theMahsa Amini protests, as a result of violence inflicted by the IRGC forces. Her memory serves as a reminder of the importance of justice and human rights.Table of contentsIntroductionInstallationUsageHow It WorksOverviewSarina is an ASCII art generator written in Python3 and C++. It transforms an input image and a text file containing words and their weights into a unique ASCII art representation. The algorithm behind Sarina is randomized, ensuring that every output is distinct, even for identical inputs.InstallationPyPICheckPython Packaging User GuideRunpip install sarina-cliorpip3 install sarina-cliSource codeClone the repository or download the source code.Runpip3 install -r requirements.txtorpip install -r requirements.txtUsageDefault image and wordsAmin@Maximus:Sarina $sarinaSarina is generating your word cloud...100%|███████████████████████████████████████████████████████████| 132/132 [01:09<00:00,  1.89it/s]Done!Images are saved in ./resultsInput ImageGenerated OutputGenerated OutputGenerated OutputGenerated OutputGenerated OutputCustom image and optionsAmin@Maximus:Sarina $sarina-if'assets/images/Sarina.png'-ct100-ft20-tc[255,255,255]-pc-csEnter the contour indices to keep (+) or to remove (-) (separated by space): +1 -2 -3 -4Sarina is generating your word cloud...100%|███████████████████████████████████████████████████████████| 132/132 [01:06<00:00,  1.98it/s]Done!Images are saved in ./resultsInput ImageGenerated OutputGenerated OutputGenerated OutputGenerated OutputGenerated OutputTo learn more about the options, you can use the following command:Amin@Maximus:Sarina $sarina--helpUsage: sarina [OPTIONS]Sarina: An ASCII Art Generator to create word clouds from text files basedon image contoursOptions:-if, --img_file PATH            Path to image file-tf, --txt_file PATH            Path to text file. Each line of the textfile should be in the following format:WORD|WEIGHT-cs, --contour_selection        Contour selection - if selected, user willbe prompted to enter the contours index. Forexample, if you want to keep the contourswith index 0, 3, 4, and remove contours withindex 1, 2, you should enter +0 +3 +4 -1 -2-ct, --contour_treshold INTEGER RANGEThreshold value to detect the contours.Sarina uses intensity thresholding to detectthe contours. The higher the value, the morecontours will be detected but the lessaccurate the result will be  [default: 100;0<=x<=255]--max_iter INTEGER RANGE        Maximum number of iterations. Higher numberof iterations will result in more consistentresults with the given texts and weights,but it will take more time to generate theresult  [default: 1000; 100<=x<=10000]--decay_rate FLOAT RANGE        Decay rate for font scale. Higher decay ratewill result in more consistent results withthe given texts and weights, but it willtake more time to generate the result[default: 0.9; 0.1<=x<=1.0]-ft, --font_thickness INTEGER   Font thickness. Higher values will make thetexts font thicker. Choose this value basedon the size of the image  [default: 10]--margin INTEGER RANGE          Margin between texts in pixels. Highervalues will result in more space between thetexts  [default: 20; 0<=x<=100]-tc, --text_color TEXT          Text color in RGB format. For example,[255,0,0] is red. Note to use squarebrackets and commas. Also, just enter thenumbers, do not use spaces  [default:[0,0,0]]-pc, --plot_contour             Plot contour on the generated images. Ifselected, the generated images will beplotted with the detected/selected contours-op, --opacity                  If selected, opacity of each text will beselected based on its weight  [default:True]-sp, --save_path PATH           Path to save the generated images. If notselected, the generated images will be savedin the same results folder in the directoryas the function is called.