Coder Social home page Coder Social logo

ulauncher-obsidian's Introduction

Obsidian Ulauncher extension

Screenshot

This Ulauncher extension enables you to search your obsidian.md vault and create new notes on the fly.

Features

Keywords are customizable

  • on: Open note based on filename
  • of: Search the content of all notes
  • od: Open daily note
  • oc: Quick capture to a note

Install

Then open Ulauncher preferences window > extensions > add extension and paste the following url:

https://github.com/mikebarkmin/ulauncher-obsidian

Developer

Run Test

Currently, doctest is used for the functions and moment module. To run the tests execute the following command:

Install time_machine:

pip install time_machine
python3 -m src.functions
python3 -m src.moment

ulauncher-obsidian's People

Contributors

mikebarkmin avatar shanff 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ulauncher-obsidian's Issues

Extension fails to import Literal (available from python 3.6)

With some help from the folks at the Obsidian Discord, I was able to track down the root cause of the error in #7:

2021-10-04 14:09:48,583 | �[1;31mERROR�[0m | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.mikebarkmin.ulauncher-obsidian" failed with an error: ImportError: cannot import name 'Literal'

I'm running Ubuntu 18.04, which uses Python 2.7 by default but also has 3.6 available (I wish I could upgrade, but I'm currently unable to upgrade my Ubuntu version for work reasons). Literal is only available from 3.8 onwards.

Maybe there’s a backwards compatible way of doing whatever Literal does here. Someone also mentioned that Literal is available from typing_extensions. If none of this works, then adding Ubuntu 20.04 or Python 3.8+ in the readme as requirements is probably best

Loads selected note but doesn't bring existing Obsidian window to focus

So this is working and I'm excited to use this plugin, but when I select a note, it does open in Obsidian, but Obsidian doesn't receive focus, making it sort of painful then to still have to go switch to it. Any thoughts on how to fix? I'm running Ubuntu 21, Gnome/Unity desktop environment.

Error: Vault not found

Hi! I would like to report that the plugin is not working form me. I have my notes in an absolute Path but the plugins can't open my notes in Obsidian. It only displays them on Ulalauncher but when I try to open them, this error appears.

image

Regards.

ModuleNotFoundError: No module named 'src.items'

I debugged this extension and this was the error,

VERBOSE=1 ULAUNCHER_WS_API=ws://127.0.0.1:5054/com.github.mikebarkmin.ulauncher-obsidian PYTHONPATH=/usr/lib/python3/dist-packages /usr/bin/python3 /home/totoro/.local/share/ulauncher/extensions/com.github.mikebarkmin.ulauncher-obsidian/main.py
Traceback (most recent call last):
  File "/home/totoro/.local/share/ulauncher/extensions/com.github.mikebarkmin.ulauncher-obsidian/main.py", line 5, in <module>
    from src.items import quick_capture_note, show_notes, create_note, select_note, cancel
ModuleNotFoundError: No module named 'src.items'

I solved this by adding a empty file __init__.py to the src directory.

Create new note in specific folder?

I'm having a hard time with your plugin, I'd like to have it create new notes directly in a specific folder and with a particular template?

Can the plugin do this somehow?

Thanks!

Opening daily note not taking certain special characters

I Have my 'date' format as the following:

YYYY/MM-MMMM/YYYY-MM-DD-dddd

If running 'od' to open the daily note, instead of opening the note that's already created, for instance, 2023-01-21-Saturday, with the format above, it creates a new note with the title of '2023-01-21-%p' instead.

I also noticed that when I tried it utilizing '[' or ']', it wouldn't format the text in between the brackets as it does directly from within Obsidian.

I have yet to dig into the code to see if it's an easy enough fix, but just mentioning it's what I'm seeing currently.

Obsidian 1.1.12, installer 1.1.9
Just installed the ulauncher plugin today, so it's up-to-date with the version here.

[Feature request] Plugin for Albert (another quick launcher)

Hi!

I would like to know if there's any chance of making this amazing plugin available for Albert. Since both programs use third party plugins based o python I wondered if you can make a "port" for albert. I would do it myself but I'm not a programmer. So I asked, if it's posible, for your help.

Thanks in advance.

Saving vault location in settings throws error

Message: 'com.github.mikebarkmin.ulauncher-obsidian'
Error Name: UnhandledError
Type: KeyError

Stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3.9/site-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3.9/site-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 444, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3.9/site-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.mikebarkmin.ulauncher-obsidian'

Extension crashes instantly after install

Message: 'com.github.mikebarkmin.ulauncher-obsidian'
Error Name: UnhandledError
Type: KeyError

Stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 444, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.mikebarkmin.ulauncher-obsidian'

Path to vault does not stick

Hello, and thank you for this extension.

One minor issue: when I enter the path to the vault and save, it does not stick. When I reopen the preferences, the box is empty again.

Nonetheless the path seems correctly registered, as the extension functions as intended.

File "xxx" not found and of issue

The plugin finds my notes OK, however when selecting one Obsidian gives a File "xxx" not found error. With xxx being a random 3 digits.

Log -

2021-03-20 12:37:58,258 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.mikebarkmin.ulauncher-obsidian" 2021-03-20 12:37:58,285 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.mikebarkmin.ulauncher-obsidian" 2021-03-20 12:37:58,294 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 11 results 2021-03-20 12:37:59,024 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 0 results

Also whilst on works of doesn't. Typing of results in a single "Loading..." item, but nothing ever loads.

Log -

2021-03-20 12:37:43,868 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.mikebarkmin.ulauncher-obsidian" 2021-03-20 12:37:44,070 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results

[bug/feature request] Plugin use Daily notes setting even when the plugin is disabled, use Periodic notes if enabled instead

The plugin is looking for settings for the Obsidian Daily Notes plugin even if the plugin is disabled.
Sometimes people disable Daily Notes and use Periodic notes https://github.com/liamcain/obsidian-periodic-notes

Feature request: Check periodic notes setting if enabled.

Existing workaround for users of Periodic Notes: Enable Daily Notes, put the same settings as in Periodic Notes plugin, disable Daily Notes.

obsidian extension crashes

hey,

when i use ulauncher, the extension crashes immediately. in the logs i can find this:

ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib/python3.10/collections/init.py)

what am i doing wrong?

greetings
luigi

Create new note

Thank you very much for this extension!

Would it be possible to create a new note with a specified file name, then open this note in Obsidian, so I can add more details if I want? This has been my workflow with OneNote on Windows (using Win+N shortcut to create and open a new note) and I really miss it.

[BUG]: Loading...

Hi everyone,
whenever I try to use any command, I only get this message:

image

If I reinstall the extension, it works. However, after I restart my computer, it gives me the "Loading..." message again.
Thanks for any help!

Does not open notes

Just gave this a go, and sadly it does not open Obsidian at the selected note, no matter what I search for. Instead it ignores my already opened copy of Obsidian, and opens another instance which is on the Select a Vault screen.

I am running:

Kubuntu 20.0.4
KDE Plasma 5.18.5
Ulauncher 5.11

Any help appreciated. Thanks mate.

[feature request] Append to arbitrary note

Very useful extension, thank you! I use the quick capture feature constantly, but sometimes I want to add to some other note (append notes about an interaction with a person to their note, add something new I learned to a research note, etc).

[feature request] Support multi vaults

Hi! Thank you for your plugin, it's amazing! Many people use multi vaults, cause it's very handy to separate the cards from the absolutely different areas from each other.

It would be great if you added multi vaults support. It would be enough for me if the search was simply performed on all vaults at once.

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.