Carlos-Sz Posted February 27, 2013 Share Posted February 27, 2013 (edited) Notes with New Text File with Tag 4.0OverviewEasily create new tagged plain text files.Synchronize your notes by selecting a Dropbox folder as your working folder.View your notes, including tags, with an application such as nvALT.SetupYou can configure the workflow anytime by typing the keyword setup-nft though you will be prompted to do it if it is the first time you run the workflow.There are 6 steps.1. Select the Working FolderType the name of the folder that you want to save your text files.You can select a Dropbox folder to synchronize your files.2. Set the Preferred ExtensionIn order to make things faster, the workflow adds the file extension automatically.Here you can set your preferred text file extension. The default is .txt.3. Set the Journal NameJournal is a single file to easily add text with current date (default name is Journal).4. Set the Date FormatThis setting will be used in every Journal entry, Prepend text to a file or Append text to a file.Select a format or use the following variables to build a custom one: $m (month as number) $mm (month) $d (day) $w (weekday) $y (year) $h (hour) $n (minute) $s (second) $f (full date and time) 5. Set the Filename TimestampConfigure a custom date format, such as $y$m$d$h$n$s, that can be easily added to a filename by using the variable $t e.g. nf #my file $tYou can build a custom one in this setup step by using the following variables: $m (month as number) $mm (month) $d (day) $w (weekday) $y (year) $h (hour) $n (minute) $s (second) 6. Markdown URL ON or OFFIf the topmost application is Safari, Google Chrome, Firefox or OSX Mail the workflow will append the URL to the new file; to get it in a markdown style select ON.How to use the workflow Select a text in e.g. Safari Bring Alfred and type the keyword nf Click New File from Text Selection Done! A new note will be created in the working folder, named based on the selected text, tagged with Safari (the topmost application) and with the URL appended to it. See advanced features below.Triggering Keyword nf? - shows some syntax tips along with access to the Help file (see screenshot below) Keyword setup-nft - workflow preferences Keyword nf - add content (see details below) keyword ns - search content (see details below) Hotkeys - that are 4: create a new note from text selection, create a new note from the clipboard content, add selected text to the journal and bring the search feature Fallback search - you can add this workflow to your Alfred fallback search preferences Add content: keyword nfKeyword nf overviewNote: the New File from Mail Selected Messages item is displayed only if the topmost application is the Mail application.Here you can find four ways to easily create a new text file: New File from the Clipboard New File from Text Selection New Blank File New Note New File from Mail Selected Messages Note: New File from Mail Selected Messages (item 5) will be displayed only if the topmost application is the Mail application.In resume, the workflow can create a new text file with content from the clipboard (item 1), from the text selected in another application (item 2), from Messages selected in Mail (item 5) or typed directly in Alfred window (item 4). In addition, you can also create a New Blank File (item 3) that will be opened in the default text editor so you can enter the content right away.Although it is not required to type any additional text (items 1, 2, 3 and 5), this module works with the following pattern: tags#filenameIt means that you can enter tags (separated by comma) right after the keyword nf then type a hash sign then type the filename (in New Note the filename and the note itself are the same). For example: nf tag1,tag2#filenameAdvanced featuresMost advanced features are shared by all items displayed by the keyword nf: type tags in Alfred window separated by comma e.g. nf tag1,tag2 remove the default tag (topmost application name) by adding a minus sign at the end of the tags e.g. nf tag1,tag2- or nf - add a custom filename by typing a hash sign after the tags e.g. nf tag1,tag2#filename or #filename add a custom filename and extension e.g. nf tag1,tag2#filename.md add the filename timestamp configured in the workflow setup by using the variable $t e.g. nf tag1,tag2#filename $t add a custom timestamp to the filename using the following variables: $m (month as number), $mm (month), $d (day), $w (weekday), $y (year), $h (hour), $n (minute), $s (second) tell the workflow to not append the URL by adding “at sign” at the end e.g. nf tag1,tag2#filename.md@ or nf tag1,tag2@ or nf @ tell the workflow to not add the date in Prepend or Append text features by adding -d at the end e.g. nf #my note-d or #my note@-d hold command key to create the new file in the topmost Finder window instead of the working folder hold control key to prepend text to any file instead of create a new one: a list with your files will be loaded in Alfred so you can easily select it hold option key to append text to any file instead of create a new one: a list with your files will be loaded in Alfred so you can easily select it hold shift key to add text to your journal Mail app special featureThere are two ways to take advantage of the special workflow Mail feature: by selecting a text in an email, bring Alfred, type the keyword nf then select New File from Text Selection. Use this approach if you need only some text of the email. by selecting messages in Mail, bring Alfred, type the keyword nf then select New File from Mail Selected Messages. This is the easiest way to add the entire email content. Along with the text content, the workflow will prepend a short header with the most important information about the email and it will append the message link or URL (clicking it will open the original message in Mail).JournalThe Journal feature is a single file to add new text with a timestamp (current date). You can set a custom date format in the workflow setup (keyword setup-nft).To add a new Journal text: Bring Alfred and type the keyword nf Select the text content (from Clipboard, from Text Selection or New Note) Hold shift key and hit return key You can also use the Journal hotkey to easily add a new entry based on text selected in another application.Search content: keyword nsSearch text files saved in the working folder: the default search includes text content, filename and tags start with c: to search content only start with n: to search filenames only start with t: to search tags only hold control key to paste the text file content direclty to the topmost application hold option key to add tags to a text file hold command key to reveal the file in Finder hit shift key to preview a text file (OSX Quick Look) hit return key to open a file the first item in Alfred is always “Show in nvALT” (if the application is installed): click it to view the results in nvALT Note that you can tag a file from the search window by holding option key. The workflow will list all openmeta recently used tags so you can easily select one. You can also create new tags separeted by comma e.g. tag1,tag2,tag3.What’s newVersion 4.0 streamlined features focused on content creation keyword nf instead of newf keyword ns instead of news prepend or append text to any file in working folder custom date format that will be used in Journal, Prepend and Append features custom filename timestamp ($t) that can be used to create a filename easily add text from Mail app (selected or all email content) along with basic email information and link or URL select plain URL or Markdown URL format workflow preferences and initial setup within Alfred keyword nf? for Help within Alfred too you can tag any file from search feature: type ns keyword, highlight a file, hold option key and hit return: a list of openmeta recent tags will be displayed in Alfred (select one or create new tags separated by commas) New Note now works more like the other features: tags#note here or #note here improved search module (keyword ns) add a custom timestamp to the filename using variables fn key is not used by default due wired Apple keyboards workflow update to Alfred 2.0.3 (187) removed Copy Text File from Finder Version 3.0 Create a new file in Finder (hold control key) Optionally add a file extension (see Help for details) Version 2.8 Paste a note to the topmost application (e.g. start a search, select a note, hold fn key and press Return)Version 2.7 Select a default extension (.txt or .md) Faster searching feature New icons Version 2.5 Alfred Fallback search (you have to add it to your fallback search list) Add @ at the end to not add the URL Version 2.0 Journal (add text to a custom text file) Search notes within Alfred nvALT support Alleyoop workflow support Download Version 4.0 Release date: 29 May 2013 Made in OS X 10.8.3 Supports Alleyoop 2 Download now PS: thank you twinpeaks for your feedbackPS: post wrote in Byword and converted using Markdown to BBCode workflow Edited May 29, 2013 by Carlos-Sz Domenic, twinpeaks, katie and 2 others 5 Link to comment
twinpeaks Posted March 11, 2013 Share Posted March 11, 2013 I didn't offer much, this workflow is simply amazing though. I haven’t messaged you with any problems because so far it is smooth sailing. Now that I think of it, an easy way to change your "working folder directory" if you decide to move locations later... most won't use it and reverting just calls for clearing out related cache etc... but only thing I can think of... really trivial. Thanks again for sharing. Use it all the time, handy as heck. Link to comment
Carlos-Sz Posted March 15, 2013 Author Share Posted March 15, 2013 I didn't offer much, this workflow is simply amazing though. I haven’t messaged you with any problems because so far it is smooth sailing. Now that I think of it, an easy way to change your "working folder directory" if you decide to move locations later... most won't use it and reverting just calls for clearing out related cache etc... but only thing I can think of... really trivial. Thanks again for sharing. Use it all the time, handy as heck. Thank you twinpeaks. Your feedback was really great and helpful. Link to comment
flamerz Posted March 16, 2013 Share Posted March 16, 2013 Thanks Carlos works great, it would've been great if we can append on a text file. Cheers Link to comment
Carlos-Sz Posted March 16, 2013 Author Share Posted March 16, 2013 Thanks Carlos works great, it would've been great if we can append on a text file. Cheers Great to hear! Append sounds nice. I’ll think about it. Link to comment
pietrosiorpaes Posted March 16, 2013 Share Posted March 16, 2013 Thanks Carlos, great workflow. Btw, I very much agree with flamerz, it'd be great to be able to append the text on a previously existing file Link to comment
Carlos-Sz Posted March 16, 2013 Author Share Posted March 16, 2013 Thanks Carlos, great workflow. Btw, I very much agree with flamerz, it'd be great to be able to append the text on a previously existing file I’ll see how can add such feature and I’ll let you know. Link to comment
twinpeaks Posted March 27, 2013 Share Posted March 27, 2013 I’ll see how can add such feature and I’ll let you know. Whoops and I just sent you a message about appending or better yet prepending to one file. Argh I should have read the forum first. Link to comment
Carlos-Sz Posted March 27, 2013 Author Share Posted March 27, 2013 Whoops and I just sent you a message about appending or better yet prepending to one file. Argh I should have read the forum first. No problem. There are two features that I may add: - select any text file from the working folder to add a new piece of text - have a set text file to keep appending new pieces of text twinpeaks 1 Link to comment
hzlzh Posted March 27, 2013 Share Posted March 27, 2013 new file from clipboard is really nice. Link to comment
Carlos-Sz Posted March 27, 2013 Author Share Posted March 27, 2013 new file from clipboard is really nice. It’s very handy indeed though I use text selection a lot. @ all The now called Journal feature is in progress and it will work like that: - you set the journal name - keyword + fn key: you can add text to journal from clipboard, text selection and typed note - hotkey: you can add text to journal from text selection - the full date and time will be added along with the URL (if any) - new entries will be saved at the beginning of the journal If you have a suggestion regarding the journal feature please let me know. Thank you. Link to comment
Carlos-Sz Posted March 31, 2013 Author Share Posted March 31, 2013 Version 2.0 is out! Journal (add text to a custom text file) Search notes within Alfred nvALT support Alleyoop workflow support See initial post for details. twinpeaks 1 Link to comment
Wordius Posted April 2, 2013 Share Posted April 2, 2013 Great work, Carlos. This is easily the best file-creation workflow I’ve come across. My only problem is that most of the time I’m not going to need the addition of clipboard information to a file. So, in order to use this workflow, I have to clear the clipboard manually before creating a note or appending to a note. Can you think of a better workaround for this? Thanks again. Link to comment
Carlos-Sz Posted April 2, 2013 Author Share Posted April 2, 2013 Great work, Carlos. This is easily the best file-creation workflow I’ve come across. My only problem is that most of the time I’m not going to need the addition of clipboard information to a file. So, in order to use this workflow, I have to clear the clipboard manually before creating a note or appending to a note. Can you think of a better workaround for this? Thanks again. Thank you. By using the keyword newf you can also create a new file based on text selection, content typed by you in Alfred window or even a blank file. See screenshot below. Hotkeys only work with text selection right now. Please, let me know how you are working with the workflow (e.g. keyword or hotkey) and what exactly you need (a new keyword or hotkey). Link to comment
Wordius Posted April 2, 2013 Share Posted April 2, 2013 Thanks, Carlos. I’m using it with the keyword ‘newf’, but whichever option I choose – New Text File from Text Selection, New Blank Text File, Type the Text… – the content of my clipboard is pasted into the target file, including when holding down fn to append a journal entry. This, I believe, is the intended use for the workflow. What I am trying to achieve is Type the Text combined with fn to make a new journal entry without pasting in the content of the clipboard. As an aside, I’m using the ‘Journal entry’ feature to append text to a scratchpad – a text file in nvALT where I collect random notes – rather than an actual journal. Link to comment
twinpeaks Posted April 2, 2013 Share Posted April 2, 2013 @Wordius, I am not getting the same results... If I type something after "newf" with the last option, "Type The Text: ..." The only thing that get's added in addition to the actual string of text is the url of the site, if I am on a webpage, and the default tag - which with a " - " at the end can be dismissed completely. No worries though, Carlos-Sz is definitely going to find a fix for you! Link to comment
Carlos-Sz Posted April 2, 2013 Author Share Posted April 2, 2013 (edited) Thanks, Carlos. I’m using it with the keyword ‘newf’, but whichever option I choose – New Text File from Text Selection, New Blank Text File, Type the Text… – the content of my clipboard is pasted into the target file, including when holding down fn to append a journal entry. This, I believe, is the intended use for the workflow. What I am trying to achieve is Type the Text combined with fn to make a new journal entry without pasting in the content of the clipboard. As an aside, I’m using the ‘Journal entry’ feature to append text to a scratchpad – a text file in nvALT where I collect random notes – rather than an actual journal. Please: - download and install the workflow again - bring Alfred and type newf - now type a note - now using the arrow keys go to “Type the Text” item - hold fn key and press return key Make sure “Type the Text” is selected before hitting return key. Finally, are you typing any symbol in your note. Would you mind to share an example? Thank you. @ thank you twinpeaks for your feedback. I have just tested in my Mac and everything is working as it is too. Edited April 2, 2013 by Carlos-Sz Link to comment
Wordius Posted April 2, 2013 Share Posted April 2, 2013 (edited) @Carlos-sz, @twinpeaks The workflow is working as intended. The ‘clipboard’ content added to the note is the URL of the frontmost tab in Safari, as in the examples below. For the first note – at the bottom – I cleared the clipboard manually before appending the note. Should add that all I was trying to do was prevent the URL being added to the note. Most of these notes will be added ‘blind’, throughout the day. I wanted to avoid having to edit the file to remove all the URLs. Edited April 2, 2013 by Wordius Link to comment
twinpeaks Posted April 2, 2013 Share Posted April 2, 2013 Ah, I see. So it was the URL... I guess you can blame me for that request. It is very useful to have the link of where you grabbed a snippet of text or even had a thought that you recorded but I can see where your coming from. Carlos-Sz will probably make this very easy on you with a modifier or something better but in the meantime I will look for a quick regex snippet you can run that will remove all http://.... lines form a file. Link to comment
Carlos-Sz Posted April 2, 2013 Author Share Posted April 2, 2013 @Carlos-sz, @twinpeaks The workflow is working as intended. The ‘clipboard’ content added to the note is the URL of the frontmost tab in Safari, as in the examples below. For the first note – at the bottom – I cleared the clipboard manually before appending the note. ... Should add that all I was trying to do was prevent the URL being added to the note. Most of these notes will be added ‘blind’, throughout the day. I wanted to avoid having to edit the file to remove all the URLs. OK. In the next update, to remove the URL from “Add to Journal” you will have to add @ at the end of the text e.g. my note@ And in order to add a personal note* to a journal entry, it won’t be necessary to start with @ anymore. twinpeaks 1 Link to comment
Wordius Posted April 3, 2013 Share Posted April 3, 2013 @twinpeaks: I can certainly understand how useful it is to include a URL when filing snippets of text from web pages and elsewhere. @Carlos-Sz: And with that, your single, multi-path workflow will replace four of my existing Alfred workflows. Brilliant stuff, and thanks for even entertaining the idea, let alone implementing it. twinpeaks 1 Link to comment
Carlos-Sz Posted April 3, 2013 Author Share Posted April 3, 2013 @twinpeaks: I can certainly understand how useful it is to include a URL when filing snippets of text from web pages and elsewhere. @Carlos-Sz: And with that, your single, multi-path workflow will replace four of my existing Alfred workflows. Brilliant stuff, and thanks for even entertaining the idea, let alone implementing it. Here is a first (beta) release to test: link To remove the URL just add @ at the end in Alfred window (journal or not): newf @ newf mytag@ newf mytag#myfilename@ I’m still testing the new version and I’ll update the initial page when tests are completely done. Link to comment
Wordius Posted April 3, 2013 Share Posted April 3, 2013 @Carloz-Sz Download and tested. Works perfectly for me. Many thanks. When you’re finished testing, I’ll share the link to the download here. 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