Jump to content

Search the Community

Showing results for tags 'bear'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 3 results

  1. Alfred Bear Workflow This workflow should help to use templates in combination with the bear app. I created one once, which is far less customizable. Now I moved to a node version of this workflow where templates can use placeholders whose values can come from node scripts. Link to GitHub Repo. Installation npm install --global alfred-bear Usage While creating note templates with static content can be useful, having the possibility to use dynamic placeholder from any source I want is really great. That's why I built this workflow. To get an idea how this should work, take a look at an example: the Jira Ticket The idea is that there is a index.yml which contains a list of your templates and some optional variables to configure the template behavior. The Index the index.yml has the following form templates: - title: "Weekly Review" file: "weekly-review/template.md" script: "weekly-review/script.js" newWindow: true var: myFirstVar: "Hello " mySecond: "World!" question: "Any Subtitle?" - title: "Jira Ticket" ... title The title is shown in the template list to choose from. file Path to the template markdown file. This file can contain 2 different styles of placeholder. Normal Alfred Dynamic Placeholder Placeholders with double curly braces {{myPlaceholder}} which follow the Handlebars syntax. These Placeholders could come from the script, var or question option. First the handlebars placeholders are replaced in the template and in the second step the dynamic placeholders from alfred. script [optional] Path to a node.js module file. This module has to export an [optional async] function which returns an object, whose properties are placeholder keys. To use other npm modules in this script, the script has to be a node module by itself. This means that templates can easily be shared as npm packages or repositories. // script.js const rp = require('request-promise'); /** * [Async] function which gets the static variables * from the var option and the answer from * the optional question. */ async function greet(variables) { const data = await rp(variables.myRestApiEndpoint); return { myText: data.body } } module.exports = greet; newWindow [optional] Should the new note opened in a separate window? var [optional] List of static placeholders for the template (e.g. APIToken, BaseUrl for REST Call etc.) question [optional] Sets a question to the workflow which asks for an additional placeholder value. To use the answer of this question in the template or script the placeholder key is {{answer}}. The Template Directory There is a bear template directoy [default: ~/.bear-templates] -- which can be synced e.g. with a .dotfiles repository, Dropbox, etc. This directory should contain a template index [default: index.yml] and all the necessary files for your templates. These paths are handled by the bearTemplateIndex workflow variable which can be changed in the workflow settings. A possible template directory can have the following form - ~/.bear-templates '-- index.yml '-- weekly-review '-- template.md '-- script.js '-- jira-ticket '-- ticket.md '-- ticket.js '-- package.json '-- node_modules '-- diary.md ' ... Examples If someone built a nice basis for a template, feel free to add it to this list and make a PR. Jira Ticket Daily Log
  2. Alfred Bear Templates Workflow Workflow to create a bear note from a given template. These templates follow bear snippet syntax and can contain default alfred variables (e.g. {datetime}). The Templates live in the bearTemplateDirectory which is by default '~/.bear-templates' but can be changed by giving another path starting at the users home directory. Usage By default just type bt and then start to type. The Workflow suggests all template names it found in the bearTemplateDirectory. To get the snippet variables translated it pushes the template text to the clipboard. So after using the workflow the template is in Bear and also in your clipboard. Download You can download the workflow from Packal
  3. 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.
×
×
  • Create New...