sballin / alfred-search-notes-app Goto Github PK
View Code? Open in Web Editor NEWUse Alfred to quickly open notes in iCloud/Apple Notes.
Home Page: https://www.alfredforum.com/topic/11716-search-appleicloud-notes/
License: MIT License
Use Alfred to quickly open notes in iCloud/Apple Notes.
Home Page: https://www.alfredforum.com/topic/11716-search-appleicloud-notes/
License: MIT License
Does not work on Alfred 4 with OS X Catalina
Characters like İ/i currently cause problems when their case is changed. Here is a pre-release version to fix this problem: Search Notes.zip
Describe the bug
I am receiving ValueError when running Notes search with ns
[09:43:29.841] ERROR: Search Notes[Script Filter] Code 1: Traceback (most recent call last):
File "/Users/aci/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.027998C4-05B8-4F90-9F44-8C2461B79E36/get_notes.py", line 126, in <module>
print(getNotes(searchBodies=False))
File "/Users/aci/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.027998C4-05B8-4F90-9F44-8C2461B79E36/get_notes.py", line 95, in getNotes
folderName = folderNames[folderCodes.index(d[1])]
ValueError: tuple.index(x): x not in tuple
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
To Reproduce
Search notes on M1 silicon Mac
Info
Bad CPU type in executable
Additional context
Rebuilding the excitable in workflow directory on M1 machine with 1.16 resolves this issue
Proposed Implementation
If you're on macOS Catalina with Alfred 4, download the latest version of the workflow for:
To Reproduce
Steps/context to reproduce the behavior:
Fill out this information if it's not already included in the error text.
[16:46:24.068] Logging Started...
[16:46:29.704] Search Notes[Script Filter] Queuing argument ''
[16:46:29.805] Search Notes[Script Filter] Script with argv '' finished
[16:46:29.809] Search Notes[Script Filter] { "items": [ { "title": "Marcus Aurelius", "subtitle": "Notes", "arg": "0B12E172-4990-4E68-8F62-04DE9ED7102B,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICNote/p1047,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICAccount/p430,", "quicklookurl": " " }, { "title": "Chunngap", "subtitle": "Notes", "arg": "99596301-A1A6-4BD7-8BD9-1D68A9C413E5,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICNote/p1055,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICAccount/p430,", "quicklookurl": " " }, { "title": "TOBBLEZ", "subtitle": "Notes", "arg": "CBA78FA0-01A8-4106-8B44-C574269CBDA1,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICNote/p1091,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICAccount/p430,", "quicklookurl": " " }, { "title": "AirPods replacement", "subtitle": "Notes #ggo-ber #goo", "arg": "C0E9FEA1-21CC-42BF-9C63-64991B6C365A,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICNote/p1060,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICAccount/p430,", "quicklookurl": " " } ] }
[16:46:32.466] Search Notes[Script Filter] Queuing argument 'f'
[16:46:32.584] Search Notes[Script Filter] Script with argv 'f' finished
[16:46:32.587] Search Notes[Script Filter] { "items": [ { "title": "f", "subtitle": "Create new note", "arg": "f", "quicklookurl": "" }, { "title": "Marcus Aurelius", "subtitle": "Notes | …Flarbicle wangdoddle…", "arg": "0B12E172-4990-4E68-8F62-04DE9ED7102B,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICNote/p1047,x-coredata://549413B4-F796-4CD7-92F7-D9FC10159754/ICAccount/p430,f", "quicklookurl": " " } ] }
[16:46:32.687] Search Notes[Script Filter] Queuing argument 'fo'
[16:46:32.799] Search Notes[Script Filter] Script with argv 'fo' finished
[16:46:32.802] Search Notes[Script Filter] { "items": [ { "title": "fo", "subtitle": "Create new note", "arg": "fo", "quicklookurl": "" } ] }
[16:46:32.913] Search Notes[Script Filter] Queuing argument 'fol'
[16:46:33.030] Search Notes[Script Filter] Script with argv 'fol' finished
[16:46:33.033] Search Notes[Script Filter] { "items": [ { "title": "fol", "subtitle": "Create new note", "arg": "fol", "quicklookurl": "" } ] }
[16:46:33.092] Search Notes[Script Filter] Queuing argument 'folg'
[16:46:33.183] Search Notes[Script Filter] Script with argv 'folg' finished
[16:46:33.186] Search Notes[Script Filter] { "items": [ { "title": "folg", "subtitle": "Create new note", "arg": "folg", "quicklookurl": "" } ] }
[16:46:33.258] Search Notes[Script Filter] Queuing argument 'folgi'
[16:46:33.321] Search Notes[Script Filter] Script with argv 'folgi' finished
[16:46:33.328] Search Notes[Script Filter] { "items": [ { "title": "folgi", "subtitle": "Create new note", "arg": "folgi", "quicklookurl": "" } ] }
[16:46:33.531] Search Notes[Script Filter] Queuing argument 'folgit'
[16:46:33.571] Search Notes[Script Filter] Script with argv 'folgit' finished
[16:46:33.588] Search Notes[Script Filter] { "items": [ { "title": "folgit", "subtitle": "Create new note", "arg": "folgit", "quicklookurl": "" } ] }
[16:46:42.055] Search Notes[Script Filter] Queuing argument 'folgitt'
[16:46:42.159] Search Notes[Script Filter] Script with argv 'folgitt' finished
[16:46:42.177] Search Notes[Script Filter] { "items": [ { "title": "folgitt", "subtitle": "Create new note", "arg": "folgitt", "quicklookurl": "" } ] }
[16:46:42.203] Search Notes[Script Filter] Queuing argument 'folgitte'
[16:46:42.235] Search Notes[Script Filter] Script with argv 'folgitte' finished
[16:46:42.254] Search Notes[Script Filter] { "items": [ { "title": "folgitte", "subtitle": "Create new note", "arg": "folgitte", "quicklookurl": "" } ] }
[16:46:42.334] Search Notes[Script Filter] Queuing argument 'folgittey'
[16:46:42.358] Search Notes[Script Filter] Script with argv 'folgittey' finished
[16:46:42.392] Search Notes[Script Filter] { "items": [ { "title": "folgittey", "subtitle": "Create new note", "arg": "folgittey", "quicklookurl": "" } ] }
To Reproduce
Steps/context to reproduce the behavior:
Error text
-1719: System Events got an error: Can’t get window 1 of process "Notes". Invalid index.
Info
Fill out this information if it's not already included in the error text.
Hi
I've updated my copy to include a script (set up under keyword nf with option down) to move the currently selected notes to the found folder. This would be a great official addition IMHO. The script is below, with lots of your code in comments which can no doubt be deleted.
-- This script takes "URLs" of format "identifier,itemID,accountID,userQuery" or just "userQuery"
-- accountID can be the string "null", if so the default account is used
-- Some commands need to run twice, otherwise they fail when toolbar search is active
on alfred_script(q)
try
if q contains "/ICNote/p" or q contains "/ICFolder/p" then
set AppleScript's text item delimiters to ","
set identifier to text item 1 of q
set itemID to text item 2 of q
set accountID to text item 3 of q
set AppleScript's text item delimiters to ""
end if
tell application "Notes"
if q contains "/ICNote/p" then
(* -- Show user-requested note
open location "notes://showNote?identifier=" & identifier
open location "notes://showNote?identifier=" & identifier
-- Compatibility with macOS < 11 which does not support notes://
set OSVersion to system version of (system info)
set mainVersion to text 1 thru ((offset of "." in OSVersion) - 1) of OSVersion as number
if mainVersion < 11 then
if accountID is "null" then
show note id itemID in default account
show note id itemID in default account
else
show note id itemID in account id accountID
show note id itemID in account id accountID
end if
end if
*)
else if q contains "/ICFolder/p" then
-- Show user-requested folder
set s to selection
repeat with n in s
if accountID is "null" then
move n to folder id itemID in default account
move n to folder id itemID in default account
else
move n to folder id itemID in account id accountID
move n to folder id itemID in account id accountID
end if
end repeat
(* else
-- Create new note from user query
tell default account to make new note at default folder with properties {body:"<div><h1>" & q & "</h1></div><div><br></div>"}
show first note in default account
show first note in default account
tell application "System Events"
tell process "Notes"
set focused of text area of scroll area of group 1 of splitter group 1 of splitter group 1 of window 1 to true
key code {125, 125} -- down, down
end tell
end tell
*)
end if
end tell
on error errorMessage number errorNumber
display alert "Show Note Error" message ((errorNumber as string) & ": " & errorMessage & "
Input: " & q) as critical
end try
end alfred_script
I'm following the install instructions, but even after approving search_notes
app, Alfred still requires verification once I type n
in search bar.
Logs contain the following:
/Users/sergey/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/6F8AAE28-930C-467C-A257-7A123A3DBE88: line 1: search_notes/search_notes: No such file or directory
/Users/sergey/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/B5570B8D-B01F-4818-ACEE-78BCFEE1F070: line 1: search_notes/search_notes: No such file or directory
/Users/sergey/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/78489B71-A6D2-48FB-9100-AE2C2D5BF4FB: line 1: search_notes/search_notes: No such file or directory
/Users/sergey/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/F0DFB648-56E8-4DBA-BAC7-AE369A837CB1: line 1: search_notes/search_notes: No such file or directory
/Users/sergey/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/D0A4196F-85EB-4B0F-9FAD-E49D88EECCC9: line 1: search_notes/search_notes: No such file or directory
How about to add autoupdate capability with OneUpdater?
Most likely a bug in Monterey but the "search_notes" permission is not appearing on the Security Preferences to allow. Again, most likely a bug in MacOS but did want to bring it up.
Since the only way to create a new note is to have no results, you're kind of out of luck if it matches anything.
For example, if I want to create a new note called "Bowling", but there's already a new called "Plans for Bowling", there's no way to do so currently with this workflow.
In Catalina icon is now located under /System
.
n <query>
↵ Enter
To Reproduce
Steps/context to reproduce the behavior:
Error text
Copy and paste the full error text from any error messages. Screenshots can also help but may not show the full text.
Info
Fill out this information if it's not already included in the error text.
To Reproduce
Steps/context to reproduce the behavior:
Error text
Please copy this entire text if submitting an error report. You may need to scroll.
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:502
main.main()
github.com/sballin/alfred-search-notes-app/main.go:515 +0x654
macOS: 11.5.1
Alfred: 4.5.1
Workflow: 3.4.1
CPU: arm64e
Binary xattrs: com.dropbox.attrs
Notes DB xattrs: com.apple.quarantine
Binary info: 0755 501/ke 20/staff
Notes DB info: 0644 501/ke 20/staff
Query: title '�'
Accounts: (-1743) Not authorized to send Apple events to Notes.
Info
Fill out this information if it's not already included in the error text.
macOS version: 11.5.1
CPU: M1
Alfred version: 4.5.1 [1256]
Workflow version: 3.5.0, 3.4.1
In System Preferences > Security & Privacy > Privacy, there are checkmarks for Accessibility > Alfred 4, Full Disk Access > Alfred 4, Automation > Alfred 4 > Notes, and Automation > Alfred 4 > System Events?
What type of account are your notes stored in (iCloud/On My Mac/Email)? iCloud
If the workflow can't manage to show a list of your notes, verify that the search_notes executable file is present by right-clicking the "Search Notes" workflow in the workflow list of Alfred Preferences, choosing "Open in Finder" and opening the search_notes folder. Is there a file of the same name inside that folder? Yes
If no error notification appears automatically, what is the output of the debug log when you reproduce the problem?
Using the copy note as URL feature throws error
Here is the debug log output
[18:15:33.998] Search Notes[Script Filter] Queuing argument ''
[18:15:34.091] Search Notes[Script Filter] Script with argv '' finished
[18:15:34.094] Search Notes[Script Filter] {
"items": [
{
"title": "Scratchpad",
"subtitle": "Notes",
"arg": "x-coredata://E56025F2-FC6A-42A7-8A73-EC73F575F9EF/ICNote/p3007?",
"quicklookurl": null
}
Deleted a bunch of these for privacy
]
}
[18:15:40.844] Search Notes[Script Filter] Processing complete
[18:15:40.845] Search Notes[Script Filter] Passing output 'x-coredata://E56025F2-FC6A-42A7-8A73-EC73F575F9EF/ICNote/p3007?' to Run NSAppleScript
[18:15:40.867] ERROR: Search Notes[Run NSAppleScript] {
NSAppleScriptErrorAppName = Notes;
NSAppleScriptErrorBriefMessage = "AppleEvent handler failed.";
NSAppleScriptErrorMessage = "Notes got an error: AppleEvent handler failed.";
NSAppleScriptErrorNumber = "-10000";
NSAppleScriptErrorRange = "NSRange: {392, 4}";
}
[18:15:40.869] Search Notes[Run NSAppleScript] Processing complete
[18:15:40.869] Search Notes[Run NSAppleScript] Passing output '' to Run Script
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
After merging python3 PR, looks like there are now 2 places where python2 reappeared:
This triggered the macOS "Software needs to be updated" dialog for me, where "learn more" said "python2 is on its way out".
To Reproduce
Steps to reproduce the behavior:
Info
Additional context
After typing "n" into Alfred I get the below error. It had been working perfectly up until about a week or so ago.
Describe the bug
When I search for notes in the default folder named "Notes" or try to open that folder It doesn't appear. I'm not sure if there's something different with my notes so the underlying AppleScript fails. Searching for notes in all other folders appear to work fine.
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
Now that Monterey is released, wanted to check if the workflow can be modified to utilize new features of Monterey (i.e., tags).
Describe the solution you'd like
This workflow must accept the "tag name" as the input, Alfred should then display all the other tags under this tag, which can be used to narrow down to the document right from the Alfred search bar.
Example. If I have 100 notes with the tags
Then the workflow can accept the input - if the user types "Kubernetes", then the user can further drill down from the list of items in Alfred (i.e., setup, howto, overview, Istio, core, Kubectl).
if the user types "overview" after "kubernetes" (i.e., kubernetes overview), then the Alfred search bar can display "Istio and core" as options.
This will be very useful to narrow down to the document right from the search bar.
Describe alternatives you've considered
Additional context
To Reproduce
Make sure the Notes app both contains notes synced through iCloud, and notes stored locally (in the “On My Mac” section).
Use the workflow to search for a note from the On My Mac section, and press enter to open it; nothing happens.
Info
[11:18:08.435] Search Notes[Script Filter] Processing complete
[11:18:08.437] Search Notes[Script Filter] Passing output 'x-coredata://[REDACTED]/ICNote/p50?com' to Run NSAppleScript
[11:18:08.740] ERROR: Search Notes[Run NSAppleScript] {
NSAppleScriptErrorAppName = Notes;
NSAppleScriptErrorBriefMessage = "Can\U2019t get note id \"x-coredata://[REDACTED]/ICNote/p50\" of default account.";
NSAppleScriptErrorMessage = "Notes got an error: Can\U2019t get note id \"x-coredata://[REDACTED]/ICNote/p50\" of default account.";
NSAppleScriptErrorNumber = "-1728";
NSAppleScriptErrorRange = "NSRange: {301, 38}";
}
[11:18:08.761] Search Notes[Run NSAppleScript] Processing complete
[11:18:08.762] Search Notes[Run NSAppleScript] Passing output '' to Run Script
Additional context
Before I enabled iCloud note syncing (and therefore only had the “On My Mac” section), the workflow could open notes from this section just fine.
To be clear, the workflow still finds these notes (they're listed in the results) but can't open them (actionning the result doesn't do anything).
As a test, I changed the default account in Notes preferences, from iCloud to On My Mac, and predictably this flips the issue: with that setting, the workflow can't open iCloud notes anymore, but can open local notes.
Describe the bug
Installed the workflow and followed the instructions to manually authorize "search." However, when I do that, I get the following popup with no option to override the security warning:
A similar warning happens when I type in "n" to the alfred inteface, displaying the following popup instead with the additional option to "Move to Trash":
To Reproduce
Steps to reproduce the behavior:
install the workflow
try running "n" into the alfred search box
immediately get a error popup
install the workflow
try to authorize "search"
security warning popup displays
Desktop (please complete the following information):
Additional context
Typing ANY word that starts with "n" in the Alfred search box now immediately errors out as indicated above.
Describe the bug
can't find table content
To Reproduce
1、I have a note, the note contains a table like this
name | tag | usage | mark | use help |
---|---|---|---|---|
jcmd | java | view jar startup argument | jcmd pid help |
2、when i search by press nb jcmd
, it show no result
Desktop:
Additional context
can't parse note format correctly when the note contains a table
alfred-search-notes-app/search/main.go
Line 205 in 166f699
I really appreciate your help,thank you!
Describe the bug
When I type n or nb or nf, it shows "Search Notes" / "Notes Bodies"... respectively, but then switched to google search.
I checked the debug log output, first it was because python3
was not installed, so I had to install via homebrew, which required the latest version of xcode. So now I have the latest version of xcode and python3
.
Now I still have the same erratic behaviour, but now with a different error in the logs. Maybe I have the wrong version of python ? Which version is required.
I suggest putting these requirements in the repo readme :)
Log Output
[10:06:37.564] Logging Started...
[10:06:45.002] Search Notes[Script Filter] Queuing argument '(null)'
[10:06:45.176] Search Notes[Script Filter] Script with argv '(null)' finished
[10:06:45.179] ERROR: Search Notes[Script Filter] Code 1: Traceback (most recent call last):
File "/Users/sam/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1DC8A72D-6AE1-4164-A099-E4F86C168D83/get_notes.py", line 126, in <module>
print(getNotes(searchBodies=False))
File "/Users/sam/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1DC8A72D-6AE1-4164-A099-E4F86C168D83/get_notes.py", line 88, in getNotes
dbItems = sorted(dbItems, key=lambda d: d[sortId], reverse=sortInReverse)
TypeError: '<' not supported between instances of 'NoneType' and 'float'
To Reproduce
Basically use the workflow (I mean nothing works for me).
Desktop (please complete the following information):
To reproduce:
Describe the bug
I was scratching my head why this workflow does not work, debug log showed
Starting debug for 'Search Notes'
[2020-01-10 19:22:54][ERROR: input.scriptfilter] Code 1: xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use sudo xcode-select --switch path/to/Xcode.app
to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install
to install the standalone command line developer tools.
See man xcode-select
for more details.
I had to run two console commands, not sure if normal user would know how to do that tho
xcode-select --install
sudo xcode-select --reset
And now it works, i had Xcode installed but removed it, thats why
Not sure you can do about it, not sure if u can display alert that user dosnt have xcode-select installed
It would be great if there was an option to select which folder a note was created in. For example I have two folders and want all my new notes to be in the second 'inbox' folder so they are all together for me to review later on. Currently each note gets saved to the first folder.
The problem
I want to donate 5$. I know, this is a small amount of money, but I don't know how many people donate, so, probably, it could be at least a small little present to the author of this great workflow. It's not a problem for me to overpay 55% of commission, but, still, I feel like it could stop others from donating small amount of money and it just feels injustice.
The solution
Probably, PayLor.Me 2.0. I know nothing about it, but a quick search has shown that it could be at least a sort of alternative to paypal.me. I didn't consider any other alternative and didn't spend much time on the research.
To Reproduce
Steps/context to reproduce the behavior:
Error text
"-1719: System Events got an error: Can’t get group 1 of splitter group 1 of splitter group 1 of window 1 of process "Notes". Invalid index."
Info
Fill out this information if it's not already included in the error text.
Hi, thank you for this Alfred extension, works amazingly swift!
Describe the bug
Currently the string interpolation allows for SQL injection into the sqlite database.
Better to use query
with ?
arguments instead of fmt.Sprintf
.
I really recommend to add Go linting, e.g. as seen here: https://github.com/hazcod/intigriti-slack-announce/blob/master/.github/workflows/lint.yml
I was getting the following error in Alfred 4 with latest version of search-notes-app:
ERROR: Search Notes.app[Script Filter] JSON error: Unexpected end of file during string parse (expected low-surrogate code point but did not find one). in JSON
I was not able to reproduce it, but somehow moving to python3 helped here.
To Reproduce
Steps/context to reproduce the behavior:
For now, I have disabled the workflow until the issue is solved
Error text
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:461
main.main()
github.com/sballin/alfred-search-notes-app/main.go:474 +0x7f3
macOS: 12.0.1
Alfred: 4.6
Workflow: 3.5.2
CPU: x86_64h
Binary xattrs: com.apple.lastuseddate#PS
Notes DB xattrs:
Binary info: 0755 501/donovan 20/staff
Notes DB info: 0644 501/donovan 20/staff
Query: title '�'
Accounts: iCloud
To Reproduce
Info
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
panic: unable to open database file: operation not permitted
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:394
main.main()
github.com/sballin/alfred-search-notes-app/main.go:407 +0x789
Additional context
Add any other context about the problem here.
It looks like there is a handy built-in way to link to notes.
notes://showNote?identifier=A5E7652C-26A5-4E42-8393-F300D7E5C80B
mobilenotes://showNote?identifier=A5E7652C-26A5-4E42-8393-F300D7E5C80B
The identifiers are the same across computers/phones and are stored in the Notes SQL database (column zidentifier in table ziccloudsyncingobject) and the content graph of the note on iOS.
This is almost perfect except that it appears you would need to have one of each type of URL in order to have the link functionality on both platforms, as the mobilenotes:// link doesn't work on macOS and vice-versa.
@temochka any thoughts? As you predicted there is now a Shortcuts app in macOS Monterey.
problem i'm having
hi sean - my problem is that id like to turn my query into a new note if the workflow is unable to find it - a body version of how a new note is created, when the workflow can't find the title in the title search function.
i.e. type "nb remember to buy bread" -> workflow realizes there is no "remember to buy bread" text, and creates a new note with the query being the body -> a new note with an empty heading with "remember to buy bread" as the body is created.
Right now I have it set up in apple note preferences that while searching/creating a new note title, the default text is the body, so when I want to create a new note I type "nt insert new note text here"
Still a beginner at code so I can't read the workflow well, from opening the workflow in Alfred I see that "nb" command is connected to the third "creating a new note" task, but it doesn't seem to be working.
solution
have "create a new note with query" as a fallback option after pressing return, when no notes can be found with the query
alternatives
I googled other note workflows but they haven't been updated to work for alfred 4 or just don't work, really hope you can help!
The creating a new note functionality isn't working. If I type 'n here is a new note' it just tries to Google search that text. In other words, the Alfred-search-notes-app workflow exits and alfred defaults to google search. It finds my notes with no problem but creating a new note is not working. Any ideas why? Thanks in advance.
Fill out this information if it's not already included in the error text.
To Reproduce
Steps/context to reproduce the behavior:
Just updated to 3.4.0 and I now get this error when typing "n ", i never get the permission error nor see the "allow" button in security.
no such column: zalttext
Please copy this entire text if submitting an error report. You may need to scroll.
panic: no such column: zalttext
goroutine 1 [running]:
main.PanicOnErr(...)
github.com/sballin/alfred-search-notes-app/main.go:440
main.main()
github.com/sballin/alfred-search-notes-app/main.go:453 +0x7f3
macOS: 10.15.7
Alfred: 4.3.4
Workflow: 3.4.0
CPU: x86_64h
Binary xattrs:
Notes DB xattrs: com.apple.quarantine
Binary info: 0755 502/ay 20/staff
Notes DB info: 0644 502/ay 20/staff
Query: title '�'
Accounts: iCloud, Mapbox
Copy and paste the full error text from any error messages. Screenshots can also help but may not show the full text.
Info
Fill out this information if it's not already included in the error text.
[20:02:46.725] Logging Started...
[20:02:49.926] Search Notes[Script Filter] Queuing argument ''
The note body text data in the database contains some non-text bytes that I don't understand. I'm interested in cleanly extracting the plaintext and raw link URLs, but I've been having trouble coming with general enough rules to do it right.
If you recognize this format, please let me know. Here's what I know so far:
Note data is stored in the database in gzip DEFLATE format. After decompression, it looks like this:
[short amount of non-text bytes]
[note title plaintext]
[note body plaintext (what the user sees in the Notes app—links appear as the user-set text rather than the raw URL if applicable)]
[bytes 26 16
]
[non-text bytes of length roughly proportional to length of note]
[raw URLs of all links in body text, each preceded by a ~9-byte sequence that starts with 42
and followed by some more non-text bytes]
E.g. given a shortcut like shortcuts://run-shortcut?name=NoteURL&input=1619999142, what app is needed to click to follow? It doesn't seem to have a native handler either on macOS or on iOS.
Create a new file with the query as the title if nothing was found
This will emulate something like Notational Velocity very well.
Copy the contents of the selected not to the clipboard. I use Apple Notes for all my code snippets and right now I use this workflow to search for the snippet, but then I have to manually copy the note contents to the clipboard. Being able to copy to the clipboard right in Alfred would be super great.
I was playing around with Evernote and the Evernote workflow and this appears to be able to do this. I'm assuming this is not apples and oranges, but just wanted to mention. https://www.alfredforum.com/topic/840-evernote-workflow-9-beta-4-alfred-4/
Hi,
Thanks for this workflow, it works great.
I have a "minor" suggestion when searching for notes which I noticed recently.
When you search with "n"-hotkey and then start typing the keyword, it switches from the workflow to default search when there is no match.
Would it be possible to change the output to something like "No results" instead?
Here is an example of what I mean when I search for a note with title "Workflow":
This one is found which is great.
If I add the next letter in the keyword it switches from the Notes workflow to default Alfred search:
It would feel better if Alfred stayed in "Notes search mode" and gave me a result instead even if there are no matches, for example just outputting "No note found" or something like that. At the moment Alfred doesn't seem to care about the "n"-hotkey when there is no match and switches to default search.
Keep up the good work!
I just downloaded the package from Packal but it does not work, here's the debug data:
[2018-08-10 00:07:22][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last):
File "/Users/stevejobs/path/to/Alfred.alfredpreferences/workflows/user.workflow.43CB9AFF-A420-4B19-8C99-C393EC988448/searchNotes.py", line 35, in <module>
for m in matches]
TypeError: 'NoneType' object has no attribute '__getitem__'
Let me know if you need me to provide you with more info. FYI, I am on High Sierra at the moment too
Describe the bug
Folder filenames containing emojis do not sync properly over Dropbox.
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.