From a71f77ab9fb5240abef49997b855679e24a9adba Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 30 May 2025 01:06:54 +0100 Subject: [PATCH] Automatically create podcast episode titles Automatically create podcast episode titles with the auto_entitylabel module, containing the episode number, topic and guest names. --- composer.json | 1 + composer.lock | 83 ++++++++++++++++++- ...itylabel.settings.node.podcast_episode.yml | 10 +++ config/sync/core.extension.yml | 1 + .../pathauto.pattern.podcast_episode_node.yml | 6 +- 5 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 config/sync/auto_entitylabel.settings.node.podcast_episode.yml diff --git a/composer.json b/composer.json index ab8087aaf..3d317b649 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "require": { "composer/installers": "^2.3", "cweagans/composer-patches": "^1.7", + "drupal/auto_entitylabel": "^3.4", "drupal/core-composer-scaffold": "^11.1", "drupal/core-project-message": "^11.1", "drupal/core-recommended": "^11.1", diff --git a/composer.lock b/composer.lock index 3cb6aa3f3..ff3d79d07 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b416719d22f3a349db2397ff583ef13f", + "content-hash": "377f681cb29972bd5a9a2bf00efd10f7", "packages": [ { "name": "asm89/stack-cors", @@ -1201,6 +1201,87 @@ ], "time": "2024-10-09T13:47:03+00:00" }, + { + "name": "drupal/auto_entitylabel", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/auto_entitylabel.git", + "reference": "8.x-3.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/auto_entitylabel-8.x-3.4.zip", + "reference": "8.x-3.4", + "shasum": "9b3d7bc8e450ae008b3f48fed0dd9dace03ddbb5" + }, + "require": { + "drupal/core": "^10.1 || ^11" + }, + "require-dev": { + "drupal/book": "^1.0", + "drupal/token": "^1.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-3.4", + "datestamp": "1736308389", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "bforchhammer", + "homepage": "https://www.drupal.org/user/216396" + }, + { + "name": "colan", + "homepage": "https://www.drupal.org/user/58704" + }, + { + "name": "dqd", + "homepage": "https://www.drupal.org/user/1001934" + }, + { + "name": "japerry", + "homepage": "https://www.drupal.org/user/45640" + }, + { + "name": "mandclu", + "homepage": "https://www.drupal.org/user/52136" + }, + { + "name": "pravin ajaaz", + "homepage": "https://www.drupal.org/user/2910049" + }, + { + "name": "purushotam.rai", + "homepage": "https://www.drupal.org/user/3193859" + }, + { + "name": "renatog", + "homepage": "https://www.drupal.org/user/3326031" + }, + { + "name": "vladimiraus", + "homepage": "https://www.drupal.org/user/673120" + } + ], + "description": "Allows hiding of entity label fields and automatic label creation.", + "homepage": "https://www.drupal.org/project/auto_entitylabel", + "support": { + "source": "https://git.drupalcode.org/project/auto_entitylabel", + "issues": "https://www.drupal.org/project/issues/auto_entitylabel" + } + }, { "name": "drupal/bpmn_io", "version": "2.0.8", diff --git a/config/sync/auto_entitylabel.settings.node.podcast_episode.yml b/config/sync/auto_entitylabel.settings.node.podcast_episode.yml new file mode 100644 index 000000000..ff5c35aa9 --- /dev/null +++ b/config/sync/auto_entitylabel.settings.node.podcast_episode.yml @@ -0,0 +1,10 @@ +status: 1 +pattern: 'Episode [node:field_episode_number]: [node:field_topic] with [opd-podcast:guest-names]' +escape: false +preserve_titles: false +save: true +chunk: 50 +dependencies: + config: + - node.type.podcast_episode +new_content_behavior: 0 diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index b8032ff35..a39054cbc 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -2,6 +2,7 @@ _core: default_config_hash: 4GIX5Esnc_umpXUBj4IIocRX7Mt5fPhm4AgXfE3E56E module: announcements_feed: 0 + auto_entitylabel: 0 automated_cron: 0 big_pipe: 0 block: 0 diff --git a/config/sync/pathauto.pattern.podcast_episode_node.yml b/config/sync/pathauto.pattern.podcast_episode_node.yml index 302e90313..e0c358678 100644 --- a/config/sync/pathauto.pattern.podcast_episode_node.yml +++ b/config/sync/pathauto.pattern.podcast_episode_node.yml @@ -7,12 +7,12 @@ dependencies: id: podcast_episode_node label: 'Podcast episode node' type: 'canonical_entities:node' -pattern: 'podcast/[node:field_episode_number]-[node:title]' +pattern: 'podcast/[node:field_episode_number]-[node:field_topic]' selection_criteria: - 484f01e1-4e5c-4130-bb52-acd3f2c650c9: + 4f293056-f505-42df-ab52-e45f73943c38: id: 'entity_bundle:node' negate: false - uuid: 484f01e1-4e5c-4130-bb52-acd3f2c650c9 + uuid: 4f293056-f505-42df-ab52-e45f73943c38 context_mapping: node: node bundles: