mirror of
https://github.com/NarrativeScience-old/log.io.git
synced 2026-04-25 09:05:55 +03:00
[GH-ISSUE #225] ASCII color support #188
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/log.io-NarrativeScience-old#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ngoctnq on GitHub (Mar 10, 2020).
Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/225
Currently I'm piping a program's output into a text file and then let
log.iotrack it. However, it gives[0M-type of characters in the stream and not format them (like it would have if I were usingless -r). Is the support for this functionality?@msmathers commented on GitHub (Mar 10, 2020):
This is not currently supported... I'll add this as a feature request. I'm not too familiar with all ASCII color escape codes, would implementing support for the following table be sufficient? https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
@ngoctnq commented on GitHub (Mar 10, 2020):
I'd say that's sufficient. If we go with stuff like screen clearing, that'll open a huge can of worm.
@sik0vny commented on GitHub (May 10, 2020):
I'm also interested in coloring the output
@sguilly commented on GitHub (May 28, 2020):
Use : https://github.com/nteract/ansi-to-react in ScreenMessage
const ScreenMessage: React.FC = ({
message,
messageFilter
}) => {
return (
{messageFilter && _parseMessageParts(message, messageFilter).map((part, i) =>
<span key={i} className={part.highlight ? 'highlight' : ''}>
{part.text}
)}
{!messageFilter && {message}}
)
}
see : https://github.com/s3pweb/log.io/blob/master/ui/src/components/screens/index.tsx
@imidoriya commented on GitHub (Oct 19, 2020):
@sguilly you should make this a pull request. Any instructions on how to use your changes? I got the main code working, but don't know how to add your edits. My experience is limited with node/npm.
@yunnysunny commented on GitHub (Jan 1, 2021):
It looks good! Please pull a request.