Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@cspotcode/ansi-to-html
Advanced tools
CLI tool to convert ANSI colored text to an HTML file, with a few extra features to support me team's use-case.
CLI tool to convert ANSI colored text to an HTML file, with a few extra features to support me team's use-case.
We use it to generate pretty reports of subsets of automated CI tasks. Although CI servers are good at recording and visualizing build logs, sometimes it is helpful to upload a subset of the logs as a build artifact for easier review.
There are other tools like this one. This tool has a few features they may not have:
#L123
-style linking like Github. Click any line, it goes into the URL hash, copy a link to it.❯ ansi-to-html --help
Render ANSI console formatting into HTML
━━━ Usage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$ ansi-to-html [input] [output]
━━━ Options ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
--theme #0 Specify color theme by name. Use --list-themes to see a list of all themes. Themes come from https://windowsterminalthemes.dev/ Default: MonokaiDimmed
--open-in-new-tab-link Add a link to the top of the page which will open the same file in a new browser tab. Useful when you know the report will be rendered in an iframe and you want to offer an easy way to link to it directly.
--no-per-line-anchors Add clickable anchors so you can click any line in the file and get a link to that line number. Useful for sharing a link to a specific line number in the log.
--list-themes Lists the names of all themes, then exits.
━━━ Examples ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Render from file to file
$ ansi-to-html command-log.txt command-log.html
Render from stdin to stdout
$ complex-command | ansi-to-html > output.html
For example, here is the output of git status
while I was working on this project:
❯ git -c color.status=always status | ansi-to-html > example-git-status.html
FAQs
CLI tool to convert ANSI colored text to an HTML file, with a few extra features to support my team's use-case.
We found that @cspotcode/ansi-to-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.