Coder Social home page Coder Social logo

hananoshikayomaru / obsidian-run Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 1.0 254 KB

Generate markdown from dataview query and javascript.

Home Page: https://yomaru.dev

License: MIT License

Shell 2.98% JavaScript 2.41% TypeScript 94.61%
dataview obsidian

obsidian-run's People

Contributors

aidenlx avatar chrisgrieser avatar clemens-e avatar edo78 avatar ericaxu avatar fyears avatar gitmurf avatar hananoshikayomaru avatar henrebotha avatar inouetakuya avatar joethei avatar kostapc avatar lishid avatar phibr0 avatar pozdneev avatar reorx avatar taurelas avatar tfthacker avatar timrogers avatar tokuhirom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

icehongssii

obsidian-run's Issues

add donate to plugin ๐Ÿฅฒ

Is your feature request related to a problem? Please describe.

CleanShot 2023-10-05 at 00 49 54@2x

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.

Feature Request: Remove notification if there are no run blocks to execute.

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:

  • No notification at all. Just execute the run blocks. The user can use console.log to check for any diagnostics.
  • Notify the user if there are any errors.
  • Always notify the user -- this is the current approach of the plugin.

Keep up the good work!

[YOM-581] async run doesn't replace the text when there is space

Describe the bug
when there are space between run start and codeblock, async function doesn't work.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

image

Additional context
what is your OS? did you try to narrow the scope of issue? Any other context?

From SyncLinear.com | YOM-581

directly evulate dataview query

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.

[YOM-579] periodic update of some notes

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.

YOM-579

[YOM-596] support generation inside callout or blockquote

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.

YOM-596

Feature Request: Allow folding the "block run" starting tag.

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. ๐Ÿ˜‰

Feature Request: Allow variables defined in one "run block" to be used in all subsequent "run blocks" -- page-level scoping

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.

support HTML comment syntax

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.

BRAT does not recognise and install the update(s)

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

Await is only valid in async functions and the top level bodies of modules

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

inline run block

Is your feature request related to a problem? Please describe.

this is my %%= 3%% note

Describe the solution you'd like

  1. inline expression only work on simple javascript expression but not multiple statements
  2. if user really multiple lines statement, they can use the user defined script with templater

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.