hananoshikayomaru / obsidian-run Goto Github PK
View Code? Open in Web Editor NEWGenerate markdown from dataview query and javascript.
Home Page: https://yomaru.dev
License: MIT License
Generate markdown from dataview query and javascript.
Home Page: https://yomaru.dev
License: MIT License
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
A notification is displayed on every save, even if there are no run blocks
to execute. This can be annoying.
The UX can be enhanced if the notification level can be set -- options:
run blocks
. The user can use console.log
to check for any diagnostics.Keep up the good work!
Describe the bug
when there are space between run start
and codeblock, async function doesn't work.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Additional context
what is your OS? did you try to narrow the scope of issue? Any other context?
From SyncLinear.com | YOM-581
See #9 -- the issue persists.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
the id
is confusing. let's remove this.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
what if we have conditional update?
Originally posted by @HananoshikaYomaru in #16 (comment)
Variables are scoped to the run
block they are defined in and cannot be used in other blocks
on the same page.
The usability of the plugin can be enhanced even further if the scoping of variables is extended to the page level. That would allow users to define variables in one block for re-use in any other (following) blocks.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The UX can be enhanced further if one could fold the block run
starting tag %% run start <id> <expression> ... %%
.
The visual result would be:
%% run start <id>
Output
%% run end %%
That looks much neater in edit and source mode, i.e., it would be less disruptive while writing a note.
Look at how the Fold Anywhere
plugin does it: https://github.com/Quorafind/Obsidian-Fold-Anywhere.
By the way: there are compatibility issues of Run
with Fold Anywhere
you might want to look into. ๐
See start of the discussion in #6.
I would like to be able to define the following -- simple example:
%% start run 01
~~~js
const modal = app.plugins.plugins.modalforms.api
const obs = await self.require.import("[[user.script.obsidian.delay-until-synced.mjs]]")
const timer = 1000
~~~
%%
and to re-use the variables in a following run block
:
%% start run 02
~~~js
obs.delayUntilSynced(timer, () => {
const data = modal.openForm("test-form")
console.log(data)
}, {omit: ["name"]})
%%
The idea is to consolidate all variable declarations in one place for easier management.
Furthermore, if I would have to call the openForm
modal function in another run block
, I currently have to re-declare the access
to the API -- an additional step I would like to avoid.
The icing on the cake would be that any run block
could use any page-level (scoped) variables
wherever they are declared.
Is your feature request related to a problem? Please describe.
support <!-- -->
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
I am still on version 1.0.1
and am trying to update to 1.0.3
via BRAT
-- does not recognise the latest update(s).
To Reproduce
Run the BRAT: Plugins: Check for updates for all beta plugins and UPDATE
or BRAT: Plugins: Choose a single version to update
command.
See the info message: BRAT No update available for HananoshikaYomaru/obsidian-run
, when running the single version update command.
Expected behavior
Brat
to install the latest update.
Additional context
SYSTEM INFO:
Obsidian version: v1.4.14
Installer version: v1.4.14
Operating system: Windows 11 Home Single Language 10.0.22621
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: Minimal v7.2.3
Snippets enabled: 33
Restricted mode: off
Plugins installed: 49
Plugins enabled: 43
Describe the bug
Async
function calls are not possible in the run start
block.
To Reproduce
I am trying to run the following code:
%% run start 0
```js
const {reverse} = await self.require.import("[[user.script.fp.reverse.mjs]]")
const a = [1, 2, 3]
const b = reverse(a)
return `a = ${a}\nb = ${b}`
```
%%
Run
generates the following end tag metadata:
%% run end
error: await is only valid in async functions and the top level bodies of modules
%%
Expected behavior
The output should be:
a = 1,2,3
b = 3,2,1
The following Templater
snippet works as expected:
<%*
const {reverse} = await self.require.import("[[user.script.fp.reverse.mjs]]")
const a = [1, 2, 3]
const b = reverse(a)
tR += `a = ${a}\nb = ${b}`
_%>
Additional context
SYSTEM INFO:
Obsidian version: v1.4.14
Installer version: v1.4.14
Operating system: Windows 11 Home Single Language 10.0.22621
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: Minimal v7.2.3
Snippets enabled: 33
Restricted mode: off
Plugins installed: 49
Plugins enabled: 43
Is your feature request related to a problem? Please describe.
this is my %%= 3%% note
Describe the solution you'd like
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.