Skip to content

Commit

Permalink
20.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtificialOwl committed Dec 11, 2020
1 parent 7584479 commit 05761b6
Show file tree
Hide file tree
Showing 14 changed files with 236 additions and 260 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog


### 20.0.0

- compat nc20
- cleaning code


### 1.4.2

- compat nc19
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ sign_dir=$(build_dir)/sign
package_name=$(app_name)
cert_dir=$(HOME)/.nextcloud/certificates
github_account=daita
branch=master
branch=stable20
codecov_token_dir=$(HOME)/.nextcloud/codecov_token
version+=1.4.2
version+=20.0.0

all: appstore

Expand Down
47 changes: 0 additions & 47 deletions appinfo/app.php

This file was deleted.

39 changes: 0 additions & 39 deletions appinfo/autoload.php

This file was deleted.

4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ which is a wrapper for the command line program [Tesseract OCR](https://github.c
Tesseract must be installed locally, and configured.
]]>
</description>
<version>1.4.2</version>
<version>20.0.0</version>
<licence>agpl</licence>
<author>Maxence Lange</author>
<namespace>Files_FullTextSearch_Tesseract</namespace>
Expand All @@ -27,7 +27,7 @@ Tesseract must be installed locally, and configured.
<repository>https://github.com/daita/files_fulltextsearch_tesseract.git</repository>
<screenshot>https://raw.githubusercontent.com/nextcloud/fulltextsearch/master/screenshots/0.3.0.png</screenshot>
<dependencies>
<nextcloud min-version="18" max-version="19"/>
<nextcloud min-version="20" max-version="20"/>
</dependencies>

<settings>
Expand Down
15 changes: 13 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@
"description": "Files - Fulltextsearch - Tesseract OCR",
"minimum-stability": "stable",
"license": "agpl",
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true,
"autoloader-suffix": "Files_FullTextSearch_Tesseract"
},
"authors": [
{
"name": "Maxence Lange",
"email": "maxence@artificial-owl.com"
}
],
"autoload": {
"psr-4": {
"OCA\\Files_FullTextSearch_Tesseract\\": "lib/"
}
},
"require": {
"thiagoalessio/tesseract_ocr": "2.4.0",
"spatie/pdf-to-image": "1.8.1"
"daita/my-small-php-tools": "dev-master",
"thiagoalessio/tesseract_ocr": "2.9.5",
"spatie/pdf-to-image": "2.1.0"
}
}
73 changes: 62 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 18 additions & 22 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,26 @@
namespace OCA\Files_FullTextSearch_Tesseract\AppInfo;


use OCA\Files_FullTextSearch_Tesseract\Listeners\GenericListener;
use OCA\Files_FullTextSearch_Tesseract\Service\ConfigService;
use OCA\Files_FullTextSearch_Tesseract\Service\TesseractService;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\QueryException;
use OCP\EventDispatcher\GenericEvent;


require_once __DIR__ . '/../../vendor/autoload.php';


/**
* Class Application
*
* @package OCA\Files_FullTextSearch_Tesseract\AppInfo
*/
class Application extends App {
class Application extends App implements IBootstrap {


const APP_NAME = 'files_fulltextsearch_tesseract';
Expand All @@ -69,28 +76,17 @@ public function __construct(array $params = []) {


/**
*
* @param IRegistrationContext $context
*/
public function register(IRegistrationContext $context): void {
$context->registerEventListener(GenericEvent::class, GenericListener::class);
}


/**
* @param IBootContext $context
*/
public function registerFilesExtension() {
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener(
'\OCA\Files_FullTextSearch::onGetConfig',
function(GenericEvent $e) {
$this->configService->onGetConfig($e);
}
);
$eventDispatcher->addListener(
'\OCA\Files_FullTextSearch::onFileIndexing',
function(GenericEvent $e) {
$this->tesseractService->onFileIndexing($e);
}
);
$eventDispatcher->addListener(
'\OCA\Files_FullTextSearch::onSearchRequest',
function(GenericEvent $e) {
$this->tesseractService->onSearchRequest($e);
}
);
public function boot(IBootContext $context): void {
}

}
Expand Down
10 changes: 1 addition & 9 deletions lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

use OCA\Files_FullTextSearch_Tesseract\AppInfo\Application;
use OCA\Files_FullTextSearch_Tesseract\Service\ConfigService;
use OCA\Files_FullTextSearch_Tesseract\Service\MiscService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
Expand All @@ -51,23 +50,16 @@ class SettingsController extends Controller {
/** @var ConfigService */
private $configService;

/** @var MiscService */
private $miscService;


/**
* SettingsController constructor.
*
* @param IRequest $request
* @param ConfigService $configService
* @param MiscService $miscService
*/
public function __construct(
IRequest $request, ConfigService $configService, MiscService $miscService
) {
public function __construct(IRequest $request, ConfigService $configService) {
parent::__construct(Application::APP_NAME, $request);
$this->configService = $configService;
$this->miscService = $miscService;
}


Expand Down
Loading

0 comments on commit 05761b6

Please sign in to comment.