Skip to content

Commit

Permalink
fixed texts
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-baumberger committed Oct 18, 2023
1 parent 01156dd commit 46cbed0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Generate tables from a URL (which returns JSON) or a JSON string in your notes.

## Commands

| Command | Description |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Generate a table from selected JSON | Creates a Markdown table based on your selected JSON. The JSON needs to be valid. |
| Generate table from a selected JSON URL | Creates a Markdown table based on JSON data from a selected URL. The URL needs to return valid JSON. |
| Generate JSON from a selected table | Creatse JSON based on your selected table. |
| Command | Description |
| ------------------------------------- | -------------------------------------------------------------------------------------------------- |
| Generate table from selected JSON | Creates a Markdown table based on your selected JSON. The JSON needs to be valid. |
| Generate table from selected JSON URL | Creates a Markdown table based on JSON data from selected URL. The URL needs to return valid JSON. |
| Generate JSON from a selected table | Creatse JSON based on your selected table. |

### Examples

Expand Down Expand Up @@ -51,7 +51,7 @@ The Plugin was not release yet. You need to install it manually.

### Manually installing the plugin

- Go to [Releases](https://github.com/dario-baumberger/obsidian-json-table/releases)
- Go to the latest [Releases](https://github.com/dario-baumberger/obsidian-json-table/releases)
- Download `main.js`, `manifest.json`
- save into your vault `VaultFolder/.obsidian/plugins/obsidian-json-to-table/`

Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class JsonTablePlugin extends Plugin {
await this.loadSettings();

this.addCommand({
id: "json-table-convert-selection-to-table",
id: "generate-table-from-selected-json",
name: "Generate table from selected JSON",
editorCallback: (editor: Editor) => {
if (this.settings.devMode) {
Expand All @@ -33,7 +33,7 @@ export default class JsonTablePlugin extends Plugin {
});

this.addCommand({
id: "json-table-convert-from-url-to-table",
id: "generate-table-from-selected-json-url",
name: "Generate table from selected JSON URL",
editorCallback: async (editor: Editor) => {
const selection = editor.getSelection();
Expand All @@ -55,7 +55,7 @@ export default class JsonTablePlugin extends Plugin {
});

this.addCommand({
id: "json-table-convert-selection-to-json",
id: "generate-json-from-selected-table",
name: "Generate JSON from selected table",
editorCallback: (editor: Editor) => {
if (this.settings.devMode) {
Expand Down
16 changes: 6 additions & 10 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,32 @@ export class JsonTablePluginSettingTab extends PluginSettingTab {

containerEl.empty();

containerEl.createEl("h1", {
text: "JSON Table - Settings"
});

containerEl.createEl("h2", {
text: "Commands"
});

new Setting(containerEl)
.setName("Generate a table from selected JSON")
.setName("Generate table from selected JSON")
.setDesc(
"Creates a Markdown table based on your selected JSON. The JSON needs to be valid."
);

new Setting(containerEl)
.setName("Generate table from a selected JSON URL")
.setName("Generate table from selected JSON URL")
.setDesc(
"Creates a Markdown table based on JSON data from a selected URL. The URL needs to return valid JSON."
);

new Setting(containerEl)
.setName("Generate JSON from a selected table")
.setName("Generate JSON from selected table")
.setDesc("Creatse JSON based on your selected table.");

containerEl.createEl("h4", {
text: "Developper Settings"
text: "Debug Logging"
});
new Setting(containerEl)
.setName("Enable Debug Logging")
.setDesc("If anbled, more will be logged in the console.")
.setName("Enable debug logging")
.setDesc("If enabled, more will be logged in the console.")
.addToggle((toggle) =>
toggle
.setValue(this.plugin.settings.devMode)
Expand Down

0 comments on commit 46cbed0

Please sign in to comment.