Giter VIP home page Giter VIP logo

Comments (5)

brokosz avatar brokosz commented on August 14, 2024 1

@ are definitely new with the beta. Eduard recommended to me the other day to start using more folders with v3 to control the notes list (mine is... lengthy) so I expect to see more usage of them.

from alfred_noteplan_actions.

beet avatar beet commented on August 14, 2024

Wow, I'm not across folders in NotePlan at all as I haven't tried any of the betas. Personally, I'm more into searching/tagging and linking pages together with wiki-links than using hierarchical directory structures, but a lot of people (most?) do work that way.

You're right, it would totally cause any notes nested within a sub-dir to not be picked up by this workflow, but it should be simple enough to load notes recursively with a small change to NotePlan::Base#for_each_note:

def for_each_note(&block)
  Dir.glob("#{notes_directory}/**/*.txt") do |filename|
    yield NotePlan::NoteFile.for(filename)
  end
end

from alfred_noteplan_actions.

jgclark avatar jgclark commented on August 14, 2024

@beet, following my note in the original post on this issue, I believe the glob line will need to be more like:

Dir.glob("#{notes_directory}/{[!@]**/*,*}.txt") do |filename|

This is what I'm using in my own ruby scripts that support NotePlan.

from alfred_noteplan_actions.

jgclark avatar jgclark commented on August 14, 2024

Oh, this is frustrating. I've tried replacing just that one line in (the full 0.7.0 release of) NotePlan::Base with your update and running it again. Now I get exactly the same extensive debug logging that I reported in #14, and it fails to find the extra notes. Ditto with my suggestion amendment.
It feels like there's something that just breaks as soon as I tinker with your release, and so I've reverted. I hope it works better for you.

from alfred_noteplan_actions.

brokosz avatar brokosz commented on August 14, 2024

Dir.glob("#{notes_directory}/**/*.txt") do |filename|

So this works, but it fails on lib/note_plan/note_file.rb:

[09:50:01.519] NotePlan Actions[Script Filter] Queuing argument '(null)'
[09:50:01.866] NotePlan Actions[Script Filter] Script with argv '(null)' finished
[09:50:01.869] ERROR: NotePlan Actions[Script Filter] Code 1: /Users/brokosz/Dropbox/Mackup/alfred/Alfred.alfredpreferences/workflows/user.workflow.A89AA877-CF25-4DD5-9F50-17A38CF5ADB0/lib/note_plan/note_file.rb:30:in `module_eval': (eval):1: syntax error, unexpected tIVAR (SyntaxError)
NotePlan::NoteFiles::@Archive
                     ^~~~~~~~

NotePlan now has special character folders for Archive (@archive) and Trash (@trash).

from alfred_noteplan_actions.

Related Issues (13)

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.