mirror of
https://github.com/onlyworlds/obsidian-plugin.git
synced 2026-07-22 11:00:31 +00:00
remove world handlebar
This commit is contained in:
parent
26df48b833
commit
aa1a4aea83
3 changed files with 6 additions and 25 deletions
|
|
@ -5,6 +5,7 @@ import { WorldKeyModal } from 'Modals/WorldKeyModal';
|
|||
import { CreateTemplatesCommand } from './CreateTemplatesCommand';
|
||||
import { CreateSettingsCommand } from './CreateSettingsCommand';
|
||||
import { CreateCoreFilesCommand } from './CreateCoreFilesCommand';
|
||||
import { worldTemplateString } from 'Scripts/WorldDataTemplate';
|
||||
|
||||
export class ImportWorldCommand {
|
||||
app: App;
|
||||
|
|
@ -91,9 +92,8 @@ export class ImportWorldCommand {
|
|||
new Notice('Unexpected adapter type. This feature requires a file system-based vault.');
|
||||
return;
|
||||
}
|
||||
const fs: FileSystemAdapter = this.app.vault.adapter;
|
||||
const worldTemplatePath = normalizePath(`${this.app.vault.configDir}/plugins/onlyworlds-builder/Handlebars/WorldHandlebar.md`); const worldTemplateText = await fs.read(worldTemplatePath);
|
||||
const worldTemplate = Handlebars.compile(worldTemplateText);
|
||||
const fs: FileSystemAdapter = this.app.vault.adapter;
|
||||
const worldTemplate = Handlebars.compile(worldTemplateString);
|
||||
const worldContent = worldTemplate(worldData);
|
||||
const worldFilePath = `${worldFolderPath}/World.md`;
|
||||
await fs.write(worldFilePath, worldContent);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { WorldPasteModal } from 'Modals/WorldPasteModal';
|
|||
import { CreateTemplatesCommand } from './CreateTemplatesCommand';
|
||||
import { CreateSettingsCommand } from './CreateSettingsCommand';
|
||||
import { CreateCoreFilesCommand } from './CreateCoreFilesCommand';
|
||||
import { worldTemplateString } from 'Scripts/WorldDataTemplate';
|
||||
|
||||
export class PasteWorldCommand {
|
||||
app: App;
|
||||
|
|
@ -69,10 +70,8 @@ export class PasteWorldCommand {
|
|||
new Notice('Unexpected adapter type. This feature requires a file system-based vault.');
|
||||
return;
|
||||
}
|
||||
const fs: FileSystemAdapter = this.app.vault.adapter;
|
||||
const worldTemplatePath = normalizePath(`${this.app.vault.configDir}/plugins/onlyworlds-builder/Handlebars/WorldHandlebar.md`);
|
||||
const worldTemplateText = await fs.read(worldTemplatePath);
|
||||
const worldTemplate = Handlebars.compile(worldTemplateText);
|
||||
const fs: FileSystemAdapter = this.app.vault.adapter;
|
||||
const worldTemplate = Handlebars.compile(worldTemplateString);
|
||||
const worldContent = worldTemplate(worldData);
|
||||
const worldFilePath = `${worldFolderPath}/World.md`;
|
||||
await fs.write(worldFilePath, worldContent);
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
## Core
|
||||
- **Id:** {{id}}
|
||||
- **API Key:** {{api_key}}
|
||||
- **Name:** {{name}}
|
||||
- **Description:** {{description}}
|
||||
- **User Id:** {{user_id}}
|
||||
- **Version:** {{ow_version}}
|
||||
- **Image URL:** {{image_url}}
|
||||
|
||||
## Time Settings
|
||||
- **Focus Text:** {{focus_text}}
|
||||
- **Time Formats:** {{time_format_names}}
|
||||
- **Time Format Equivalents:** {{time_format_equivalents}}
|
||||
- **Basic Time Unit:** {{time_basic_unit}}
|
||||
- **Current Time:** {{time_current}}
|
||||
- **Time Range:** From {{time_range_min}} to {{time_range_max}}
|
||||
|
||||
|
||||
Loading…
Reference in a new issue