{"id":25353930,"url":"https://github.com/aborroy/alfresco-custom-metadata-extractor","last_synced_at":"2025-04-09T01:44:10.280Z","repository":{"id":251318867,"uuid":"836760454","full_name":"aborroy/alfresco-custom-metadata-extractor","owner":"aborroy","description":"How to extract custom metadata from Alfresco 23.2 with Transform Service","archived":false,"fork":false,"pushed_at":"2024-08-02T06:06:38.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T19:56:04.674Z","etag":null,"topics":["alfresco","docker"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aborroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T13:56:53.000Z","updated_at":"2024-08-07T07:20:19.000Z","dependencies_parsed_at":"2024-08-02T07:28:23.751Z","dependency_job_id":"2455cdaf-86d0-470b-95f2-e57d74c35687","html_url":"https://github.com/aborroy/alfresco-custom-metadata-extractor","commit_stats":null,"previous_names":["aborroy/alfresco-custom-metadata-extractor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falfresco-custom-metadata-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falfresco-custom-metadata-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falfresco-custom-metadata-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falfresco-custom-metadata-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aborroy","download_url":"https://codeload.github.com/aborroy/alfresco-custom-metadata-extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247958705,"owners_count":21024821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alfresco","docker"],"created_at":"2025-02-14T19:56:06.398Z","updated_at":"2025-04-09T01:44:10.261Z","avatar_url":"https://github.com/aborroy.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Changing Default Property Mappings for PDF Metadata Extraction in Alfresco Transform\n\nA common requirement in Alfresco Transform is to change the mapping of out-of-the-box properties, such as mapping the `created` property to a custom property (e.g., `cm:removeAfter`) instead of the default `cm:created` (which is auditable and therefore not updatable) for a PDF file. This can be achieved by modifying the metadata extractor configuration files. These configuration files are found in the following locations:\n\n- [Tika Engine Metadata Extractors](https://github.com/Alfresco/alfresco-transform-core/tree/master/engines/tika/src/main/resources)\n- [Miscellaneous Engine Metadata Extractors](https://github.com/Alfresco/alfresco-transform-core/tree/master/engines/misc/src/main/resources)\n\n## Modifying PDF Metadata Extractor Configuration\n\nTo map the `created` property to the content model property `cm:removeAfter` for PDF files, redefine the `PdfBoxMetadataExtractor_metadata_extract.properties` configuration as follows:\n\n```properties\n# Namespaces\nnamespace.prefix.cm=http://www.alfresco.org/model/content/1.0\n\n# Mappings\nauthor=cm:author\ntitle=cm:title\ncreated=cm:removeAfter\nmodified=cm:modified\n```\n\n### Important Notes:\n1. **Namespace Specification**: All namespaces that the content model properties belong to must be specified, just like the sample from the documentation, using the ACME model (```namespace.prefix.acme=http://www.acme.org/model/content/1.0```)\n2. **Case Sensitivity**: Property names are case-sensitive.\n\nAdditional instructions can be found in the [Metadata Extractors Documentation](https://docs.alfresco.com/content-services/latest/develop/repo-ext-points/metadata-extractors/).\n\n## Applying the Configuration Using Docker\n\nThis project includes a sample [Dockerfile](Dockerfile) that applies the above configuration to the Docker Image `alfresco-transform-core-aio`. The Docker image can be built locally and used in a Docker Compose deployment.\n\n### Building and Running the Docker Image\n\n1. **Build the Docker Image**:\n   ```sh\n   docker build -t custom-transform-core-aio .\n   ```\n\n2. **Run the Docker Image**:\n   ```sh\n   docker run -p 8090:8090 custom-transform-core-aio\n   ```\n\n### Using Docker Compose\n\nYou can also include this custom image in a Docker Compose file for a complete deployment. \n\nBelow is an example `compose.yaml` file:\n\n```yaml\nservices:\n  transform-core-aio:\n    build:\n      context: ./transform\n    ports:\n      - \"8090:8090\"\n```\n\nInclude this `Dockerfile` in a folder `transform` on the same folder the `compose.yaml` file is living.\n\nDeploy the stack using Docker Compose:\n\n```sh\ndocker compose up\n```\n\nThis setup ensures that your custom metadata mappings are applied correctly within the Alfresco Transform service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborroy%2Falfresco-custom-metadata-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faborroy%2Falfresco-custom-metadata-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborroy%2Falfresco-custom-metadata-extractor/lists"}