-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add save html #47
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.