Templates for file names #8
This commit is contained in:
parent
16299feced
commit
2c57094332
14 changed files with 231 additions and 115 deletions
|
|
@ -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('/')});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue