tika-server-client

0.0.3 • Public • Published

Introduction

A client for Apache's tika-server. Built on bluebird promises.

Examples

Meta Requests

metaFromFile( path )

var TikaClient = require( 'tika-server-client' );
var tika = new TikaClient( 'http://localhost:9998' );
 
tika
    .metaFromFile( 'hello-world.odt' )
    .then( function( meta ) {
 
        var json = JSON.stringify( meta, null, 4 );
        console.log( json );
    });

metaFromUrl( url )

var TikaClient = require( 'tika-server-client' );
var tika = new TikaClient( 'http://localhost:9998' );
 
tika
    .metaFromUrl( 'http://localhost:9998/tika' )
    .then( function( meta ) {
 
        var json = JSON.stringify( meta, null, 4 );
        console.log( json );
    });

Tika Requests

tikaFromFile( path )

var TikaClient = require( 'tika-server-client' );
var tika = new TikaClient( 'http://localhost:9998' );
 
tika
    .tikaFromFile( 'hello-world.odt' )
    .then( function( text ) {
 
        console.log( text );
    });

tikaFromUrl( url )

var TikaClient = require( 'tika-server-client' );
var tika = new TikaClient( 'http://localhost:9998' );
 
tika
    .tikaFromUrl( 'http://localhost:9998/tika' )
    .then( function( text ) {
 
        console.log( text );
    });

Readme

Keywords

Package Sidebar

Install

npm i tika-server-client

Weekly Downloads

7

Version

0.0.3

License

None

Last publish

Collaborators

  • jeff.ashton.ct