Giter Site home page Giter Site logo

jhtml2md's Introduction

jHTML2Md

A simple converter from HTML to Markdown in Java.

I created this project for importing notes on Capsa Notes.

Currently it hasn't any options. I plan to add different markdown styles (Headers using # instead of underline =, for example).

How to use it:

It's pretty simple, first add jSoup to the classpath. Then:

String markdownText = HTML2Md.convert(html, baseURL); Where html is a String containing the html code you want to convert, and baseURL is the url you will use as a reference for converting relative links.

You can use directly an URL too, like this:

URL url = new URL("http://www.example.com/");
HTML2Md.convert(url, 30000);

The 30000 is the timeout for requesting the page in milliseconds.

Enjoy!

RoadMap

  • Add options for different markdown styles

    • Jekyll & Hexo markdown styles has already been added, to use them, simply invoke

    HTML2Md.htmlToJekyllMd(htmlPath, mdPath, charset); HTML2Md.htmlToHexoMd(htmlPath, mdPath, charset);

  • Some refactoring, currently the code is quite ugly

jhtml2md's People

Contributors

gaganis avatar nico2sh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jhtml2md's Issues

License?

Currently, there does not seem to be any license associated with this repository. Could you please add one to clarify which terms apply?

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.