Templates for file names #8

This commit is contained in:
mProjectsCode 2022-05-22 12:59:14 +02:00
parent 16299feced
commit 2c57094332
14 changed files with 231 additions and 115 deletions

View file

@ -1,3 +1,6 @@
import {MediaType} from '../utils/MediaType';
import {stringifyYaml} from 'obsidian';
export abstract class MediaTypeModel {
type: string;
subType: string;
@ -8,10 +11,12 @@ export abstract class MediaTypeModel {
url: string;
id: string;
abstract toMetaData(): string;
abstract getFileName(): string;
abstract getMediaType(): MediaType;
abstract getTags(): string[];
toMetaData(): string {
return stringifyYaml({...this, tags: '#' + this.getTags().join('/')});
}
}