Jump to content

chrisbro

Member
  • Posts

    17
  • Joined

  • Last visited

Everything posted by chrisbro

  1. And we're fixed now @russcore ! Download the latest and install from here.
  2. @russcore we have a discussion going on a Github issue opened for it here. It looks like the sqlite database location just moved again, so hopefully it's a quick patch.
  3. Nice find @alfredclough, I'll see if that changes any behavior and tee it up to include.
  4. I'm reaching out to the Bear support channel to see what's causing this "no such table" error - it's tough to reproduce even on similar setups, and a reboot fixed it for someone out there experiencing it. If I can figure out what the deal is I'll try to code around it!
  5. @td. Thank you for the suggestions! I think they're great ideas that I'd like to implement, so I've created enhancement issues on Github to track them. A couple sound tricky but I do love a good challenge. Feel free to reach out to me if you ever have any other ideas!
  6. @td. I guess I could say it was "by design" but I think that's giving me too much credit. I didn't know which approach I'd like (or users would like) so I had it write the Alfred text entry to both title and text. You're the second or third person to ask me if that's a bug or not, though, so at this point I'm going to remove it for the next version
  7. @td. @GuiB Fixed! Again, thanks so much for bringing it to my attention. I hacked up a cache bust to fix the location it points to - it checks the location key, and if it detects the old version, attempts to find the new version instead. Hopefully this is backwards-compatible for people who haven't upgraded - I'll test it out when I get to work since I haven't upgraded Bear there yet.
  8. @td. @GuiB Thanks for the heads up, y'all! I hadn't updated Bear yet with its recent update so hadn't detected it yet. Sure enough, upgrading in the App Store broke it. Let me hack up a fix real quick and release it.
  9. Hey everyone! I've created a workflow that allows you to search and create notes for Bear. This is my first workflow, first OSS project, and first foray into Python - let me know what all I messed up Available on github and Packal. Many thanks to @deanishe and @dfay for some initial direction. Install To install, download a released alfred-bear workflow and double-click to open in Alfred 3. Easy-peasy. Searching and opening results bs -- Search for a note by title and open it in Bear. bst -- Search for a tag (a group of notes) by tag title and open it in Bear. Creating a new note bn I love notes! -- Creates a new note with the title and text "I love notes!" bn I love notes! #love #notes -- Creates a new note with the title and text "I love notes!" and the tags "#love" and "#notes" Known Issues Creating tags only works with single-word tags - multiword tags hopefully to come. Todo Append text to existing notes. Figure out multi-word tags. Thanks deanishe for guidance on Alfred workflow creation and capabilities, and for his excellent Python workflow library. dfay for guidance from his experience writing the Ulysses Alfred workflow. Rhyd Lewis for giving me an excellent example to work off of in his Omnifocus Alfred workflow. Versions 0.3.1 Fixed database location that changed with a Bear update. 0.3.0 Added search results from note text to main search. 0.2.2 Changed search queries to order by last modified date descending, so that more recently modified notes/tags show up at the top. 0.2.1 Added hashtag symbol to "Open Tag" list results to make it a little more obvious that it's a tag and not a note. 0.2.0 Now allows non-ASCII characters. Searching by tag now displays not only tags that match the search query, but notes that match those tags as well. Searching by tag now works with or without the '#' symbol in front of the tag. 0.1.0 Initial public release.
  10. @dfay Thanks again! And to anyone interested, I've gotten some basic search functionality working by heavily borrowing from the Omnifocus workflow. Never worked with Python before so it's a bit slow going but nothing too tough.
  11. @dfay I'd appreciate that, thank you! That way I can refer back to this post if they ever release that capability. Update if anyone's interested: looks like they have a pretty straightforward sqlite3 schema, so this shouldn't be anything crazy to make a workflow for.
  12. Ooo, intriguing - I'd actually be way more comfortable with that approach given my development background. I'm going to give that a spin next.
  13. @deanishe I really appreciate the explanation - makes complete sense. Thank you!
  14. Thanks for the response! I'm definitely misunderstanding, it looks. I was getting thrown off because I can hit that x-callback-url create endpoint in the code snippet in my first post, and it works just fine - it does indeed create a note like I'd expect. I just have no way to get at the callback response from AppleScript. My original assumption is that I was looking for a normal ol' synchronous response, not a callback, because that's what I get for trying to use my brain in the middle of the night when I can't sleep. So this all makes sense now. @deanishe it looks like I can't call back to Alfred this way, though? I see a little conversation here but can't make out if Alfred has a callback endpoint I can leverage.
  15. That's fair. Thank you for your time. Anyone else have ideas on how to get responses back from arbitrarily-protocoled HTTP requests in a way that Alfred can parse it? Just saw this ("Fetching Data from the Web") and will give that a go next.
  16. Hello! I started to work on creating my own workflow that would allow me to create and search Bear notes. I quickly ran into some problems that I don't think there are reasonable workarounds for, but I wanted to get some opinions first. My problem is that Bear's extensibility comes via their implementation of the x-callback-url spec. I need to be able to call these URLs from within an Alfred workflow and parse the response. My first approach has been to use AppleScript...this works fine for creating a new note, as I don't need a response. set createUrl to "bear://x-callback-url/create?title=" & my urlencode(sTitle) & "&text=" & my urlencode(sText) open location createUrl However, I now want to leverage their search endpoint, which requires parsing the response. This doesn't seem doable from within Alfred. The AppleScript open location command does not provide a result - so I can call a URL, but not retrieve anything from it. Therefore, I can't leverage the search endpoint. I tried getting clever by calling a shell script that then called curl, but curl errors out because it doesn't recognize the "bear://" protocol. I could do "open" from the shell, but that opens the app - not very useful when I just want to grab search results and put them into Alfred. Any thoughts? Any other clever ways to do this? Given that this x-callback-url spec seems to be gaining traction, it might make a good feature request to add this inter-app messaging natively into Alfred as an action. Thanks!
×
×
  • Create New...