Skip to content

Commit

Permalink
Support Updatable Dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Jul 24, 2024
1 parent 917ca85 commit 7703f83
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/builders/dictionaryIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ export class DictionaryIndex {
this.index.author = author;
return this;
}
setIsUpdatable(isUpdatable: boolean) {
this.index.isUpdatable = isUpdatable;
return this;
}
setIndexUrl(indexUrl: string) {
this.index.indexUrl = indexUrl;
return this;
}
setDownloadUrl(downloadUrl: string) {
this.index.downloadUrl = downloadUrl;
return this;
}
setDescription(description: string) {
this.index.description = description;
return this;
Expand Down
10 changes: 8 additions & 2 deletions src/types/yomitan/dictionaryindex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ type TagInfo = {
type DictionaryIndexType = {
/** Title of the dictionary. */
title: string;
/** Revision of the dictionary. This value is only used for displaying information. */
/** Revision of the dictionary. This value is displayed, and used to check for dictionary updates. */
revision: string;
/** Whether or not this dictionary contains sequencing information for related terms. */
sequenced?: boolean;
/** Format of data found in the JSON data files. */
format?: 1 | 2 | 3;
/** Creator of the dictionary. */
author?: string;
/** URL for the source of the dictionary. */
/** Whether this dictionary contains links to its latest version. */
isUpdatable?: boolean;
/** URL for the index file of the latest revision of the dictionary, used to check for updates. */
indexUrl?: string;
/** URL for the download of the latest revision of the dictionary. */
downloadUrl?: string;
/** URL for the source of the dictionary, displayed in the dictionary details. */
url?: string;
/** Description of the dictionary data. */
description?: string;
Expand Down

0 comments on commit 7703f83

Please sign in to comment.