tika_client 1.0.1+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 45

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 pub get

Alternatively, your editor might support pub get or flutter pub 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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
78
Overall:
Weighted score of the above. [more]
45
Learn more about scoring.

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

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/src/tika_client_impl.dart. (-1 points)

Analysis of lib/src/tika_client_impl.dart reported 2 hints:

line 16 col 16: Unnecessary new keyword.

line 24 col 16: Unnecessary new keyword.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (http_client).

Package is getting outdated. (-12.05 points)

The package was last published 58 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http_client ^0.5.0 0.5.1 1.3.1
Transitive dependencies
executor 2.2.0
path 1.6.4
stack_trace 1.9.3