Templates for file names #8
This commit is contained in:
parent
16299feced
commit
2c57094332
14 changed files with 231 additions and 115 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import {MediaTypeModel} from './MediaTypeModel';
|
||||
import {stringifyYaml} from 'obsidian';
|
||||
import {mediaDbTag} from '../utils/Utils';
|
||||
import {MediaType} from '../utils/MediaType';
|
||||
|
||||
|
||||
export class WikiModel extends MediaTypeModel {
|
||||
|
|
@ -23,19 +23,15 @@ export class WikiModel extends MediaTypeModel {
|
|||
|
||||
Object.assign(this, obj);
|
||||
|
||||
this.type = 'wiki';
|
||||
}
|
||||
|
||||
toMetaData(): string {
|
||||
return stringifyYaml({...this, tags: '#' + this.getTags().join('/')});
|
||||
}
|
||||
|
||||
getFileName(): string {
|
||||
return this.title;
|
||||
this.type = this.getMediaType();
|
||||
}
|
||||
|
||||
getTags(): string[] {
|
||||
return [mediaDbTag, 'wiki'];
|
||||
}
|
||||
|
||||
getMediaType(): MediaType {
|
||||
return MediaType.Wiki;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue