-file '/etc/passwd' --html '<html><pre>machine user list password</pre></html>'
submit-url --json '{ url: "", "content" : "", ... }'
This allows for custom handling of single entries
Detect "ge
(
"Content-Length" => $content_size,
"Accept" => 'application/json,text/plain',
@headers
);
my $p = deferred;
http_reque
ndex %indices %analyzers );
use Dancer::SearchApp::Utils qw(await);
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
GetOptions(
'force|f' => \my $force_rebuild,
'config|c:
s/Corion/Projekte/Apache-Tika-Async/lib';
use Apache::Tika::Server;
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
=head1 USAGE
# index a directory and its subdirectories
in
ndex %indices %analyzers );
use Dancer::SearchApp::Utils qw(await);
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
GetOptions(
'force|f' => \my $force_rebuild,
'config|c:
kely, manually encoding to JSON would be the saner approach
# instead of globally setting a serializer for all routes.
set 'serializer' => 'JSON';
get '/suggest/:query.json' => sub {
my( $q ) = p
on;
use strict;
use Moo::Role;
use JSON::XS;
use vars qw($VERSION);
$VERSION = '0.06';
sub decode_response {
my( $self, $body ) = @_;
return decode_json( $body );
}
sub process_response
nd $code <= 209 ) {
if ( defined $body and length $body ) {
# Let's hope it's JSON
$body = $self->decode_response($body)
if $is_encoded;
ret
;
use Exporter 'import';
use Data::Dumper;
use Promises 'deferred';
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
=head1 NAME
Dancer::SearchApp::IndexSchema - schema definition
package CORION::Apache::Tika;
use strict;
use Moo;
use JSON::XS qw(decode_json);
use vars '$VERSION';
$VERSION = '0.06';
=head1 NAME
CORION::Apache::Tika - connect to Apache::Tika
=head1 SYNOPSIS
@_;
$line =~ m!"([^"]+)"!g;
}
sub get_meta {
my( $self, $file )= @_;
#return decode_json($self->fetch( filename => $file, type => 'meta' ));
# Hacky CSV-to-hash decode :-/
return
lib';
use Apache::Tika::Server;
use Dancer::SearchApp::HTMLSnippet;
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
=head1 USAGE
# index a directory and its subdirectories
in