tika_client 1.0.1+1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 72

Dart Tika client

tika_client is a Dart client library for accessing the Apache Tika Server API.

Run Tika server as docker image

docker run --rm -p 9998:9998 logicalspark/docker-tikaserver:1.18

Usage

A simple usage example:

import 'dart:io';

import 'package:http_client/console.dart';
import 'package:tika_client/tika_client.dart';

main() async {
  final httpClient = new ConsoleClient();
  final tikaClient = new TikaClient('http://localhost:9998/', httpClient);

  final file = new File('example.pdf');
  final buffer = await file.readAsBytes();

  final html = await tikaClient.parseBufferAsHtmlText(buffer);
  print(html);

  await httpClient.close();
}

1.0.1

  • Added parseBufferAsPlainText method for parsing in plain text.

1.0.0

  • Initial version.

example/example.dart

import 'dart:io';

import 'package:http_client/console.dart';
import 'package:tika_client/tika_client.dart';

main() async {
  final httpClient = new ConsoleClient();
  final tikaClient = new TikaClient('http://localhost:9998/', httpClient);

  final file = new File('example.pdf');
  final buffer = await file.readAsBytes();

  final html = await tikaClient.parseBufferAsHtmlText(buffer);
  print(html);

  await httpClient.close();
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  tika_client: ^1.0.1+1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:tika_client/tika_client.dart';
  
Version Uploaded Documentation Archive
1.0.1+1 Oct 8, 2018 Go to the documentation of tika_client 1.0.1+1 Download tika_client 1.0.1+1 archive
1.0.1 Sep 8, 2018 Go to the documentation of tika_client 1.0.1 Download tika_client 1.0.1 archive
1.0.0 Sep 8, 2018 Go to the documentation of tika_client 1.0.0 Download tika_client 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
43
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
72
Learn more about scoring.

We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:tika_client/tika_client.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http_client ^0.5.0 0.5.0
Transitive dependencies
executor 2.1.2
path 1.6.2
stack_trace 1.9.3