Repo for the search and displace core module including the interface to select files and search and displace operations to run on them. https://searchanddisplace.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Orzu Ionut 07adbf521c Merge 4 days ago
.idea Run Search and Displace from Web and from CLI 1 month ago
app Merge 4 days ago
bootstrap Initial commit 1 month ago
config Initial commit 1 month ago
database Initial commit 1 month ago
demo-cli Add demo for CLI. Various fixes and improvements. 4 days ago
public Merge 4 days ago
resources Merge 4 days ago
routes Minor bug fixes 1 week ago
storage Initial commit 1 month ago
tests Initial commit 1 month ago
.editorconfig Initial commit 1 month ago
.env.example Searchers CRUD. Styles 3 weeks ago
.gitattributes Initial commit 1 month ago
.gitignore Searchers CRUD. Styles 3 weeks ago
.styleci.yml Initial commit 1 month ago
README.md Added demo URL in readme 2 weeks ago
artisan Initial commit 1 month ago
composer.json Run Search and Displace from Web and from CLI 1 month ago
composer.lock Merge 1 month ago
package-lock.json WIP. Merge 2 weeks ago
package.json Minor bugfixes 2 weeks ago
phpunit.xml Initial commit 1 month ago
run-dev.sh Minor UI updates 1 month ago
server.php Initial commit 1 month ago
tsconfig.json Minor UI updates 1 month ago
webpack.mix.js Merge 3 weeks ago

README.md

Search and Displace Core

Install

Search and Displace Ingest integration

Add in .env the 'WEBHOOK_CLIENT_SECRET' value.

Facebook Duckling

  • $ apt-get install libpcre3-dev
  • $ cd ..
  • $ git clone https://github.com/facebook/duckling.git && cd duckling
  • $ curl -sSL https://get.haskellstack.org/ | sh
  • $ stack build && stack exec duckling-example-exe
  • $ stack test

Converting documents from MD to ODT

  • $ apt-get install pandoc

Searchers

There are 2 types of searchers: basic and compounded

Basic searcher

There are 2 types of basic searchers: native and custom

Native basic searcher

This type of searchers are added by default in the app and cannot be edited or deleted.

  • Amount of Money
  • Credit Card Number
  • Distance
  • Duration
  • Email
  • Numeral
  • Ordinal
  • Phone Numbers
  • Quantity
  • Temperature
  • Time
  • Url
  • Volume

Custom basic searcher

You can add a custom basic searcher by clicking the 'Add regex' button found in the navbar.

This searcher is a regular expression.

Example: [d\]{4}-[d\]{3}-[d\]{3} searches, in the document, all text strings that have 4 digits, a dash, 3 digits, a dash, and finally 3 digits; 1234-123-123 is a valid text.

Compounded searcher

A compounded searcher contains one or more searchers, which can be either basic or comopounded.

The searchers can be listed in two ways: in rows and in columns. Each column in a row extends the searching criteria and each row filters the results of the previous row.

Let's take as an example the following searcher: the first row has 2 searchers, in the first column we have the 'Email' native basic searcher and in the second column we have a custom basic searcher which searches for text strings that have a leading '#' character. The second rows has only one column and that column has a custom basic searcher which searches for text strings which contain the '@' character. After we execute the Search&Displace the first row of the searcher will be applied on the initial document content and will find all email addresses and all text strings which have a leading '#' character, so the operation applies the searchers in the first row independently, each column extending the searching criteria. Then the second row will be applied on the results of the first row, so on the email addresses and the text strings which have a leading '#' character, basically each row filters the results of the previous row.

Demo Version

Is available here https://demo.searchanddisplace.com/ No authentication is required.

Demo Steps

  • Select and upload a document file (supported files: .docx, .pdf, .odt, .txt)
  • After the file is uploaded and processed you will see it's contents on the page
  • Select searchers by clicking the 'List' button on the right, for each searcher you can input a replace value, so for example if you select the 'Email' searcher and input the replace value as 'EMAIL' then all email addresses which are found in the document will be replaced with the text EMAIL
  • After you are done with the searchers selection you can hide the panel by clicking again on the 'List' button
  • You can execute the Search&Displace by clicking on the 'Run filters' button
  • After the processing is done you will see the resulting document in the right panel, side by side with the initial document
  • You can highlight the found and replaced items by toggling the 'Highlight differences' button