Code Monkey home page Code Monkey logo

tidyj's Introduction

tidyj

A Java JNI wrapper for libtidy.

CircleCI

Features

Current: v0.2

  • basic HTML / XML tiding, and not breaking things
  • Android support and an example app

Next: v0.3

  • Control over memory usage

For Users

How to use from Java (gradle)

Currently one need to copy code (lib/src/main), CMake configuration (lib/CMakeLists.txt), and a few gradle tasks (in lib/build.gradle) to use from another Java project.

// I am not sure how should one "publish" native code for traditional Java, or how do Java developers consume them. (If you are familiar of this, creating a issue is more than welcome.)

How to use from Android

Currently one need to copy related files to Android module. See android-demo/ for an example.

Threading

All public APIs of tidyj are thread-safe.

libtidy cares little about thread and concurrency stuff: all code just run on caller thread, and do nothing after return. Not all its APIs are thread safe. We handle that in tidyj.

Memory

Currently (before v0.3), underlying tidylib uses free / memory to allocate memory in completely non-managed native heap.

For developers

How to build

To build the native code, CMake, make and configured C/C++ (both) compilers are required.

# after clone, fetch libtidy as dependcies
$ git submodule init
$ git submodule update

# `test` task will run cmake and make as needed
# If test runs, the build should be fine.
$ ./gradlew lib:test

License

MIT

How to contribute

I am open to help of any kind. If you find something interesting (can | need) to be be done, feel free to create a issue.

tidyj's People

Contributors

jokester avatar

Stargazers

 avatar

Watchers

 avatar  avatar

tidyj's Issues

next: dom access?

  • determine some syntax to match DOM elements
  • match elements with libtidy API
  • copy matched DOM to java
  • can we share code with node-libtidy?

v0.1: basic tidy/clean/output

  • able to compile & call from java
  • bindings of options
  • input (string / stream), output (stream)
  • return error / warnings to java
  • provide API to release TidyDoc in native heap
  • settings for CI
  • error handling

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.