Skip to content

Commit

Permalink
Minor naming and code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
R0Wi authored Nov 21, 2022
1 parent a5eeeee commit 242e607
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/OcrProcessors/OcrMyPdfBasedProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Psr\Log\LoggerInterface;

abstract class OcrMyPdfBasedProcessor implements IOcrProcessor {
private static $ocrModes = [
private static $ocrModeToCmdParameterMapping = [
WorkflowSettings::OCR_MODE_SKIP_TEXT => '--skip-text',
WorkflowSettings::OCR_MODE_REDO_OCR => '--redo-ocr',
WorkflowSettings::OCR_MODE_FORCE_OCR => '--force-ocr'
Expand Down Expand Up @@ -115,7 +115,7 @@ private function getCommandlineArgs(WorkflowSettings $settings, GlobalSettings $
$args = ['-q'];

// OCR mode ('--skip-text', '--redo-ocr' or '--force-ocr')
$args[] = self::$ocrModes[$settings->getOcrMode()];
$args[] = self::$ocrModeToCmdParameterMapping[$settings->getOcrMode()];

// Language settings
if ($settings->getLanguages()) {
Expand Down
1 change: 0 additions & 1 deletion src/test/components/WorkflowOcr.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import WorkflowOcr from '../../components/WorkflowOcr.vue'
import SettingsItem from '../../components/SettingsItem.vue'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import MultiselectTags from '@nextcloud/vue/dist/Components/MultiselectTags'
import CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'

let installedLanguages = []

Expand Down

0 comments on commit 242e607

Please sign in to comment.