Jump to content

giovanni

Member
  • Posts

    524
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by giovanni

  1. yes @alfredpanda there seem to be a few (pre-existing I think, or induced by Slack changes) bugs. What did clear do? Just reset the status, or also resume notifications? Currently it only resets status. Anyway, try this version, I also added the workflow configuration.
  2. that is how it was, as Argument is required. If you want to use the default set the Argument to optional.
  3. @alfredpanda here you go. Please note that some status icons (e.g. :brb:) are not native to Slack and need to be installed (or edited). If others are interested I can make a more refined version where these icons are set in Workflow configuration etc.
  4. are you trying to pass to another script or to the Alfred window? if the latter, you need to use the JSON syntax. Quick example:
  5. thanks @vitor! I made those changes. I will add a post to the Gallery list, perhaps after a few users test it and don't find huge bugs 😅
  6. alfred-kindle 📚 Motivation ✅ - Quickly list, search, and open your Kindle books Setting up ⚙ī¸ - Alfred 5 with Powerpack license - Python3 - Kindle app installed Default settings - In Alfred, open the Configure Workflow menu in alfred-kindle preferences - set the keyword for the workflow (default: !k) - set the book content icon, i.e. if a book has been downloaded locally (default: 📘) - show 'ghost' books (i.e. books not downloaded, or previously loaned)? (default: yes) - set search scope (default: 'Title') - Title: search titles only - Author: search authors only - Both: search across titles and authors Basic Usage 📖 - launch with keyword (default: !k), or custom hotkey - enter ↩ī¸ will open the book in Kindle (if downloaded) or the corresponding webpage on Amazon (if not downloaded) Limitations & known issues ⚠ī¸ - None for now, but I have not done extensive testing, let me know if you see anything! - tested with ~100 books. The book list is currently created on the fly, and book covers are downloaded if missing. Might be slower if your library has thousands of books, in which case a sqlite database it might be more efficient. Let me know if that is the case! - not tested thoroughly for user-uploaded documents. - tested with Python 3.9.13 Acknowledgments 😀 - Thanks to the Alfred forum community! - Icon from SF symbols Changelog 🧰 - 02-28-2023: version 0.1 Feedback 🧐 Feedback welcome! If you notice a bug, or have ideas for new features, please feel free to get in touch either on [Github](https://github.com/giovannicoppola/alfred-kindle), or here. Download âŦ‡ī¸ | Github
  7. is Zotero open? It needs to be closed, at least when Zothero creates its own copy of the database.
  8. I made this change. Still trying to get it to be faster... Right now, in order to get tag info, it runs mdls as a subprocess in the Python script. I tried mdfind and it is even slower. I also tried to run mdls directly in the shell, then passing 2 arrays (file paths and labels) to the Python script, and I was surprised to see that it is still slower than running subprocesses in Python? I must be doing something wrong. The shell script is below if anybody has suggestions. export PATH=/opt/homebrew/bin:/usr/local/bin:$PATH myQuery="$1" if [[ ${#myQuery} -gt 3 ]] then # Use the -0 option to separate file names with a null character IFS=$'\n' while read -r -d '' file; do # Append the file name to the array files+=("$file") done < <(mdfind "kMDItemDisplayName == '*$myQuery*'c" -0 -onlyin ~/) for file_path in "${files[@]}" do # Use mdls to retrieve the metadata of the file # then parse the output tags=$(mdls -name kMDItemUserTags "$file_path" | sed 's/kMDItemUserTags = (//g' | sed 's/)//g' | tr -d ' ' | tr -d '\n') # Append the tags to the array tags_array+=("$tags") done fi python3 aadv.py "$files" "$tags_array" else cat << EOB {"items": [ { "title": "❗Enter 4 characters at least", "subtitle": "length: ${#myQuery} (${myQuery})" } ]} EOB fi
  9. Hi @paulmoons to clarify, what I added is a general search (keyword: zzz) which shows the tags
  10. it might be too slow, but I have added this feature to aadvarq (a draft workflow created in response to another question on the forum) Check the 'Show Label Colors' option, then search using the zzz keyword. Because it is so slow if there are many results, I restricted the search query to 4+ characters. happy to refine with a faster method (currently using mdls) if others have suggestions.
  11. @xilopaint This works for me. Let me know if you see anything off.
  12. yes this is the Python2 version. Could you try this version?
  13. could you share the output from the debugger? or, any error from the log file accessible from zotconf?
  14. add a non-null argument, like this: {"title": time, "arg": "-"} Arguments are optional but recommended
  15. welcome @MeaCulpa2023, yes I made one to create a note in response to another thread. here is additional information on how you can modify it to append text to an existing note.
  16. 1. Alfred reverts to file search if the script fails. You can handle that in the script, e.g. returning a different JSON result if the script fails 2. actioning a result should quit Alfred. You can use a Hide Alfred utility for finer control
  17. yes, it sounds like chaining script filters is what you want. Do these threads help?
  18. Hi @introom, you can use a Script Filter for that. Alfred has an example (see screenshot below) or this thread should be helpful.
  19. could you add a bit more detail? Do you have sequential filtering in mind? Are these scripts acting on the same object or different ones? If you can describe the intended behavior with a practical example I am sure somebody can help.
  20. I noticed that exiting QuickLook for a website using Esc is a lot slower than clicking on the x in the Preview window and I was curious as to why that is?
  21. @vitor does this work with images in the clipboard? I often take screenshots and I was looking for a way to paste a reduced-size version in my notes. I don't need to save either the initial or transformed image.
×
×
  • Create New...