dfay Posted June 8, 2014 Share Posted June 8, 2014 @deanishe thanks for your help sorting out my code one Q - if I run the workflow with query $100 for food with the Dollars box unselected, it works properly, i.e. the item added to notes.txt matches the query. If I select the Dollars box, it appears in the notes file as \$100 for food. Link to comment
deanishe Posted June 8, 2014 Share Posted June 8, 2014 You only need to select Dollars with bash (by default it expands $1, $2 etc., plus a few others, inside double quotes). For Python code, assuming you're using var = "{query}" and not var = '''{query}''' or some such, escape Backslashes and Double Quotes. Leave everything else unselected. Link to comment
Taxidiotis Posted June 9, 2014 Share Posted June 9, 2014 @daenishe: Indeed, Escaping Options/Dollars made things aright. All now works as it should. Thank you for taking the time to reply to my query. Link to comment
Shirasaya Posted November 27, 2014 Share Posted November 27, 2014 I have an additional idea. How about providing another workflow which offers the last 10 notes/lines of the text file as feedback? Possibly copying the line to the clipboard on pressing enter. 40-02 1 Link to comment
Moses Posted August 8, 2015 Share Posted August 8, 2015 (edited) Again thank you for Capture, I use it constantly, This may not be a Capture/Alfred Work Flow question, I recently stopped editing my Target note for Capture with Sublime Text, and switched to MacVim (... A switch away from ST); when editing with ST, the Target file (open and being edited with ST) auto updated with new Captures added via Capture as used, worked seamlessly. This is not so with MacVim - have to close and reopen - , I am trying to remember the tweaking that got this working in ST, if this rings a bell for anyone, please post it here, Thanks. Edited August 8, 2015 by Moses Link to comment
hboon Posted August 9, 2015 Author Share Posted August 9, 2015 Again thank you for Capture, I use it constantly, This may not be a Capture/Alfred Work Flow question, I recently stopped editing my Target note for Capture with Sublime Text, and switched to MacVim (... A switch away from ST); when editing with ST, the Target file (open and being edited with ST) auto updated with new Captures added via Capture as used, worked seamlessly. This is not so with MacVim - have to close and reopen - , I am trying to remember the tweaking that got this working in ST, if this rings a bell for anyone, please post it here, Thanks. If you are using MacVim, add the following to your .vimrc and it will auto refresh the buffer with external changes: set autoread Link to comment
Moses Posted August 10, 2015 Share Posted August 10, 2015 If you are using MacVim, add the following to your .vimrc and it will auto refresh the buffer with external changes: set autoread Thanks for replying, ST polls files ... Auto refresh. MacVim, does not; set autoload, requires a refocus on MacVim to load the external changes. Again thanks for Capture, a great quick notes work flow (in ST), hboon 1 Link to comment
OmarKN Posted November 7, 2015 Share Posted November 7, 2015 (edited) Hi and good day, Don't know why this isn't working here, I'm using "cpy [x] with space, Argument Required. And the script: (/bi/bash) —————————————..————————————- #!/usr/bin/python from datetime import datetime import os notesFile = '/Users/okn/Documents/capi01.txt' # your path and filename go here n = datetime.now() theNote = n.strftime('%Y/%m/%d %H:%M:%S')+'\n\n'+"{query}" # to reformat the date see http://www.cyberciti.biz/faq/howto-get-current-date-time-in-python/ theSeparator = '## Notes ##' theTemplate = '# NoteTitle\n= Notebook\n@ tag1' if not os.path.exists(notesFile): with open(notesFile, 'w') as file: file.write('{}\n\n{}\n\n{}'.format(theTemplate, theSeparator, theNote)) else: with open(notesFile, 'r') as file: notes = file.read() with open(notesFile, 'w') as file: sections = notes.split(theSeparator,1) notes = sections[0]+theSeparator+'\n\n'+theNote+'\n'+sections[1] file.write(notes) —————————————..————————————- I only changed the path and the if / else argument from dfay. What am I missing here? / with best regards, Omar KN Stockholm, Sweden Edited November 7, 2015 by OmarKN Link to comment
vamose Posted January 27, 2020 Share Posted January 27, 2020 (edited) Great workflow. I have edited the work flow, based on the input from different users and utilizing tab \t & new line \n to use it as a to do list. What I request, is there an option such that I can have different sections in the notes and, based on the heading/ shortcut the captured idea is dropped to that particular section. For Eg. Any idea captured with Due as a keyword should fall into Due section, similarly for TODO, Delegated, followup etc. If we can achieve the above, this will be my ideal to do list, I can copy paste the content, move them around and this will be available on cloud, and being a text document can be edited from any device. Due: 26 Jan: pay Credit card 1st Feb. 26 Jan: visit Dr. 5th Feb 27 Jan: Car servicing 1 Feb TODO: 26 Jan: completes sales proposal for client X 1 Jan. 26 Jan: switch on the server 31 Jan 27 Jan: buy dog food 5 Feb Delegated: 26 Jan: Provide screenshots - person A 26 Jan: Technical content - Person B 27 Jan: Print & Bind - Person A Followup: 26 Jan: 5 Feb - Person A 26 Jan: 9 Feb Person B 27 Jan: 15 Feb Person A Edited January 27, 2020 by vamose Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now