Code Monkey home page Code Monkey logo

Comments (4)

philiprein avatar philiprein commented on August 20, 2024 1

I know about the option to add tags and the content of the clipboard, and this works like a charm.

I'm not seeing much advantage in having a boiler plate of static text surrounding things like tags and clipboard content.

This is basically what I meant. If you create a new note with bn and add an autocomplete tag/content from the clipboard (via CMD), they simply get pasted into the empty note and then have to be manually copied to the correct spot in the template.

My workaround was to modify the X-callback-url in the workflow's 'Create Note'-Action triggered by bn. I added the text-parameter with an url-encoded form of my template.

open "bear://x-callback-url/create?{query}&text=Tags%3A%20%0A%0A%0A%0A%0A---%0A%23%20Resources%0A*%20&new_window=yes&show_window=yes&edit=yes"

Using this obviously does not place tags behind the "Tags: "-part of the template, and pasting the clipboard does not work anymore.

However, I completely understand if you're hesitant to implement something you see no value in. I would suggest an implementation myself, but I haven't written code in Go at all, haha. I'll try to fiddle with it myself a bit and see if I can find a better workaround. Thank you for considering though!

from alfred-bear.

drgrib avatar drgrib commented on August 20, 2024

Hey @philiprein. Glad you are enjoying the workflow.

I actually use many templates for Bear myself but not through the workflow. While templates would be great in theory, I don't see a clean way they could be added to an Alfred workflow.

For example, one of my personal template programs checks the URL of my current tab and based on the domain will scrape content from the webpage and fill the template with it. This requires me to have in-depth understanding of the structure of the webpage and write goquery code to parse it and then format it. Such a complicated system would never make sense in an Alfred workflow.

So that's a big part of the question: how could someone cleanly define what even goes into the template? I'm not seeing it so I can't grant a feature request for which I don't see a clear design. But I'm open to suggestions.

from alfred-bear.

philiprein avatar philiprein commented on August 20, 2024

Hey, thanks for the reply.

I agree, implementing templates the way you describe it would be too complicated for an Alfred workflow.

I was thinking of something more lightweight, e.g. being able to create an .md-file that contains the content/structure of your template and some pre-defined placeholders like {tags} or {content} for where tags and the content of the clipboard goes respectively. Then, when creating a new note via bn or bcs, there is an option to create a note according to that .md-file and parse the query-content to their respective places defined by the position of the placeholders in the template.

Maybe have a look at this workflow from Paul Ryley for The Archive. It is Python-based and in many ways provides the same functionality as your workflow for a different app. However, The Archive is simply an editor that works on top of a folder with .md-files, so maybe with Bear its a little more difficult.

from alfred-bear.

drgrib avatar drgrib commented on August 20, 2024

Hmm. The design you suggest sounds redundant with features already present in the workflow. Every note creation option in the workflow already adds autocompleted tags to a new note and you can create it with clipboard content by holding down command while using bn as shown here:

https://github.com/drgrib/alfred-bear#new-notes

Aside from the option of adding the date, I'm not seeing much extra in Paul Ryley's workflow. I'm not seeing much advantage in having a boiler plate of static text surrounding things like tags and clipboard content.

Perhaps it would be helpful if you gave the example of what you manually added to the workflow if it is different from current features.

from alfred-bear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.