Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Convert source code repository to HTML files.
Do you like reading source code on your mobile devices?
HTML is a light-weight format (unlike PDF or EPUB) that can be easily read on every browser-included mobile device.
code2html
is a tool converts source code repository to HTML format files so
that you can put them into your mobile devices and read it whenever and
wherever with a beautiful syntax highlight (thanks Vim
).
Get rid of those social networking applications, start to enjoy code reading.
By taking advantages of the magic TOhtml
function from Vim
,
code2html
requires you have Vim
installed. Also if you specify
a non-default color scheme to use, it must be available on your system as well.
::
code2html [-h] [--color COLOR] [--include INCLUDES] [--pre] input output
positional arguments:
input Path to the source code repository
output Path for saving output files
optional arguments:
-h, --help show this help message and exit
--color COLOR Specify the color scheme use for syntax highlighting
--include INCLUDES Specify file matching patterns, then only the matched
files will be convert. Wild card characters are
supported. e.g. --include="*.c" --include="?.py"
--pre Instead of actually performing the conversion, simply
display what *would* have been converted if --pre
weren't used
Example 1
Use ``--pre`` to check what would be converted::
$ code2html --pre --include="*.cpp" /path/to/input /path/to/output
Example 2
Convert all Python sources, ext.c
and a README file from /path/to/input
to /path/to/output
, using jellybeans
as the syntax highlight scheme::
$ code2html --color=jellybeans --include="*.py" --include="ext.c"
--include="README.rst" /path/to/input /path/to/output
Example 3
Put the source code files into your mobile devices and find a good file
manager to organize them. And then next time you wait for lunch, bus,
girlfriend (FIXME!), etc., **read some code!**
.. image:: https://raw.githubusercontent.com/kfei/code2html/master/misc/img1.png
.. image:: https://raw.githubusercontent.com/kfei/code2html/master/misc/img2.png
.. image:: https://raw.githubusercontent.com/kfei/code2html/master/misc/img3.png
.. image:: https://raw.githubusercontent.com/kfei/code2html/master/misc/img4.png
FAQs
Convert source code repository to HTML files, with beautiful syntax highlight.
We found that code2html demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.