Coder Social home page Coder Social logo

sweetcard / html2xhtml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jfisteus/html2xhtml

0.0 3.0 0.0 760 KB

Command-line HTML to XHTML converter

Home Page: http://www.it.uc3m.es/jaf/html2xhtml/

License: Other

Makefile 0.44% M4 0.60% Python 1.48% Shell 5.30% Java 7.07% HTML 3.00% C 79.45% Lex 1.36% Yacc 0.70% C++ 0.44% JavaScript 0.15%

html2xhtml's Introduction

Html2xhtml is a command-line tool that converts HTML files to XHTML
files. The path of the HTML input file can be provided as a command-
line argument. If not, it is read from stdin.

Xhtml2xhtml tries always to generate valid XHTML files.  It is able to
correct many common errors in input HTML files without loose of infor‐
mation.  However, for some errors, html2xhtml may decide to loose some
information in order to generate a valid XHTML output.  This can be
avoided with the -e option, which allows html2xhtml to generate non-
valid output in these cases.

Html2xhtml can generate the XHTML output compliant to one of the fol‐
lowing document types: XHTML 1.0 (Transitional, Strict and Frameset),
XHTML 1.1, XHTML Basic and XHTML Mobile Profile.


HOW TO RUN THE PROGRAM
-----------------------------------------------------------------------

For full information about how to run the program
see doc/html2xhtml.txt in the source code distribution,
the html2xhtml.txt file in the Windows binaries ZIP file
or the html2xhtml manpage. Some examples are shown below.

- By default, the program reads the input file from its standard input
and dumps the output file to its standard output:

cat input.html | html2xhtml

- The input can also be specified as a command line argument:

html2xhtml input.html

- In order to save the output to a file, redirect the standard output:

html2xhtml input.html >output.html

- Alternatively, you can specify the output file name with the -o option:

html2xhtml input.html -o output.html

- Select the document type of the output with -t:

html2xhtml input.html -t 1.1 -o output.html

The available values are:

transitional: XHTML 1.0 Transitional
frameset: XHTML 1.0 Frameset
strict: XHTML 1.0 Strict
1.1: XHTML 1.1
basic-1.0: XHTML Basic 1.0
basic-1.1: XHTML Basic 1.1
mp: XHTML Mobile Profile
print-1.0: XHTML Print 1.0

Use "transitional" if you just want to tidy up the markup.

- Choose an output character encoding (by default, the program uses
the character encoding detected in the input):

html2xhtml input.html --ocs utf-8 -o output.html

Get the list of available character sets:

./src/html2xhtml --lcs


HOW TO COMPILE AND INSTALL THE PROGRAM FROM THE SOURCE TARBALL
-----------------------------------------------------------------------

Enter the main directory of the source distribution and type:

$ ./configure
$ make

You can run the test battery in order to check that the program is
working as expected:

$ cd tests
$ ./test.sh
$ cd ..

If you want to install the program in your system, type then (it may
require root priviledges):

$ make install

See ./INSTALL for more information.

The program has been tested to compile on GNU/Linux and MinGW in Windows.
In MinGW the actual EXE file to use is the one the compiler creates
inside src\.libs instead of the one in src\. It depends on the
libiconv-2.dll file, which is distributed with MinGW
(inside the bin\ subdirectory of the main MinGW installation directory).


HOW TO COMPILE AND INSTALL THE PROGRAM FROM THE GIT SOURCES
-----------------------------------------------------------------------

The source code in the Git repository does not include the files
generated by the autotools. In order to build the ./configure script,
run the following commands from the main directory of the sources:

$ aclocal
$ libtoolize
$ touch config.rpath
$ autoheader
$ automake --add-missing
$ autoconf

In OS X you need to use the glibtoolize command instead of libtoolize.

After that, you should get the ./configure script and proceed as
explained above:

$ ./configure
$ make

html2xhtml's People

Contributors

jfisteus avatar crygin avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.