Convert source code to html

code2html 0.3.2

Convert source code repository to HTML files, with beautiful syntax highlight.

Ссылки проекта

Статистика

Метаданные

Лицензия: MIT License (MIT)

Метки code, syntax, highlight, convert, html

Сопровождающие

Классификаторы

Описание проекта

Convert source code repository to HTML files.

Brief

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.

Requirements

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.

Usage

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!

Источник

Free Online HTML Code Converter 𝐇𝐓𝐌𝐋𝐞𝐝.𝐢𝐭

Convert any document to clean HTML. This free online code formatter will help you compose your documents quickly and easily. You can preview and adjust the visual document and the source code side by side. Edit any of these fields and the changes will be reflected in the other one instantly as you’re typing.

html converter online

WYSIWYG «what you see is what you get» composer

The operation of this visual word composer is very intuitive. It behaves like Microsoft Word, Open office or any other rich text editor and it helps you preview how your elements will look when you publish your article on a website. Please note that the exact appearance might be different, according to the CSS file of the website.

online word text to html converter

Work with the source code

Syntax highlighted HTML code reviser with many useful features, such as:

  • Line number counter
  • Active line highlighting
  • Highlighted opening and matching closing tags
  • Automatic tag closing
  • see below for more.

instant source code html preview

Cleaning options:

html tidying

Open the dropdown ▼ menu to reveal the cleaning options. The checked options are executed once you press the main HTML cleaning button. Press the icon on the right to perform only one of them.

  • Inline styles – Strip every style tag attribute. It’s recommended to use a separate CSS file for styling.
  • IDs & Classes – Removes all class and id attributes. A useful feature when you’re migrating an article from a website to another and you want to get rid of alien classes.
  • Empty tags – Erases tags that contain nothing or just a space.
  • Tags with one space – Clears tags that contain a single space, such as

     

  • Repeated spaces – Removes repeated spaces which is a bad practice of shifting the text to the right and setting gaps in the text:

       

  • Remove comments – Get rid of HTML comments:
  • Tag attributes – Erases all tag attributes, including styles, classes etc. This option doesn’t affect the src of images and href attribute of links, because otherwise these tags would become useless.
  • To plain text – Removes all tags, formatting and leaves the plain text.

HTML Cleaning Source Code Editing Area

The list of source composer options is located next to the Clean button. These green icons allow you to execute the following features:

toolbar

  • Undo – Restore the document to the previous state. Go back to the previous stage if a cleaning option doesn’t give you the desired result.
  • New page – Erase the whole document to start with a blank page.
  • Compress – Tabs and new lines are used to make an HTML file more readable for humans but they don’t affect the rendering in the web browser. Remove these unnecessary characters to minimize the file size and provide a faster page loading speed.
  • Tree view – Set text indentation to highlight the tag hierarchy. You can make compressed documents readable again with this option.
  • Character encoding – Decide whether you’d like to encode special characters or not. For example  
  • Demo content – Populate the dashboard with a demo content that helps you experiment with this tool. The demo contains a heading, a table, an image, paragraphs and other elements.
  • Scroll text areas together – By default the two fields scroll together when the document is large. You can disable this feature.
  • Add gibberish text – Adds a paragraph of «Lorem ipsum» to the end of your file. Press it again to add a different one.

Terms & Conditions

The content of the pages of this website is for your general information and use only. It is subject to change without notice.

Neither we nor any third parties provide any warranty or guarantee as to the accuracy, timeliness, performance, completeness or suitability of the information and materials found or offered on this website for any particular purpose. You acknowledge that such information and materials may contain inaccuracies or errors and we expressly exclude liability for any such inaccuracies or errors to the fullest extent permitted by law.

Your use of any information or materials on this website is entirely at your own risk, for which we shall not be liable. It shall be your own responsibility to ensure that any products, services or information available through this website meet your specific requirements.

This website contains material which is owned by or licensed to us. This material includes, but is not limited to, the design, layout, look, appearance and graphics. Reproduction is prohibited other than in accordance with the copyright notice, which forms part of these terms and conditions.

All trademarks reproduced in this website, which are not the property of, or licensed to the operator, are acknowledged on the website.

Unauthorised use of this website may give rise to a claim for damages and/or be a criminal offence.

From time to time, this website may also include links to other websites. These links are provided for your convenience to provide further information. They do not signify that we endorse the website(s). We have no responsibility for the content of the linked website(s).

Privacy Policy

As stated in the sidebar on each page, this tool is using cookies to improve the user experience and to collect anonymous visitor analytics. We use third party plugins and services that are also using cookies. Please check the source code or use a browser plugin to locate them.

HTMLed.it is not sending the documents to our server, the conversions and all operations are performed on the client side. The site is not connected to a database which means that we’re not storing any personal data about our visitors. We are collecting anonymous statistics with Google Analytics and we show personalized ads via Google Adsense.

Click here to edit this text or paste your document here to convert it to HTML 😁

Ed

This demo allows you to test the features of this online HTML converter.
Type in one of the fields and see the other one changing in real time!

Set up the cleaning options and press ▼ Clean

Work with any of the text areas and see the other one changing in real time:

Left : Preview Right : Source code
Preview how your document will look when published. Adjust the syntax highlighted HTML code.

Check out Pranx.com for nice online pranks.

Subscribe for a membership

Share this with your friends

Please disable the ad blocker

This website is using cookies to improve the user experience and to collect anonymous visitor analytics.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Convert source code repository to HTML files

License

kfei/code2html

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.rst

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

Use —pre to check what would be converted:

$ code2html --pre --include="*.cpp" /path/to/input /path/to/output

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

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!

https://raw.githubusercontent.com/kfei/code2html/master/misc/img1.png

https://raw.githubusercontent.com/kfei/code2html/master/misc/img2.png

https://raw.githubusercontent.com/kfei/code2html/master/misc/img3.png

https://raw.githubusercontent.com/kfei/code2html/master/misc/img4.png

About

Convert source code repository to HTML files

Источник

Читайте также:  Css position relative inside relative
Оцените статью