Browse Source

Merge pull request #945 from Islandora/944-text-extraction-args

Issue #944: Un-hide arguments field in Text Extraction action.
pull/950/head
Willow Gillingham 1 year ago committed by GitHub
parent
commit
7a57d2dfc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/islandora_text_extraction/src/Plugin/Action/GenerateOCRDerivative.php

6
modules/islandora_text_extraction/src/Plugin/Action/GenerateOCRDerivative.php

@ -37,11 +37,9 @@ class GenerateOCRDerivative extends AbstractGenerateDerivative {
*/ */
public function buildConfigurationForm(array $form, FormStateInterface $form_state) { public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state); $form = parent::buildConfigurationForm($form, $form_state);
$form['mimetype']['#description'] = $this->t('Mimetype to convert to (e.g. application/xml, etc...)');
$form['mimetype']['#value'] = 'text/plain';
$form['mimetype']['#type'] = 'textfield';
unset($form['args']); $form['args']['#description'] = $this->t("Arguments to send to Tesseract. To generate hOCR, use:<br /><code>-c tessedit_create_hocr=1 -c hocr_font_info=0</code>");
return $form; return $form;
} }

Loading…
Cancel
Save