Jump to content

[SOLVED] Appending text to a project log


Recommended Posts

Hi,

 

I'm trying to make a workflow that does the below but I am not sure how to achieve it.

 

In short, I want to be able to add some text in Alfred and have it append this to a particular file. I'm just trying to make it easier to keep a project log.

 

For this example, let's say that I have two projects that I am working on. Let's call the projects "apples" and "oranges".

 

I'd like to be able to: 

 

  • Type 'log' into Alfred
  • Enter a keyword to specify which project the entry relates to (e.g. "app" or "ora").
  • Then type some text. When I hit enter, I'd like the date and time to be prepended to the text I entered, then have everything added to the apples-log.md or oranges-log.md file.

 

So, assuming that I have the apples-log.md file already created and stored in a specific directory, when I invoke Alfred and type "log app spoke with Frank and he confirmed that we should delete the database - backup of database stored on network drive under 'Frank's an idiot'..." the following should be added to the end of that .md file:

 

<br />

12/03/18 08:29am: spoke with Frank and he confirmed that we should delete the database - backup of database stored on network drive under 'Frank's an idiot'...

<br />

 

Then later in the month, if I invoke Alfred and type "log app George called and is really pissed, apparently some idiot deleted the database... " the following should be added to the end of the apples-log.md file:

 

<br />

31/03/18 02:55pm: George called and is really pissed, apparently some idiot deleted the database...

<br />

 

Does that make sense? 

 

It would also be great if I could type "log app", have the date and time added to the log-apples.txt file and then have the log-apples.txt file open so that I can type a longer entry, but this isn't essential.

 

I'd really appreciate some help with this. Happy to pay someone for their time to get this setup. 

 

Thank you.

Link to comment

Hi @MattB and welcome to the forum :)

 

Take a look at the "Simple To-Do list" workflow, which you'll find under Workflows > Examples (at the bottom of the sidebar), you'll see a workflow that essentially does what you have in mind. In this instance, the log being created is a to-do list, but it can easily be repurposed.

 

To try it out, install the workflow, then type "todo" and the task, e.g. buy bananas. Choose which list you want to add it to and it'll be appended to the relevant text file.  Once you've created the lists and added content to them, you can type "vtodo" to view your list.

 

Based on this, you can either modify that workflow or create your own using the same principle of List Filters to choose which list to add to, and Arg/Vars to store your query.

 

Cheers,
Vero

Link to comment
  • vitor changed the title to [SOLVED] Appending text to a project log

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...