mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-22 01:56:10 +01:00
Improve meta data of imported files (#24)
* Set ``alternative`` to the ``description`` if available. * Set ``creator_tool`` to the "destination.one". * Set ``source`` to the URL of the fetched image.
This commit is contained in:
parent
bae680025e
commit
c56a10b748
12 changed files with 51 additions and 24 deletions
|
@ -152,7 +152,9 @@ class FilesAssignment
|
||||||
$this->metaDataRepository->update($file->getUid(), [
|
$this->metaDataRepository->update($file->getUid(), [
|
||||||
'title' => $this->getShortenedString($mediaObject['value'], 100),
|
'title' => $this->getShortenedString($mediaObject['value'], 100),
|
||||||
'description' => $mediaObject['description'] ?? '',
|
'description' => $mediaObject['description'] ?? '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => $mediaObject['description'] ?? '',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => $mediaObject['url'] ?? '',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,14 @@ Features
|
||||||
That ensures that modifications during import or while editing records are flushing
|
That ensures that modifications during import or while editing records are flushing
|
||||||
corresponding pages.
|
corresponding pages.
|
||||||
|
|
||||||
|
* Improve handling of file meta data during import from destination.one.
|
||||||
|
|
||||||
|
* Set ``alternative`` to the ``description`` if available.
|
||||||
|
|
||||||
|
* Set ``creator_tool`` to the "destination.one".
|
||||||
|
|
||||||
|
* Set ``source`` to the URL of the fetched image.
|
||||||
|
|
||||||
Fixes
|
Fixes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,10 @@ abstract class AbstractTest extends AbstractFunctionalTestCase
|
||||||
{
|
{
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
$this->coreExtensionsToLoad = [
|
||||||
|
'filemetadata',
|
||||||
|
];
|
||||||
|
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/Structure.php');
|
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/Structure.php');
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
,3,1,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,
|
,3,1,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,
|
||||||
"sys_file_metadata",,,,,,,,,,,,,,,,,,,,,
|
"sys_file_metadata",,,,,,,,,,,,,,,,,,,,,
|
||||||
,"uid","pid","title","description","alternative",,,,,,,,,,,,,,,,
|
,"uid","pid","title","description","alternative",,,,,,,,,,,,,,,,
|
||||||
,1,0,"This title is longer then the supported 255 chars as limited by default by TYPO3 database. Also c …","This is a supported description","DD Import",,,,,,,,,,,,,,,,
|
,1,0,"This title is longer then the supported 255 chars as limited by default by TYPO3 database. Also c …","This is a supported description","This is a supported description",,,,,,,,,,,,,,,,
|
||||||
"sys_file_reference",,,,,,,,,,,,,,,,,,,,,
|
"sys_file_reference",,,,,,,,,,,,,,,,,,,,,
|
||||||
,"uid","uid_local","uid_foreign","tablenames","fieldname","title","description",,,,,,,,,,,,,,
|
,"uid","uid_local","uid_foreign","tablenames","fieldname","title","description",,,,,,,,,,,,,,
|
||||||
,1,1,1,"tx_events_domain_model_event","images",,,,,,,,,,,,,,,,
|
,1,1,1,"tx_events_domain_model_event","images",,,,,,,,,,,,,,,,
|
||||||
|
|
|
|
@ -58,7 +58,9 @@ return [
|
||||||
'file' => 1,
|
'file' => 1,
|
||||||
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => '',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/849917/279ac45b3fc701a7197131f627164fffd9f8cc77bc75165e2fc2b864ed606920/theater-rudolstadt_johannes-gei-er_photo-by-lisa-stern_web_-jpg.jpg',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 2,
|
'uid' => 2,
|
||||||
|
@ -66,7 +68,9 @@ return [
|
||||||
'file' => 2,
|
'file' => 2,
|
||||||
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
||||||
'description' => 'Description of Tueftlerzeit',
|
'description' => 'Description of Tueftlerzeit',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => 'Description of Tueftlerzeit',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/828118/f13bbf5602ffc406ebae2faa3527654dea84194666bce4925a1ca8bd3f50c5e9/tueftlerzeit-sfz-rudolstadt-jpg.jpg',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -90,7 +90,9 @@ return [
|
||||||
'file' => 1,
|
'file' => 1,
|
||||||
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => '',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/849917/279ac45b3fc701a7197131f627164fffd9f8cc77bc75165e2fc2b864ed606920/theater-rudolstadt_johannes-gei-er_photo-by-lisa-stern_web_-jpg.jpg',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 2,
|
'uid' => 2,
|
||||||
|
@ -98,7 +100,9 @@ return [
|
||||||
'file' => 2,
|
'file' => 2,
|
||||||
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
||||||
'description' => 'Description of Tueftlerzeit',
|
'description' => 'Description of Tueftlerzeit',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => 'Description of Tueftlerzeit',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/828118/f13bbf5602ffc406ebae2faa3527654dea84194666bce4925a1ca8bd3f50c5e9/tueftlerzeit-sfz-rudolstadt-jpg.jpg',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 3,
|
'uid' => 3,
|
||||||
|
@ -106,7 +110,9 @@ return [
|
||||||
'file' => 3,
|
'file' => 3,
|
||||||
'title' => 'Lutherkirche.jpg',
|
'title' => 'Lutherkirche.jpg',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => '',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/853436/109ac1cf87913e21b5e2b0ef0cc63d223a14374364952a855746a8e7c3fcfc36/lutherkirche-jpg.jpg',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -81,7 +81,9 @@ return [
|
||||||
'file' => 1,
|
'file' => 1,
|
||||||
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => '',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/849917/279ac45b3fc701a7197131f627164fffd9f8cc77bc75165e2fc2b864ed606920/theater-rudolstadt_johannes-gei-er_photo-by-lisa-stern_web_-jpg.jpg',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 2,
|
'uid' => 2,
|
||||||
|
@ -89,7 +91,9 @@ return [
|
||||||
'file' => 2,
|
'file' => 2,
|
||||||
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
||||||
'description' => 'Description of Tueftlerzeit',
|
'description' => 'Description of Tueftlerzeit',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => 'Description of Tueftlerzeit',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/828118/f13bbf5602ffc406ebae2faa3527654dea84194666bce4925a1ca8bd3f50c5e9/tueftlerzeit-sfz-rudolstadt-jpg.jpg',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 3,
|
'uid' => 3,
|
||||||
|
@ -97,7 +101,9 @@ return [
|
||||||
'file' => 3,
|
'file' => 3,
|
||||||
'title' => 'Lutherkirche.jpg',
|
'title' => 'Lutherkirche.jpg',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => '',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/853436/109ac1cf87913e21b5e2b0ef0cc63d223a14374364952a855746a8e7c3fcfc36/lutherkirche-jpg.jpg',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -57,16 +57,12 @@ return [
|
||||||
'pid' => 0,
|
'pid' => 0,
|
||||||
'file' => 1,
|
'file' => 1,
|
||||||
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
||||||
'description' => '',
|
|
||||||
'alternative' => 'DD Import',
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 2,
|
'uid' => 2,
|
||||||
'pid' => 0,
|
'pid' => 0,
|
||||||
'file' => 2,
|
'file' => 2,
|
||||||
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
||||||
'description' => 'Description of Tueftlerzeit',
|
|
||||||
'alternative' => 'DD Import',
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'tx_events_domain_model_event' => [
|
'tx_events_domain_model_event' => [
|
||||||
|
|
|
@ -58,7 +58,9 @@ return [
|
||||||
'file' => 1,
|
'file' => 1,
|
||||||
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => '',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/849917/279ac45b3fc701a7197131f627164fffd9f8cc77bc75165e2fc2b864ed606920/theater-rudolstadt_johannes-gei-er_photo-by-lisa-stern_web_-jpg.jpg',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 2,
|
'uid' => 2,
|
||||||
|
@ -66,7 +68,9 @@ return [
|
||||||
'file' => 2,
|
'file' => 2,
|
||||||
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
||||||
'description' => 'Description of Tueftlerzeit',
|
'description' => 'Description of Tueftlerzeit',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => 'Description of Tueftlerzeit',
|
||||||
|
'creator_tool' => 'destination.one',
|
||||||
|
'source' => 'https://dam.destination.one/828118/f13bbf5602ffc406ebae2faa3527654dea84194666bce4925a1ca8bd3f50c5e9/tueftlerzeit-sfz-rudolstadt-jpg.jpg',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -57,16 +57,12 @@ return [
|
||||||
'pid' => 0,
|
'pid' => 0,
|
||||||
'file' => 1,
|
'file' => 1,
|
||||||
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
||||||
'description' => '',
|
|
||||||
'alternative' => 'DD Import',
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 2,
|
'uid' => 2,
|
||||||
'pid' => 0,
|
'pid' => 0,
|
||||||
'file' => 2,
|
'file' => 2,
|
||||||
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
||||||
'description' => 'Description of Tueftlerzeit',
|
|
||||||
'alternative' => 'DD Import',
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -64,7 +64,7 @@ return [
|
||||||
'file' => 1,
|
'file' => 1,
|
||||||
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
'title' => 'Theater-Rudolstadt_Johannes-Geißer_photo-by-Lisa-Stern_web_.jpg',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => '',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'uid' => 2,
|
'uid' => 2,
|
||||||
|
@ -72,7 +72,7 @@ return [
|
||||||
'file' => 2,
|
'file' => 2,
|
||||||
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
'title' => 'Tueftlerzeit©SFZ-Rudolstadt.jpg',
|
||||||
'description' => 'Description of Tueftlerzeit',
|
'description' => 'Description of Tueftlerzeit',
|
||||||
'alternative' => 'DD Import',
|
'alternative' => 'Description of Tueftlerzeit',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'tx_events_domain_model_event' => [
|
'tx_events_domain_model_event' => [
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
"php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0",
|
"php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0",
|
||||||
"typo3/cms-core": "^10.4 || ^11.5",
|
"typo3/cms-core": "^10.4 || ^11.5",
|
||||||
"typo3/cms-extbase": "^10.4 || ^11.5",
|
"typo3/cms-extbase": "^10.4 || ^11.5",
|
||||||
|
"typo3/cms-filelist": "^10.4 || ^11.5",
|
||||||
|
"typo3/cms-filemetadata": "^10.4 || ^11.5",
|
||||||
"typo3/cms-fluid": "^10.4 || ^11.5",
|
"typo3/cms-fluid": "^10.4 || ^11.5",
|
||||||
"typo3/cms-frontend": "^10.4 || ^11.5",
|
"typo3/cms-frontend": "^10.4 || ^11.5"
|
||||||
"typo3/cms-filelist": "^10.4 || ^11.5"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
Loading…
Reference in a new issue