Jump to content

Alfred Markdown Notes


Recommended Posts

23 hours ago, deanishe said:

Python 3 is 3x faster on my machine because it uses scandir under the hood.

 

Good catch! Indeed it is way faster and therefore a good option. The only thing is that macOS will be shipped with Python 2.7 and Python 3 requires custom installation. But maybe I need to proceed with Python 3 instead.

 

Quote

A propos of not very much, I've been using MeiliSearch in quite few workflows

 

Interesting! As far as I understood MeiliSearch requires a server running in the background. How did you implemented this with Alfred especially starting/stopping the server?

Link to comment
25 minutes ago, Acidham said:

The only thing is that macOS will be shipped with Python 2.7

 

I wasn't suggesting using Python 3. I just thought it was an interesting datapoint. Have you tried using find or mdfind?

 

25 minutes ago, Acidham said:

How did you implemented this with Alfred especially starting/stopping the server?

 

I didn't. I installed it (via Homebrew, IIRC) and just leave it running. I've never actually released a workflow that uses it, but it makes it extremely simple to write workflows (or scripts) that search stuff, and it's a great little search engine. It's a lot easier than using SQLite, and it's smarter, too. It supports diacritic folding and case-insensitive search on non-ASCII text out-of-the-box, which SQLite leaves up to you to implement (SQLite isn't Unicode-aware).

 

I just thought it was an interesting tool worth mentioning.

Edited by deanishe
Link to comment
  • 3 months later...
On 1/28/2020 at 7:41 AM, Acidham said:

In my previous post I rejected to add subfolder scanning/searching but adding more than one folder would be a nice alternative. I will take a look into adding multiple folder in config which will be searched as well...

 

Any progress on this? I really like the workflow but it is a major limitation that it can search only one folder. 

 

A less important thing, it seems that searching tags suffer from not supporting unicode, tags with umlauts are not shown or searched as expected. Could you provide the same fix as you did for titles? 

Link to comment

@cands as mentioned before, I am not implementing subfolder scanning due to performance decrease. 

 

Re. German, umlaut for me it works. I am able to search for Bäume via `mdt#Bäume` as well as via `mds #bäume`. Can you provide me with debugging output?

Link to comment
  • 2 weeks later...
On 6/16/2020 at 8:03 PM, Acidham said:

@cands as mentioned before, I am not implementing subfolder scanning due to performance decrease. 

 

Re. German, umlaut for me it works. I am able to search for Bäume via `mdt#Bäume` as well as via `mds #bäume`. Can you provide me with debugging output?

 

Yes, I wasn't referring to subfolder scanning, I was thinking of manually adding a list of folders that could be searched (e.g. as a workflow environment variable or in a text file). You said earlier that it would be a nice alternative and that you could look into it. 

 

Regarding the umlaut issue, the debugger does not report any problem. However, it is not working as expected. For example, I use the tag "slutför" and when all tags are shown it is shown only in partial as "slutfo", and when searching for it nothing is shown (whether I write it out fully or partially). Please see screenshots. I'm using version 2.4.0 of your workflow on macOS 10.14.6 and Alfred 4.0.9. 

tag_slutför.png

 

search_tag_slutför.png

Edited by cands
Link to comment
On 6/26/2020 at 8:14 AM, Acidham said:

@cands Strange, I but it worked some time before given your previous posts right?

 

Please download newest version from files (not from releases). I did some minor improvements which may help. For me German umlauts works. 

 

Thanks, using the newest version (2.4.1) it now works to search with Swedish umlauts. They are still not shown properly (still like “slutfo”), but that's not a major thing. I honestly don't remember how it worked before, I have not used tags so much and I may simply have missed such problems. 

Link to comment

@cands I am now seeing another issue: You typed 

md# slutför

but I implemented without white space, therefore try

md#slutför

or change in workflow if you like to type with white space

Edited by Acidham
Link to comment
19 hours ago, Acidham said:

@cands I am now seeing another issue: You typed 


md# slutför

but I implemented without white space, therefore try


md#slutför

or change in workflow if you like to type with white space

 

@Acidham Yes, I confirm that it works to search now in version 2.4.1 (except tags with umlaut only showing partially, as explained above, no big deal). Searching without white space is convenient so I'd like to keep that, thanks for explaining. 

 

Link to comment
  • 3 weeks later...

@Acidham thank you a lot for this, it's a great workflow. Im using zettelkasten id's on my md filenames, I added this two lines of code on the getTargetFilePath function:

 

        zettelid = self.getTodayDate("%Y%m%d%H%M")
        file_name = Tools.strJoin(zettelid,' ',file_name)

Maybe you could set up a env var for that option. I don't know Python, I just arranged this humble add-on copying and pasting from the rest of the code :)

 

Link to comment

@Acidham my main source of Zettelkasten wisdom comes from the forum at zettelkasten.de. I'm impressed of the several high quality and well thought topics there, rather  than talking about an app it's more about the philosophy of knowledge management.

 

https://zettelkasten.de

 

I'm also enjoying conversation on bear subrredit, obsidian forums and now this forum. I avoided alfred for years but Spotlight for some reason started to misbehave, couldn't fix it and MacOS reinstall is out of the question. Well, and also I migrated from Bear to local-notes paradigm.

 

The reason I'm using the Zettel IDs is  that I liked the way I can sort by name in Finder, Windows or any app really. I've found that file modification dates can be messy, specially when synchronization is at works with the likes of Dropbox or Icloud. I'm intrigued also by this "Unique ID", even though I still haven't really found a use case for that, at least in my workflow - mainly because I've been a lazy note linker. Not being particularly disciplined in this means I must not ever change  the filename of the note, even though  I might have thought a better name, because  it can break MD links.

 

BTW I don't use that YAML header I see in the template of your workflow. Why you see the need of that header? In my case:

1- The creation date is on the file (although not reliable) and the Zettel ID (though you are forced to set up that ID)

2- Tags might be mentioned in any part of the note. Actually I use to set them at the bottom because it's not important for the content, just for finding the right note. Also it's easy to batch add tags on expression-matching notes by appending text just with bash.

 

Link to comment

@pdazero I am aware of Zettelkasten and I used it for some time but I decided to implement my own solution without having another client end app dependency. I am using filename derived from title of the Note because I would like to stay independent. Sometimes I am just looking at the directory level to find notes without using Alfred and date only does not bring any value to me. 

 

The YAML header, why I am using it...just because I like it ;)

Link to comment

Absolutely agree with you. I think note taking is a very personal thing. I actually don't do a "proper" Zettelkasten, just taking what I like and works for me. Been to lot of note taking apps but the simplicity of md files is my new wave.

 

Do note that the Zettel ID is not client nor app dependent though. Just a naming convention.

 

I read in one of the posts that your scripts "auto-update"? How is that so? It would break my zettel id naming hack?

Link to comment

Looking into this, seems interesting!

 

Although I got the system working, I cannot figure out how to write ToDos in my markdown files. The comment seemed to suggest that I should do a minus followed by the todo in square brackets (i.e., - [my todo]), but Typora converts that to an unnumbered list and "mdt" says it found no ToDos.

 

Thanks,

  Abhijit

Link to comment

Hi @Acidham I think I might found a bug. I have files with tildes on them (spanish filenames) and I found this error on debug:

File "/Users/xyz/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CD0290B9-FE6D-4D27-9D91-7686F6F93660/search_actions.py", line 35, in <module>
    "arg": u"{0}|[[{2}]]({2})".format("link", note_title, os.path.basename(note_path)),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 24: ordinal not in range(128)

Thanks,

Link to comment
12 hours ago, Acidham said:

Can you provide me with the filename or at least an example? I need to reproduce the issue on my end. 

 

Here:

202007140936  Presentación Status.md

Sorry its not "tilde"  but "spanish accent",  I got lost in translation...

Link to comment
5 minutes ago, Acidham said:

What was the action until error was thrown? e.g. create note, Create MD Link, etc

 

Which version of the Workflow are u using?

 

First Search ('mds'), then actions menu (apple key + enter) and the menu does not display.

 

Latest version: 2.4.0 with my humble addition (zettel id)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...