Jump to content

Acidham

Member
  • Posts

    429
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by Acidham

  1. 3 minutes ago, deanishe said:

    Messing around with your global macOS environment is a bad idea because you'll end up publicly releasing a workflow that only runs on your system.

     

    This is what I want to avoid. Therefore I thought that good practice is to use/usr/bin/env python3 shebang. I thought when I  would use absolute path to python 3.8 interpreter I am releasing a WF that just works on my system 😕

  2. When I add shebang #!/usr/bin/env python3 to my python WFs Alfred is always picking up Python 3.7.3 but I am expecting version 3.8.2.

     

    When I run /usr/bin/env python3 -V on iTerm or Terminal I am getting version 3.8.2

     

    I checked the PATH in Alfred WF python script and I am getting: PATH:  /usr/bin:/bin:/usr/sbin:/sbin

    In iTerm or Terminal, I am getting: /Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/usr/local/go/bin:/Users/jjung/Library/Python/2.7/bin:/usr/local/opt/fzf/bin

     

    I am using zsh and therefore I checked which SHELL the Alfred WF python script is using with os.environ['SHELL']: /bin/zsh

     

    With where python3 I am getting:

    where python3
    /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
    /usr/local/bin/python3
    /usr/bin/python3

     

     

    Conclusion: Alfred is using zsh shell which I am also using but why it PATH in Python script is different form PATH in shell?

     

    I am not able to get Python 3.8.2 used in my scripts. What I am missing here?

  3. 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?

  4. 1 hour ago, cands said:

     

    Yes, that is a problem. Is it the sub-folders scanning that is taking time? I would be very happy if it was just possible to manually add some folders, like a static list of folders (e.g. defined in the path_to_notes variable separated by commas, or maybe picked up from a text file), so only these paths were searched but no subfolders. Maybe that would not affect performance noticeably? 


    Yep I will look into add additional folders readonly

  5. 1 hour ago, deanishe said:

     

    It's more likely the sheer number of files.


    I compared os.listdir (flat) vs os.walk (sub) and walk is 50 times slower. With listdir I tested with 100 k files and performance is good enough to serve md notes wf.

     

    I am happy to accept PR with subfolder scanning (Or other solutions) with compareable performance 

  6. Over the past days I ran some tests on implement  additional directories and sub-folders scanning but the performance loss is around 50 times slower. To get to same or equal performance experience I need to implement and index. For my personal requirements I don't need additional directories and therefore  I refrain from implementing additional directories and sub-folder scanning. Sorry!

  7. For some reason I am not able to switch background images in themes editor. When I click on the mountain icons nothing happens and the background stays empty. Any idea on how to restore the backgrounds?

    I tried to reinstall but it does not solve the issues. I am on Alfred 4.0.8 on macOS 10.15.3

     

     

    Screenshot 2020-02-15 at 15.05.02.png

  8. 7 minutes ago, M0ll3art said:

     

    really like your WF but I would really like to know if you made any progress on this one?  

     

    I started to investigate what needs to be changed and the changes are require a lot of adoption. I am now thinking of just implementing read to additional folder but new notes will go to the default directory. With that I can leave current code-base as it is and just add a new search, aggregating additional directories.

    thoughts?

  9. Strange, When I enter

    1. Test
    2. Friday
    3. 7:00
    4. Work

    Can you confirm to get Reminder added at 12:00 am with entries in WF steps above?

     

    Can you execute the following script in ScriptEditor? At what time the Reminder gets created?

     

    tell application "Reminders"
    	set theDate to date ("12 February 2020 at 07:00:00 am")
    	tell list "Work"
    		make new reminder with properties {name:"Test", remind me date:theDate}
    	end tell
    end tell

     

×
×
  • Create New...