Add save html#47
Conversation
|
This looks great. I'll test and review this in detail soon. I appreciate you actually making the change instead of opening an issue :) |
|
@TheZoraiz Friendly bump here. This would be very useful |
|
Apologies for the delay. Some personal stuff has been getting in the way lately. I'll get on this as soon as I can |
|
@TheZoraiz Sounds good, and thank you |
| "<span style=\"color:rgb(%d,%d,%d)\">%s</span>", | ||
| rgb[0], rgb[1], rgb[2], asciiChar.Simple, | ||
| )) | ||
| } else { |
There was a problem hiding this comment.
Check for and apply fontColor flag/global variable as well. You can check it's existing implementation at aic_package/util.go line 105
| } | ||
|
|
||
| // If path exists | ||
| if _, err := os.Stat(saveHtmlPath); !os.IsNotExist(err) { |
There was a problem hiding this comment.
You can reuse getFullSavePath() function to check and retrieve save path
|
Hello @Kiwigamer. Really sorry for the late response. I haven't been active in this project for a long time. I guess it's time to change that 😅 I do think an html implementation should utilize the Otherwise, your code looks good. I've added some comments for minor tweaks and we should be good to go. |
What kind of change dose this PR introduce?
Adding the '--save-html' flag.
What is this used for?
Users can now save ascii-art as a html file. To further copy text with colored data.
Why is it important?
Colored ascii-art can not be copied from the terminal including the colored data. Furthermore txt files can not save color. By introducing the html save useres can open the generated html file and copy the ascii-art including its text color.