Coder Social home page Coder Social logo

stcarrez / wi2wic Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 302 KB

Wiki 2 Wiki Converter

License: Apache License 2.0

Makefile 1.01% M4 1.47% Shell 11.02% Ada 42.72% CSS 13.03% HTML 6.45% JavaScript 11.21% TypeScript 11.38% Dockerfile 1.73%
wiki wiki-converter html-converter markdown-converter markdown mediawiki dotclear creole html-to-markdown

wi2wic's Introduction

Wiki To Wiki Converter

Build Status License Commits Docker

Wi2wic is a small server that allows to convert HTML in Wiki text such as Markdown, MediaWiki, Dotclear or Creole. It can also convert one Wiki syntax to another. It can be used to:

  • Migrate HTML page in Markdown or another Wiki,
  • Convert Wiki page in HTML,
  • Convert HTML documentation in Markdown or another Wiki,
  • Cleanup a complex and noisy HTML page

The server is written in Ada and provides the following REST operations:

  • import some HTML content and convert it in a Wiki syntax,
  • convert a Wiki text from one syntax to another,
  • render a Wiki text in HTML.

You can try Wi2wic on https://wi2wic.vacs.fr/wi2wic/index.html

Building Wi2wic

To build wi2wic you will need the following projects:

Wi2wic relies on the following external projects:

Before building and configuring Wi2wic, you should have configured, built and installed all of the above projects.

To configure Wi2wic, use the following command:

   ./configure

If something goes wrong, check that you have installed the dependencies mentioned above.

Then, build the application:

   make

Running Wi2wic

You will then start the application as follows:

   bin/wi2wic-server

and point your browser to http://localhost:8080/wi2wic/index.html

Docker

A docker container is available for those who want to try Wi2wic without installing and building all required packages. To use the Wi2wic docker container you can run the following commands:

   sudo docker pull ciceron/wi2wic
   sudo docker run --name wi2wic -p 8080:8080 ciceron/wi2wic

and then point your browser to http://localhost:8080/wi2wic/index.html

To stop the running application you will use:

   sudo docker stop wi2wic
   sudo docker rm wi2wic

If you want to build locally the docker image, you can use:

   sudo docker build -t wi2wic -f docker/Dockerfile .

Security

The server can download a URL through the /wi2wic/import API entry point. The server only accepts http:// and https:// URL. The server should be run from a docker container or similar restricted environment in order to protect malicious URL.

Limitations

The HTML parser and converter is able to read and parse invalid HTML but some structures are not convertable to some Wiki syntax.

The HTML to Wiki converter does not read the CSS and therefore cannot convert correctly some HTML that has specific presentation through their CSS. The interpretation of HTML+CSS is left to the reader as an exercise (Hint: use the Ada parser for CSS files)

wi2wic's People

Contributors

stcarrez avatar

Stargazers

 avatar  avatar

Watchers

 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.