### Run Komf JAR File Source: https://github.com/snd-r/komf/wiki/Installation Execute Komf by running its JAR file. This method requires Java to be installed. The command takes the path to the configuration file as an argument. ```bash java -jar komf-x.y.z.jar ``` -------------------------------- ### Apache Velocity Template Example Source: https://github.com/snd-r/komf/wiki/Configuration This is an example snippet demonstrating the syntax for Apache Velocity templates, which can be used to customize Discord notification messages. The provided link offers further documentation on Velocity's user guide. ```velocity # Templates are written using Apache Velocity ([link to docs](https://velocity.apache.org/engine/2.3/user-guide.html)) ``` -------------------------------- ### Custom Discord Notification Template Example Source: https://context7.com/snd-r/komf/llms.txt An example of a custom Discord notification template using Apache Velocity syntax. This template defines how series and book information, including summary, authors, and genres, will be formatted in Discord embeds. ```velocity ## description.vm - Discord embed description template **$series.name** #if ($series.metadata.summary && $series.metadata.summary != "") $series.metadata.summary #end #if($books.size() == 1) ***New book was added to library $library.name:*** #else ***$books.size() new books were added to library $library.name:*** #end #foreach ($book in $books) - **$book.name** #end #if ($series.metadata.authors.size() > 0) **Authors:** #foreach($author in $series.metadata.authors)$author.name#if($foreach.hasNext), #end#end #end #if ($series.metadata.genres.size() > 0) **Genres:** #foreach($genre in $series.metadata.genres)$genre#if($foreach.hasNext), #end#end #end ``` -------------------------------- ### GET /media-server/libraries Source: https://context7.com/snd-r/komf/llms.txt Retrieves a list of libraries from the connected media server. ```APIDOC ## GET /media-server/libraries ### Description Fetches a list of all libraries available on the connected media server. This includes library IDs, names, and their root directories. ### Method GET ### Endpoint `/media-server/libraries` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the library. - **name** (string) - The display name of the library. - **roots** (array of strings) - A list of file system paths that constitute the library's content. #### Response Example ```json [ { "id": "09TDSWK3Q0XRA", "name": "Manga", "roots": ["/data/manga"] }, { "id": "0A1BCDEF23456", "name": "Light Novels", "roots": ["/data/novels"] } ] ``` ``` -------------------------------- ### Docker Compose for Komf Source: https://github.com/snd-r/komf/wiki/Installation Deploy Komf using Docker Compose. This YAML file defines the Komf service, including its image, container name, port mappings, user, environment variables for configuration, and volume mounts for persistent data. ```yaml version: "3.7" services: komf: image: sndxr/komf:latest container_name: komf ports: - "8085:8085" user: "1000:1000" environment: # optional env config - KOMF_KOMGA_BASE_URI=http://komga:8080 - KOMF_KOMGA_USER=admin@example.org - KOMF_KOMGA_PASSWORD=admin - KOMF_KAVITA_BASE_URI=http://kavita:5000 - KOMF_KAVITA_API_KEY=16707507-d05d-4696-b126-c3976ae14ffb - KOMF_LOG_LEVEL=INFO volumes: - /path/to/config:/config #path to directory with application.yml and database file restart: unless-stopped ``` -------------------------------- ### Default Description Template Example (Velocity) Source: https://github.com/snd-r/komf/wiki/Configuration This snippet demonstrates the default description template used in the Komf project, likely written in Velocity. It shows how to conditionally display series and book information based on available data. ```velocity #if ($series.metadata.summary != "") $series.metadata.summary #end #if($books.size() == 1) ***new book was added to library $library.name:*** #else ***new books were added to library $library.name:*** #end #foreach ($book in $books) **$book.name** #end ``` -------------------------------- ### GET /config Source: https://context7.com/snd-r/komf/llms.txt Retrieves the current Komf configuration settings. ```APIDOC ## GET /config ### Description Fetches the current configuration settings for the Komf service. This includes settings related to Komga, Kavita, metadata providers, and notifications. ### Method GET ### Endpoint `/config` ### Response #### Success Response (200) - **komga** (object) - Configuration for Komga integration. - **kavita** (object) - Configuration for Kavita integration. - **metadataProviders** (object) - Configuration for metadata providers. - **notifications** (object) - Configuration for notification services. #### Response Example ```json { "komga": { "baseUri": "http://localhost:25600", "komgaUser": "admin@example.org", "eventListener": { "enabled": true, ... }, "metadataUpdate": { ... } }, "kavita": { ... }, "metadataProviders": { ... }, "notifications": { ... } } ``` ``` -------------------------------- ### Get Enabled Metadata Providers (HTTP GET) Source: https://github.com/snd-r/komf/blob/master/README.md This HTTP endpoint allows you to retrieve a list of all enabled metadata providers configured in the system. You can optionally filter the results by providing a `libraryId` to get providers specific to a particular library. ```http GET /{media-server}/providers ``` -------------------------------- ### Docker Compose Setup for Komf Source: https://context7.com/snd-r/komf/llms.txt This Docker Compose configuration deploys Komf as a container, connecting it to Komga and Kavita instances. It specifies ports, environment variables for API URIs and credentials, log level, and volume mounts for configuration. Ensure to replace placeholder URIs and API keys with your actual values. ```yaml version: "3.7" services: komf: image: sndxr/komf:latest container_name: komf ports: - "8085:8085" user: "1000:1000" environment: - KOMF_KOMGA_BASE_URI=http://komga:25600 - KOMF_KOMGA_USER=admin@example.org - KOMF_KOMGA_PASSWORD=admin - KOMF_KAVITA_BASE_URI=http://kavita:5000 - KOMF_KAVITA_API_KEY=16707507-d05d-4696-b126-c3976ae14ffb - KOMF_LOG_LEVEL=INFO volumes: - /path/to/config:/config restart: unless-stopped ``` -------------------------------- ### GET /notifications/apprise/templates Source: https://context7.com/snd-r/komf/llms.txt Retrieves the current notification templates configured for Apprise. ```APIDOC ## GET /notifications/apprise/templates ### Description Get current Apprise notification templates. ### Method GET ### Endpoint /notifications/apprise/templates ### Response #### Success Response (200) - **titleTemplate** (string) - The template for the notification title. - **bodyTemplate** (string) - The template for the notification body. #### Response Example ```json { "titleTemplate": "$series.name", "bodyTemplate": "New books added to $library.name" } ``` ``` -------------------------------- ### Default Discord Description Template (Velocity) Source: https://github.com/snd-r/komf/blob/master/README.md This is an example of a default Velocity template file (`description.vm`) used for Discord notifications. It formats the output to include the series name, summary, and a list of new books added to a library. It uses conditional logic to handle single vs. multiple book additions. ```velocity ## Example of the default description template **$series.name** #if ($series.metadata.summary != "") $series.metadata.summary #end #if($books.size() == 1) ***new book was added to library $library.name:*** #else ***new books were added to library $library.name:*** #end #foreach ($book in $books) **$book.name** #end ``` -------------------------------- ### GET /media-server/connected Source: https://context7.com/snd-r/komf/llms.txt Checks the connection status to the configured media server. ```APIDOC ## GET /media-server/connected ### Description Verifies the connection status to the external media server that Komf is configured to interact with. ### Method GET ### Endpoint `/media-server/connected` ### Response #### Success Response (200) - **success** (boolean) - `true` if the connection is successful, `false` otherwise. - **httpStatusCode** (integer) - The HTTP status code returned by the media server. - **errorMessage** (string) - An error message if the connection failed, otherwise `null`. #### Response Example (Success) ```json { "success": true, "httpStatusCode": 200, "errorMessage": null } ``` #### Response Example (Failure) ```json { "success": false, "httpStatusCode": 401, "errorMessage": "Unauthorized" } ``` ``` -------------------------------- ### Search Series Metadata (Komf HTTP API) Source: https://context7.com/snd-r/komf/llms.txt This Bash command demonstrates how to use the Komf HTTP API to search for series metadata. The example shows a GET request to the `/metadata/search` endpoint with a `name` query parameter to find series matching 'One Piece'. The API will return metadata from the enabled providers for the specified series. ```bash # Search by series name curl -X GET "http://localhost:8085/metadata/search?name=One%20Piece" ``` -------------------------------- ### GET /notifications/discord/templates Source: https://context7.com/snd-r/komf/llms.txt Retrieves the current notification templates configured for Discord. ```APIDOC ## GET /notifications/discord/templates ### Description Get current Discord notification templates. ### Method GET ### Endpoint /notifications/discord/templates ### Response #### Success Response (200) - **titleTemplate** (string) - The template for the notification title. - **titleUrlTemplate** (string) - The template for the notification title URL. - **descriptionTemplate** (string) - The template for the notification description. - **fields** (array) - An array of field templates for the notification. - **footerTemplate** (string) - The template for the notification footer. #### Response Example ```json { "titleTemplate": "$series.name", "titleUrlTemplate": null, "descriptionTemplate": "**$series.name**\n\n#if ($series.metadata.summary != \"\")\n$series.metadata.summary\n#end", "fields": [], "footerTemplate": null } ``` ``` -------------------------------- ### Discord Notification Templates Source: https://context7.com/snd-r/komf/llms.txt Example of a custom Velocity template for generating Discord embed descriptions, allowing for dynamic content based on series and book data. ```APIDOC ## Discord Notification Templates ### Custom Velocity Template Example Create custom Discord message templates using Apache Velocity syntax. ```velocity ## description.vm - Discord embed description template **$series.name** #if ($series.metadata.summary && $series.metadata.summary != "") $series.metadata.summary #end #if($books.size() == 1) ***New book was added to library $library.name:*** #else ***$books.size() new books were added to library $library.name:*** #end #foreach ($book in $books) - **$book.name** #end #if ($series.metadata.authors.size() > 0) **Authors:** #foreach($author in $series.metadata.authors)$author.name#if($foreach.hasNext), #end#end #end #if ($series.metadata.genres.size() > 0) **Genres:** #foreach($genre in $series.metadata.genres)$genre#if($foreach.hasNext), #end#end #end ``` ``` -------------------------------- ### Get Enabled Metadata Providers (Komf HTTP API) Source: https://context7.com/snd-r/komf/llms.txt This Bash command uses `curl` to query the Komf HTTP API for a list of enabled metadata providers. You can retrieve the default providers or specify a `libraryId` to get providers configured for a particular library. The response is a JSON array of provider names. ```bash # Get default providers curl -X GET "http://localhost:8085/metadata/providers" # Response: # ["MANGA_UPDATES", "MAL", "ANILIST"] # Get providers for specific library curl -X GET "http://localhost:8085/metadata/providers?libraryId=09PERX1TW8GEK" # Response: # ["MANGA_UPDATES", "ANILIST", "BOOK_WALKER"] ``` -------------------------------- ### Library-Specific Provider Configuration in Komf Source: https://context7.com/snd-r/komf/llms.txt This configuration demonstrates how to set up different metadata providers for specific libraries within Komf. It shows examples for a Manga library and a Light Novel library, allowing you to assign priorities and enable/disable providers like MangaUpdates, AniList, MAL, and BookWalker on a per-library basis. ```yaml metadataProviders: defaultProviders: mangaUpdates: priority: 10 enabled: true libraryProviders: 09PERX1TW8GEK: # Manga library ID mangaUpdates: priority: 10 enabled: true aniList: priority: 20 enabled: true NOVEL_LIBRARY_ID: # Light novel library mal: priority: 10 enabled: true mediaType: "NOVEL" bookWalker: priority: 20 enabled: true mediaType: "NOVEL" ``` -------------------------------- ### GET /jobs Source: https://context7.com/snd-r/komf/llms.txt Retrieves a paginated list of metadata jobs, with optional filtering by status. ```APIDOC ## GET /jobs ### Description Fetches a paginated list of metadata processing jobs. Jobs can be filtered by their status (e.g., RUNNING, COMPLETED, FAILED). ### Method GET ### Endpoint `/jobs` ### Parameters #### Query Parameters - **status** (string) - Optional - Filters jobs by status. Allowed values: "RUNNING", "COMPLETED", "FAILED". - **page** (integer) - Required - The page number to retrieve (1-based index). - **pageSize** (integer) - Required - The number of jobs to return per page. ### Request Example ```bash # Get all jobs curl -X GET "http://localhost:8085/jobs?page=1&pageSize=20" # Filter by status (RUNNING, COMPLETED, FAILED) curl -X GET "http://localhost:8085/jobs?status=COMPLETED&page=1&pageSize=50" ``` ### Response #### Success Response (200) - **content** (array of objects) - A list of job objects. - **id** (string) - The unique ID of the job. - **seriesId** (string) - The ID of the series the job is related to. - **status** (string) - The current status of the job (e.g., "COMPLETED"). - **message** (string) - Any relevant message or error details. - **startedAt** (string) - Timestamp when the job started. - **finishedAt** (string) - Timestamp when the job finished. - **totalPages** (integer) - The total number of pages available. - **currentPage** (integer) - The current page number. #### Response Example ```json { "content": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "seriesId": "07XF6HKAWHHV4", "status": "COMPLETED", "message": null, "startedAt": "2024-01-15T10:30:00Z", "finishedAt": "2024-01-15T10:30:05Z" } ], "totalPages": 5, "currentPage": 1 } ``` ``` -------------------------------- ### GET /metadata/providers Source: https://context7.com/snd-r/komf/llms.txt Retrieves a list of enabled metadata providers for a specified library or the default providers if no library is specified. ```APIDOC ## GET /metadata/providers ### Description Get list of enabled metadata providers for a library. ### Method GET ### Endpoint /metadata/providers #### Query Parameters - **libraryId** (string) - Optional - The ID of the library to get providers for. ### Request Example ```bash # Get default providers curl -X GET "http://localhost:8085/metadata/providers" # Get providers for specific library curl -X GET "http://localhost:8085/metadata/providers?libraryId=09PERX1TW8GEK" ``` ### Response #### Success Response (200) - **array** (string) - A list of enabled metadata provider names. #### Response Example ```json // For default providers ["MANGA_UPDATES", "MAL", "ANILIST"] // For a specific library ["MANGA_UPDATES", "ANILIST", "BOOK_WALKER"] ``` ``` -------------------------------- ### GET /metadata/search Source: https://context7.com/snd-r/komf/llms.txt Searches for series metadata across all enabled metadata providers. ```APIDOC ## GET /metadata/search ### Description Search for series metadata across enabled providers. ### Method GET ### Endpoint /metadata/search #### Query Parameters - **name** (string) - Required - The name of the series to search for. ### Request Example ```bash # Search by series name curl -X GET "http://localhost:8085/metadata/search?name=One%20Piece" ``` ### Response #### Success Response (200) - **array** (object) - A list of search results, where each object contains metadata for a series. - **title** (string) - The title of the series. - **author** (string) - The author of the series. - **genres** (array) - A list of genres associated with the series. - **thumbnailUrl** (string) - The URL of the series thumbnail. - **provider** (string) - The metadata provider the result came from. - **providerId** (string) - The unique identifier of the series on the provider. #### Response Example ```json [ { "title": "One Piece", "author": "Eiichiro Oda", "genres": ["Action", "Adventure", "Fantasy"], "thumbnailUrl": "http://example.com/thumbnails/onepiece.jpg", "provider": "MANGA_UPDATES", "providerId": "12345" } ] ``` ``` -------------------------------- ### GET /metadata/series-cover Source: https://context7.com/snd-r/komf/llms.txt Fetches the series cover image from a specified provider. ```APIDOC ## GET /metadata/series-cover ### Description Retrieves the cover image for a series from a specific metadata provider. The image is typically saved to a file. ### Method GET ### Endpoint `/metadata/series-cover` ### Parameters #### Query Parameters - **libraryId** (string) - Required - The ID of the library the series belongs to. - **provider** (string) - Required - The metadata provider to fetch the cover from (e.g., "MANGA_UPDATES"). - **providerSeriesId** (string) - Required - The ID of the series on the specified provider's platform. ### Request Example ```bash curl -X GET "http://localhost:8085/metadata/series-cover?libraryId=09TDSWK3Q0XRA&provider=MANGA_UPDATES&providerSeriesId=1" \ --output cover.jpg ``` ### Response #### Success Response (200) The response body contains the image data for the series cover. The `Content-Type` header will indicate the image format (e.g., `image/jpeg`). #### Response Example (The response is the raw image data, not a JSON object.) ``` -------------------------------- ### GET /providers Source: https://github.com/snd-r/komf/blob/master/README.md Retrieves a list of enabled metadata providers. An optional `libraryId` parameter can be used to filter providers specific to a library. ```APIDOC ## GET /providers ### Description Use this endpoint to get information about enabled metadata providers. ### Method `GET` ### Endpoint `/{media-server}/providers` ### Query Parameters - **libraryId** (string) - Optional - The ID of the library to filter providers for. ``` -------------------------------- ### GET /metadata/search Source: https://context7.com/snd-r/komf/llms.txt Searches for series metadata, optionally filtering by library or series context. ```APIDOC ## GET /metadata/search ### Description Searches for series metadata. This endpoint can be used to find series information with or without library context. ### Method GET ### Endpoint `/metadata/search` ### Parameters #### Query Parameters - **name** (string) - Required - The name of the series to search for. - **libraryId** (string) - Optional - The ID of the library to filter the search results. - **seriesId** (string) - Optional - The ID of the series to filter the search results. ### Request Example ```bash curl -X GET "http://localhost:8085/metadata/search?name=Naruto&libraryId=09PERX1TW8GEK" ``` ### Response #### Success Response (200) - **url** (string) - The URL of the series on the provider's website. - **imageUrl** (string) - The URL of the series cover image. - **title** (string) - The title of the series. - **provider** (string) - The metadata provider. - **resultId** (string) - The ID of the series on the provider's website. #### Response Example ```json [ { "url": "https://www.mangaupdates.com/series.html?id=1", "imageUrl": "https://cdn.mangaupdates.com/image/1.jpg", "title": "One Piece", "provider": "MANGA_UPDATES", "resultId": "1" } ] ``` ``` -------------------------------- ### Get Discord Notification Templates (REST API) Source: https://context7.com/snd-r/komf/llms.txt Retrieves the currently configured templates for Discord notifications. These templates define how metadata information is formatted for Discord messages. The response includes templates for the title, URL, description, fields, and footer. ```bash curl -X GET "http://localhost:8085/notifications/discord/templates" ``` -------------------------------- ### GET /jobs/{jobId}/events (SSE) Source: https://context7.com/snd-r/komf/llms.txt Subscribes to real-time job events for a specific job using Server-Sent Events (SSE). ```APIDOC ## GET /jobs/{jobId}/events (SSE) ### Description Subscribe to real-time job events via Server-Sent Events. ### Method GET ### Endpoint /jobs/{jobId}/events ### Parameters #### Path Parameters - **jobId** (string) - Required - The unique identifier of the job. ### Headers - **Accept**: `text/event-stream` ### Response #### Success Response (200) - The response is a stream of Server-Sent Events, each containing event data. ### SSE Event Stream Examples ``` event: providerSeriesEvent data: {"provider":"MANGA_UPDATES"} event: providerBookEvent data: {"provider":"MANGA_UPDATES","totalBooks":10,"bookProgress":1} event: providerCompletedEvent data: {"provider":"MANGA_UPDATES"} event: postProcessingStart data: {} ``` ``` -------------------------------- ### Get Apprise Notification Templates (REST API) Source: https://context7.com/snd-r/komf/llms.txt Retrieves the current templates for Apprise notifications. Apprise is a notification-pushing library that supports numerous services. These templates define how messages are formatted for Apprise. The response includes templates for the title and body. ```bash curl -X GET "http://localhost:8085/notifications/apprise/templates" ``` -------------------------------- ### Komf CLI Options (Java) Source: https://github.com/snd-r/komf/wiki/Command-line-options Details the command-line options available when running Komf as a CLI tool. These options control configuration file paths, verbosity, and the target media server. ```bash --config-dir --config-file --verbose --media-server ``` -------------------------------- ### Basic application.yml Configuration for Komf Source: https://context7.com/snd-r/komf/llms.txt This basic application.yml file configures Komf's connection to Komga and Kavita servers, enables event-driven metadata updates, and sets up default metadata providers like MangaUpdates, MAL, and AniList with specified priorities. It also defines server port and log level. ```yaml komga: baseUri: http://localhost:25600 komgaUser: admin@example.org komgaPassword: admin eventListener: enabled: true metadataLibraryFilter: [] metadataSeriesExcludeFilter: [] notificationsLibraryFilter: [] metadataUpdate: default: libraryType: "MANGA" updateModes: [API] aggregate: false bookCovers: false seriesCovers: true postProcessing: seriesTitle: true seriesTitleLanguage: "en" orderBooks: true kavita: baseUri: "http://localhost:5000" apiKey: "16707507-d05d-4696-b126-c3976ae14ffb" eventListener: enabled: true metadataUpdate: default: libraryType: "MANGA" updateModes: [API] metadataProviders: malClientId: "your-mal-client-id" defaultProviders: mangaUpdates: priority: 10 enabled: true mediaType: "MANGA" mal: priority: 20 enabled: true aniList: priority: 30 enabled: true tagsScoreThreshold: 60 tagsSizeLimit: 15 server: port: 8085 logLevel: INFO ``` -------------------------------- ### Supported Metadata Providers Source: https://context7.com/snd-r/komf/llms.txt Lists the metadata providers supported by Komf and explains common integration patterns, including event listeners, API usage, webhooks, and batch processing. ```APIDOC ## Supported Metadata Providers Komf supports the following metadata providers: MangaUpdates, MyAnimeList (requires client ID), AniList, MangaDex, Nautiljon, BookWalker, Yen Press, Kodansha, Viz, ComicVine (requires API key), Bangumi (Chinese), Hentag, MangaBaka, and Webtoons. Each provider can be individually enabled and prioritized, with configurable field selection for both series and book metadata. The aggregation feature allows combining data from multiple sources, where missing fields from higher-priority providers are filled in by lower-priority ones. Common integration patterns include setting up event listeners for automatic metadata updates when new content is scanned, using the HTTP API with browser extensions for manual identification, configuring Discord webhooks for new book notifications, and using library-specific provider configurations for different content types (manga, light novels, webtoons). For large libraries, the batch match endpoints can update entire collections, while the job tracking API provides visibility into processing status and any errors encountered during metadata retrieval. ``` -------------------------------- ### Komga Configuration in application.yml Source: https://github.com/snd-r/komf/blob/master/README.md Defines the configuration settings for connecting to and interacting with a Komga server. Includes base URI, authentication, event listener settings, and metadata update preferences. It allows for customization of how metadata is fetched, aggregated, and applied, including cover updates and book ordering. ```yaml komga: baseUri: http://localhost:25600 #or env:KOMF_KOMGA_BASE_URI komgaUser: admin@example.org #or env:KOMF_KOMGA_USER komgaPassword: admin #or env:KOMF_KOMGA_PASSWORD eventListener: enabled: false # if disabled will not connect to komga and won't pick up newly added entries metadataLibraryFilter: [ ] # listen to all events if empty metadataSeriesExcludeFilter: [ ] notificationsLibraryFilter: [ ] # Will send notifications if any notification source is enabled. If empty will send notifications for all libraries metadataUpdate: default: libraryType: "MANGA" # Can be "MANGA", "NOVEL", "COMIC" or "WEBTOON". Hint to help better match book numbers updateModes: [ API ] # can use multiple options at once. available options are API, COMIC_INFO aggregate: false # if enabled will search and aggregate metadata from all configured providers mergeTags: false # if true and aggregate is enabled will merge tags from all providers mergeGenres: false # if true and aggregate is enabled will merge genres from all providers bookCovers: false # update book thumbnails seriesCovers: false # update series thumbnails overrideExistingCovers: true # if false will upload but not select new cover if another cover already exists overrideComicInfo: false # Replace existing ComicInfo file. If false, only append additional data postProcessing: seriesTitle: false # update series title seriesTitleLanguage: "en" # series title update language. If empty chose first matching title fallbackToAltTitle: false # fallback to first alternative tile if series title is not found alternativeSeriesTitles: false # use other title types as alternative title option alternativeSeriesTitleLanguages: - "en" - "ja" - "ja-ro" orderBooks: false # will order books using parsed volume or chapter number scoreTagName: "score" # adds score tag of specified format e.g. "score: 8" only uses integer part of rating. Can be used in search using query: tag:"score: 8" in komga readingDirectionValue: # override reading direction for all series. should be one of these: LEFT_TO_RIGHT, RIGHT_TO_LEFT, VERTICAL, WEBTOON languageValue: # set default language for series. Must use BCP 47 format e.g. "en" #TagName: if specified and if provider has data about publisher in that language then additional tag will be added using format ({TagName}: publisherName) #e.g. originalPublisherTagName: "Original Publisher" will add tag "Original Publisher: Shueisha" originalPublisherTagName: #publisherTagNames: # - tagName: "English Publisher" # language: "en" ``` -------------------------------- ### Configure Komf Metadata Providers Source: https://github.com/snd-r/komf/wiki/Configuration Defines the settings for various metadata providers, including MyAnimeList (MAL) client ID and default provider configurations for MangaUpdates, MAL, and Nautiljon. Each provider can be enabled or disabled, assigned a priority, and filtered by media type and role mappings. -------------------------------- ### Kavita Configuration in application.yml Source: https://github.com/snd-r/komf/blob/master/README.md Configures the connection and interaction settings for a Kavita server. Includes base URI, API key, event listener options, and metadata update preferences. This section allows for customization of metadata fetching, aggregation, and post-processing, similar to Komga, with specific options like locking covers. ```yaml kavita: baseUri: "http://localhost:5000" #or env:KOMF_KAVITA_BASE_URI apiKey: "16707507-d05d-4696-b126-c3976ae14ffb" #or env:KOMF_KAVITA_API_KEY eventListener: enabled: false # if disabled will not connect to kavita and won't pick up newly added entries metadataLibraryFilter: [ ] # listen to all events if empty metadataSeriesExcludeFilter: [ ] notificationsLibraryFilter: [ ] # Will send notifications if any notification source is enabled. If empty will send notifications for all libraries metadataUpdate: default: libraryType: "MANGA" # Can be "MANGA", "NOVEL", "COMIC" or "WEBTOON". Hint to help better match book numbers updateModes: [ API ] # can use multiple options at once. available options are API, COMIC_INFO aggregate: false # if enabled will search and aggregate metadata from all configured providers mergeTags: false # if true and aggregate is enabled will merge tags from all providers mergeGenres: false # if true and aggregate is enabled will merge genres from all providers bookCovers: false #update book thumbnails seriesCovers: false #update series thumbnails overrideExistingCovers: true # if false will upload but not select new cover if another cover already exists lockCovers: true # lock cover images so that kavita does not change them postProcessing: seriesTitle: false #update series title seriesTitleLanguage: "en" # series title update language. If empty chose first matching title alternativeSeriesTitles: false # use other title types as alternative title option alternativeSeriesTitleLanguages: - "ja-ro" orderBooks: false # will order books using parsed volume or chapter number. works only with COMIC_INFO languageValue: # set default language for series. Must use BCP 47 format e.g. "en" ``` -------------------------------- ### Configure Library-Specific Metadata Providers (YAML) Source: https://github.com/snd-r/komf/wiki/Configuration This configuration allows you to define a set of metadata providers that will be applied only to specific Komga libraries, identified by their IDs. You can set priorities and enable/disable providers for each library. ```yaml metadataProviders: defaultProviders: mangaUpdates: priority: 10 enabled: true libraryProviders: 09PERX1TW8GEK: mangaUpdates: priority: 10 enabled: true bookWalker: priority: 20 enabled: true 123: aniList: priority: 10 enabled: true mal: priority: 20 enabled: true ``` -------------------------------- ### GET /jobs/{jobId} Source: https://context7.com/snd-r/komf/llms.txt Retrieves the details of a specific metadata job using its unique ID. ```APIDOC ## GET /jobs/{jobId} ### Description Get details of a specific metadata job. ### Method GET ### Endpoint /jobs/{jobId} ### Parameters #### Path Parameters - **jobId** (string) - Required - The unique identifier of the job. ### Response #### Success Response (200) - **id** (string) - The job ID. - **seriesId** (string) - The ID of the series associated with the job. - **status** (string) - The current status of the job (e.g., COMPLETED, FAILED). - **message** (string) - Additional information or error message. - **startedAt** (string) - Timestamp when the job started. - **finishedAt** (string) - Timestamp when the job finished. #### Response Example ```json { "id": "550e8400-e29b-41d4-a716-446655440000", "seriesId": "07XF6HKAWHHV4", "status": "COMPLETED", "message": null, "startedAt": "2024-01-15T10:30:00Z", "finishedAt": "2024-01-15T10:30:05Z" } ``` ``` -------------------------------- ### Enable Metadata Aggregation (YAML) Source: https://github.com/snd-r/komf/wiki/Configuration To aggregate metadata from multiple sources instead of using only the first successful match, set the `aggregate` option to `true` within the `komga.metadataUpdate` configuration. This allows fetching data from additional providers if the primary one lacks information. ```yaml komga: metadataUpdate: default: aggregate: true ``` -------------------------------- ### Configure Provider Metadata Fields (YAML) Source: https://github.com/snd-r/komf/wiki/Configuration Customize the specific metadata fields (for series and books) that each provider should fetch. By default, all available data is retrieved. You can disable specific fields by setting their value to `false`. ```yaml metadataProviders: default: mangaUpdates: priority: 10 enabled: true seriesMetadata: status: true title: true titleSort: true summary: true publisher: true readingDirection: true ageRating: true language: true genres: true tags: true totalBookCount: true authors: true thumbnail: true releaseDate: true links: true score: true books: true useOriginalPublisher: true originalPublisherTagName: englishPublisherTagName: frenchPublisherTagName: bookMetadata: title: true summary: true number: true numberSort: true releaseDate: true authors: true tags: true isbn: true links: true thumbnail: true ``` ```yaml metadataProviders: default: mangaUpdates: priority: 10 enabled: true seriesMetadata: thumbnail: false ``` -------------------------------- ### Configure Komga Integration for Komf Source: https://github.com/snd-r/komf/wiki/Configuration Sets up the connection details and metadata update behavior for Komga. Includes base URI, authentication, event listening, notifications, and default metadata update modes like API and COMIC_INFO. It also allows for advanced post-processing options for series and books. ```yaml komga: baseUri: http://localhost:8080 #or env:KOMF_KOMGA_BASE_URI komgaUser: admin@example.org #or env:KOMF_KOMGA_USER komgaPassword: admin #or env:KOMF_KOMGA_PASSWORD eventListener: enabled: false # if disabled will not connect to komga and won't pick up newly added entries libraries: [ ] # listen to all events if empty notifications: libraries: [ ] # Will send notifications if any notification source is enabled. If empty will send notifications for all libraries metadataUpdate: default: updateModes: [ API ] # can use multiple options at once. available options are API, COMIC_INFO aggregate: false # if enabled will search and aggregate metadata from all configured providers mergeTags: false # if true and aggregate is enabled will merge tags from all providers mergeGenres: false # if true and aggregate is enabled will merge genres from all providers bookCovers: false # update book thumbnails seriesCovers: false # update series thumbnails postProcessing: seriesTitle: false # update series title seriesTitleLanguage: "en" # series title update language alternativeSeriesTitles: false # use other title types as alternative title option alternativeSeriesTitleLanguages: - "en" - "ja" - "ja-ro" orderBooks: false # will order books using parsed volume or chapter number scoreTag: false # adds score tag of format "score: 8" only uses integer part of rating. Can be used in search using query: tag:"score: 8" in komga readingDirectionValue: # override reading direction for all series. should be one of these: LEFT_TO_RIGHT, RIGHT_TO_LEFT, VERTICAL, WEBTOON languageValue: # set default language for series. Must use BCP 47 format e.g. "en" ``` -------------------------------- ### Disable Specific Metadata Field (YAML) Source: https://github.com/snd-r/komf/blob/master/README.md This YAML example demonstrates how to disable fetching a specific metadata field, in this case, the 'thumbnail' for series metadata from the mangaUpdates provider. Set the desired field to 'false' to exclude it from being fetched. ```yaml metadataProviders: default: mangaUpdates: priority: 10 enabled: true seriesMetadata: thumbnail: false ``` -------------------------------- ### Configure Discord Notifications (YAML) Source: https://github.com/snd-r/komf/wiki/Configuration Set up Discord notifications to be triggered when new books are added to your library. This involves specifying webhook URLs and optionally customizing the message format using Apache Velocity templates. ```yaml # Example config discord: title: # title string template. e.g. $series.name titleUrl: # title url string template. e.g. http://localhost:8080 descriptionTemplate: "discordWebhook.vm" # description template filename # list of field blocks. #fieldTemplates: # - name: "field name" # string template # templateName: "field1.vm" # template filename # inline: true # if true sets multiple field blocks to the same row fieldTemplates: footerTemplate: # footer template filename seriesCover: false # include series cover in message colorCode: "1F8B4C" # hex color code for message sidebar # List of discord webhook urls. Will call these webhooks after series or books were added. webhooks: # config example: webhooks: ["https://discord.com/api/webhooks/9..."] templatesDirectory: "./" # path to a directory with templates ``` -------------------------------- ### Run Komf CLI Tool (Java) Source: https://github.com/snd-r/komf/wiki/Command-line-options Executes Komf as a command-line interface tool for one-off operations. Requires the komf.jar file and accepts various options to specify configuration and commands. ```bash java -jar komf.jar [OPTIONS] ``` -------------------------------- ### Get Specific Job Details (REST API) Source: https://context7.com/snd-r/komf/llms.txt Retrieves detailed information about a specific metadata job using its unique ID. This endpoint is useful for monitoring the status and progress of individual jobs. It requires a valid job ID as a path parameter. ```bash curl -X GET "http://localhost:8085/jobs/550e8400-e29b-41d4-a716-446655440000" ``` -------------------------------- ### Configure Default Metadata Fields (YAML) Source: https://github.com/snd-r/komf/blob/master/README.md This YAML configuration snippet shows the default settings for metadata providers, specifically for mangaUpdates. It defines which metadata fields (e.g., title, summary, thumbnail) are fetched for series and books. You can customize these by setting individual fields to true or false. ```yaml metadataProviders: default: mangaUpdates: priority: 10 enabled: true authorRoles: [ "WRITER" ] artistRoles: [ "PENCILLER","INKER","COLORIST","LETTERER","COVER" ] seriesMetadata: status: true title: true titleSort: true summary: true publisher: true readingDirection: true ageRating: true language: true genres: true tags: true totalBookCount: true authors: true thumbnail: true releaseDate: true links: true score: true books: true useOriginalPublisher: true # prefer original publisher and volume information if source has data about multiple providers. If false will use english or other available publisher bookMetadata: title: true summary: true number: true numberSort: true releaseDate: true authors: true tags: true isbn: true links: true thumbnail: true ``` -------------------------------- ### Execute Komf Command (Java) Source: https://github.com/snd-r/komf/wiki/Command-line-options Demonstrates how to execute a specific Komf command, such as updating series metadata, using the CLI tool. This involves specifying the config file and the desired command with its arguments. ```bash java -jar komf.jar --config-file=./application.yml series update 09PQAG2PDNW4V ``` -------------------------------- ### Search for Series using Komf CLI Source: https://context7.com/snd-r/komf/llms.txt Searches for a series in the media server by its name using the Komf command-line interface. Supports specifying the configuration file and optionally the media server type (e.g., Kavita). ```bash java -jar komf.jar --config-file=./application.yml series search "One Piece" # With Kavita instead of Komga java -jar komf.jar --config-file=./application.yml --media-server=kavita series search "Naruto" ```