├── .DS_Store ├── Alfred ├── Config dotfiles.alfredworkflow ├── Docker.alfredworkflow ├── Focus Timer.alfredworkflow ├── FuckYeahMarkdown.alfredworkflow ├── HS Reload.alfredworkflow ├── Helium TV.alfredworkflow ├── IP.alfredworkflow ├── Listen WebRadios.alfredworkflow ├── Modem.alfredworkflow ├── Muximux.alfredworkflow ├── Night-Pharmacy.alfredworkflow ├── README.md ├── RStudio Server.alfredworkflow ├── Reference Importer.alfredworkflow ├── ReferenceImporter_v2.alfredworkflow ├── Send URL.alfredworkflow ├── Streamlink.alfredworkflow ├── SynAnt.alfredworkflow ├── V(M)izontele.alfredworkflow ├── beinsports Highlights.alfredworkflow └── lg.alfredworkflow ├── KeyboardMaestro ├── Add Keyword.kmmacros ├── Capitalize All.kmmacros ├── Change pdf Metadata.kmmacros ├── KM to Alfred.kmmacros ├── Open Linked Files.kmmacros ├── Open in ST.kmmacros ├── README.md ├── ReadMarkdownandTakeNoteDTPO.kmmacros ├── ReadMarkdownandTakeNotePathFinder.kmmacros ├── Sci-Hub.kmmacros ├── SkimToDTPO.kmmacros ├── Update Databases.kmmacros ├── changemetadata.gif ├── changemetadata.sh └── skimtodtpo.gif ├── PopClip ├── .DS_Store ├── RunR.popclipext │ ├── Config.plist │ ├── README.md │ ├── RunR.applescript │ └── RunR.png ├── au_library.popclipext │ ├── Config.plist │ └── au.png ├── eksisozluk.popclipext │ ├── Config.plist │ └── eksisozluk.png ├── github.popclipext │ ├── Config.plist │ └── github.png ├── iplookup.popclipext │ ├── Config.plist │ └── iplookup.png ├── ksu_library.popclipext │ ├── Config.plist │ └── ksu.png ├── libgen.popclipext │ ├── Config.plist │ └── libgen.png ├── rseek.popclipext │ ├── Config.plist │ └── rseek.png ├── scihub.popclipext │ ├── Config.plist │ └── scihub.png └── skimdtpo.popclipext │ ├── Config.plist │ ├── hlite.png │ └── km.applescript ├── README.md ├── Scripts ├── Applescripts │ ├── README.md │ └── appInfoInTitle.applescript ├── Automator │ ├── README.md │ ├── gitinfo.workflow │ │ └── Contents │ │ │ ├── Info.plist │ │ │ ├── QuickLook │ │ │ └── Preview.png │ │ │ └── document.wflow │ ├── gitinfo │ │ ├── post-checkout │ │ ├── post-commit │ │ └── post-merge │ ├── nvALT2DTPO-Personal.workflow │ │ └── Contents │ │ │ ├── QuickLook │ │ │ └── Preview.png │ │ │ └── document.wflow │ ├── nvALT2DTPO.workflow │ │ └── Contents │ │ │ ├── QuickLook │ │ │ └── Preview.png │ │ │ └── document.wflow │ ├── vc.workflow │ │ └── Contents │ │ │ ├── Info.plist │ │ │ ├── QuickLook │ │ │ └── Preview.png │ │ │ └── document.wflow │ └── vc │ │ ├── vc │ │ └── vc-git.awk ├── Bibdesk │ ├── Bibdesk Download.scpt │ ├── Capitalize.scpt │ ├── Error Reporting.scpt │ ├── README.md │ ├── Toggle Journal Abbreviation.scpt │ └── bibfetch.pl.scpt ├── ControlPlaneScripts │ ├── viscosity_connect.sh │ └── viscosity_disconnect.sh ├── DT │ ├── AddKeywordsToPdfMetadata___Ctrl-Alt-9.scptd │ ├── AddPathToPdfMetadata___Ctrl-Alt-0.scptd │ ├── Annotation template with specific issue tagging___Ctrl-Alt-2.scptd │ │ └── Contents │ │ │ ├── Info.plist │ │ │ ├── MacOS │ │ │ └── Pashua.app │ │ │ │ └── Contents │ │ │ │ ├── Info.plist │ │ │ │ ├── MacOS │ │ │ │ └── Pashua │ │ │ │ ├── PkgInfo │ │ │ │ └── Resources │ │ │ │ ├── AppIcon.icns │ │ │ │ ├── AppIcon.png │ │ │ │ ├── AppIcon@2.png │ │ │ │ ├── English.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ ├── MainMenu.nib │ │ │ │ ├── Read me.html │ │ │ │ └── dict.strings │ │ │ │ ├── French.lproj │ │ │ │ ├── MainMenu.nib │ │ │ │ └── dict.strings │ │ │ │ ├── German.lproj │ │ │ │ ├── MainMenu.nib │ │ │ │ ├── Read me.html │ │ │ │ └── dict.strings │ │ │ │ ├── bar.png │ │ │ │ ├── bar@2.png │ │ │ │ ├── clear.png │ │ │ │ ├── clear@2x.png │ │ │ │ ├── li.png │ │ │ │ ├── logo.png │ │ │ │ ├── logo@2.png │ │ │ │ └── style.css │ │ │ └── Resources │ │ │ ├── Scripts │ │ │ └── main.scpt │ │ │ ├── description.rtfd │ │ │ └── TXT.rtf │ │ │ └── style.css │ ├── DT_Skim.scpt │ ├── Mark Read.scpt │ ├── RefreshAllRSS___Ctrl-Alt-1.scptd │ ├── Remove all tags from selection.scpt │ └── database_change_error.scpt ├── DevonAgent │ └── Open URL in Default Browser.scpt ├── PerlScripts │ ├── README.md │ ├── abbreviateJournalTitles.pl │ ├── bibfetch.el │ └── bibfetch.pl ├── PythonScripts │ ├── README.md │ ├── cb_customs.py │ ├── convertbibliography.py │ └── pdfmeat.py ├── ST │ └── LaTeX_article.sublime-snippet ├── ShellScripts │ ├── README.md │ ├── changemetadata.sh │ ├── minion.sh │ └── minion2.sh ├── homebrew │ ├── LICENSE │ ├── README.md │ ├── cask-notifier.plist │ ├── cask-notifier.sh │ ├── homebrew-notifier.plist │ ├── homebrew-notifier.sh │ └── install.sh └── journal_abbreviations │ ├── README.md │ ├── abbreviations.txt │ ├── combineJournalLists.py │ ├── jabref.txt │ └── ncbi.txt └── VivaldiCustomizations ├── Vimium ├── vimium.css └── vomnibar.css ├── browser.html ├── custom.css ├── custom.js └── vivaldi.sh /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/.DS_Store -------------------------------------------------------------------------------- /Alfred/Config dotfiles.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Config dotfiles.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Docker.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Docker.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Focus Timer.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Focus Timer.alfredworkflow -------------------------------------------------------------------------------- /Alfred/FuckYeahMarkdown.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/FuckYeahMarkdown.alfredworkflow -------------------------------------------------------------------------------- /Alfred/HS Reload.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/HS Reload.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Helium TV.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Helium TV.alfredworkflow -------------------------------------------------------------------------------- /Alfred/IP.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/IP.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Listen WebRadios.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Listen WebRadios.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Modem.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Modem.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Muximux.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Muximux.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Night-Pharmacy.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Night-Pharmacy.alfredworkflow -------------------------------------------------------------------------------- /Alfred/README.md: -------------------------------------------------------------------------------- 1 | https://github.com/vitorgalvao/alfred-workflows/blob/4dd5eb8650057a46ca1278b5ebc4964cb7bd57eb/SynAnt/SynAnt.alfredworkflow 2 | https://github.com/andrewning/alfred-workflows-scientific 3 | https://github.com/vitorgalvao/alfred-workflows/tree/master/ShortFilms -------------------------------------------------------------------------------- /Alfred/RStudio Server.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/RStudio Server.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Reference Importer.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Reference Importer.alfredworkflow -------------------------------------------------------------------------------- /Alfred/ReferenceImporter_v2.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/ReferenceImporter_v2.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Send URL.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Send URL.alfredworkflow -------------------------------------------------------------------------------- /Alfred/Streamlink.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/Streamlink.alfredworkflow -------------------------------------------------------------------------------- /Alfred/SynAnt.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/SynAnt.alfredworkflow -------------------------------------------------------------------------------- /Alfred/V(M)izontele.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/V(M)izontele.alfredworkflow -------------------------------------------------------------------------------- /Alfred/beinsports Highlights.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/beinsports Highlights.alfredworkflow -------------------------------------------------------------------------------- /Alfred/lg.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Alfred/lg.alfredworkflow -------------------------------------------------------------------------------- /KeyboardMaestro/Capitalize All.kmmacros: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Activate 7 | Normal 8 | CreationDate 9 | 459267954.64927697 10 | IsActive 11 | 12 | Macros 13 | 14 | 15 | Actions 16 | 17 | 18 | DisplayKind 19 | None 20 | IncludeStdErr 21 | 22 | IsActive 23 | 24 | IsDisclosed 25 | 26 | MacroActionType 27 | ExecuteAppleScript 28 | Path 29 | 30 | Text 31 | (* 32 | This script capitalizes the journal titles of the selected publications 33 | in Bibdesk using smart capitalization. I.e., 'small' words 34 | such as the, a, in, for, from, about, ..., are not capitalized, 35 | unless at the beginning of a sentence, and capitalization is 36 | supressed between matching braces {}. 37 | It is based on the "Capitalize Titles" script and uses the "Capitalize" 38 | and "Error Reporting" libraries, all of which were written by 39 | Christiaan Hofman 40 | (http://www.physics.rutgers.edu/~hofman/applescript/). 41 | This script requires Bibdesk 0.97 or higher. 42 | *) -- load the script library for capitalization set capitalizeLib to (load script file ¬ ((path to home folder as string) & "Library:ScriptingAdditions:Capitalize.scpt")) -- load the Error Reporting script library set errorLib to (load script file ¬ ((path to home folder as string) & "Library:ScriptingAdditions:Error Reporting.scpt")) -- we only report all errors at the end tell errorLib delayReportErrors() set its defaultErrorFileName to "BibdeskScriptErrors" end tell tell application "BibDesk" activate -- without document, there is no selection, so nothing to do if (count of documents) = 0 then beep display dialog "No documents found." buttons {"•"} default button 1 giving up after 3 end if set thePublications to the selection of document 1 tell capitalizeLib -- protect chars between balanced {} set its startProtectChar to "{" set its endProtectChar to "}" repeat with thePub in thePublications try set theJournal to the value of field "Journal" of thePub set theJournal to capitalize(theJournal) set the value of field "Journal" of thePub to theJournal on error errorMessage number errorNumber tell errorLib to reportError(errorMessage, errorNumber) end try end repeat end tell -- capitalizeLib set selection of document 1 to thePublications end tell -- Bibdesk -- see if we had any errors tell errorLib to checkForErrors() (* 43 | This script capitalizes the authors of the selected publications 44 | in Bibdesk using smart capitalization. I.e., 'small' words 45 | such as the, a, in, for, from, about, ..., are not capitalized, 46 | unless at the beginning of a sentence, and capitalization is 47 | suppressed between matching braces {}. 48 | It is based on the "Capitalize Titles" script and uses the 49 | "Capitalize" library, both of which were written by Christiaan 50 | Hofman 51 | (http://www.physics.rutgers.edu/~hofman/applescript/). 52 | This script requires Bibdesk 0.97 or higher. 53 | *) -- load the script library for capitalization set capitalizeLib to (load script file ¬ ((path to home folder as string) & "Library:ScriptingAdditions:Capitalize.scpt")) -- load the Error Reporting script library set errorLib to (load script file ¬ ((path to home folder as string) & "Library:ScriptingAdditions:Error Reporting.scpt")) -- we only report all errors at the end tell errorLib delayReportErrors() set its defaultErrorFileName to "BibdeskScriptErrors" end tell tell application "BibDesk" activate -- without document, there is no selection, so nothing to do if (count of documents) = 0 then beep display dialog "No documents found." buttons {"•"} default button 1 giving up after 3 end if set thePublications to the selection of document 1 tell capitalizeLib -- protect chars between balanced {} set its startProtectChar to "{" set its endProtectChar to "}" repeat with thePub in thePublications try set theAuthors to the value of field "Author" of thePub set theAuthors to capitalize(theAuthors) set the value of field "Author" of thePub to theAuthors on error errorMessage number errorNumber tell errorLib to reportError(errorMessage, errorNumber) end try end repeat end tell -- capitalizeLib set selection of document 1 to thePublications end tell -- Bibdesk -- see if we had any errors tell errorLib to checkForErrors() (* 54 | This script capitalizes the titles of the selected publications 55 | in BibDesk using smart capitalization. I.e., 'small' words 56 | such as the, a, in, for, from, about, ..., are not capitalized, 57 | unless at the beginning of a sentence, and capitalization is 58 | supressed between matching braces {}. Before capitalization, 59 | it protects the titles by adding apropriate braces, 60 | and removes newlines from the titles. 61 | This script requires BibDesk 0.97 or higher. 62 | *) -- load the script library for capitalization set capitalizeLib to (load script file ¬ ((path to home folder as string) & "Library:ScriptingAdditions:Capitalize.scpt")) -- load the script library for capitalization set protectLib to (load script file ¬ ((path to home folder as string) & "Library:Application Support:BibDesk:Scripts:_OLD:Add Protect Strings.scpt")) -- load the Error Reporting script library set errorLib to (load script file ¬ ((path to home folder as string) & "Library:ScriptingAdditions:Error Reporting.scpt")) -- we only report all errors at the end tell errorLib delayReportErrors() set its defaultErrorFileName to "BibDeskScriptErrors" end tell tell application "BibDesk" activate -- without document, there is no selection, so nothing to do if (count of documents) = 0 then beep display dialog "No documents found." buttons {"•"} default button 1 giving up after 3 end if set thePublications to the selection of document 1 -- protect chars between balanced {} set capitalizeLib's startProtectChar to "{" set capitalizeLib's endProtectChar to "}" set protectLib's startProtectChar to "{" set protectLib's endProtectChar to "}" repeat with thePub in thePublications try set theTitle to title of thePub if theTitle contains return then ¬ set theTitle to my removeNewlines(theTitle) set title of thePub to capitalizeLib's capitalize(protectLib's protectString(theTitle)) on error errorMessage number errorNumber tell errorLib to reportError(errorMessage, errorNumber) end try end repeat set selection of document 1 to thePublications end tell -- BibDesk -- see if we had any errors tell errorLib to checkForErrors() -- we're done! tell application id "com.Growl.GrowlHelperApp" 63 | -- Make a list of all the notification types 64 | -- that this script will ever send: 65 | set the allNotificationsList to ¬ 66 | {"BibdeskCapAll"} 67 | 68 | -- Make a list of the notifications 69 | -- that will be enabled by default. 70 | -- Those not enabled by default can be enabled later 71 | -- in the 'Applications' tab of the Growl preferences. 72 | set the enabledNotificationsList to ¬ 73 | {"BibdeskCapAll"} 74 | 75 | -- Register our script with growl. 76 | -- You can optionally (as here) set a default icon 77 | -- for this script's notifications. 78 | register as application ¬ 79 | "Growl BibdeskCapAll" all notifications allNotificationsList ¬ 80 | default notifications enabledNotificationsList ¬ 81 | icon of application "Bibdesk" 82 | 83 | -- Send a Notification... 84 | notify with name ¬ 85 | "BibdeskCapAll" title ¬ 86 | "BibdeskCapAll" description ¬ 87 | "All titles are capitalized." application name "Growl BibdeskCapAll" 88 | 89 | end tell on removeNewlines(theString) if theString contains return & space then set AppleScript's text item delimiters to return & space set parts to text items of theString set AppleScript's text item delimiters to space set theString to parts as string end if if theString contains return then set AppleScript's text item delimiters to return set parts to text items of theString set AppleScript's text item delimiters to space set theString to parts as string end if repeat while theString contains space & space set AppleScript's text item delimiters to space & space set parts to text items of theString set AppleScript's text item delimiters to space set theString to parts as string end repeat return theString end removeNewlines 90 | TimeOutAbortsMacro 91 | 92 | TrimResults 93 | 94 | TrimResultsNew 95 | 96 | UseText 97 | 98 | 99 | 100 | CreationDate 101 | 459267954.64927697 102 | IsActive 103 | 104 | ModificationDate 105 | 467257570.31940502 106 | Name 107 | Capitalize All 108 | Triggers 109 | 110 | 111 | FireType 112 | Pressed 113 | KeyCode 114 | 8 115 | MacroTriggerType 116 | HotKey 117 | Modifiers 118 | 6400 119 | 120 | 121 | UID 122 | 0C56DB27-5610-48BF-BF4F-711134C200F9 123 | 124 | 125 | Name 126 | Bibdesk 127 | Targeting 128 | 129 | Targeting 130 | Included 131 | TargetingApps 132 | 133 | 134 | BundleIdentifier 135 | edu.ucsd.cs.mmccrack.bibdesk 136 | Name 137 | BibDesk 138 | NewFile 139 | /Applications/TeX/BibDesk.app 140 | 141 | 142 | 143 | ToggleMacroUID 144 | 48BF9325-8BB2-400C-B30E-77BAF2599499 145 | UID 146 | 0F426B8E-72FE-4F1F-929F-9314495EF097 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /KeyboardMaestro/KM to Alfred.kmmacros: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Activate 7 | Normal 8 | CreationDate 9 | 459267954.64927697 10 | Macros 11 | 12 | 13 | Actions 14 | 15 | 16 | KeyCode 17 | 8 18 | MacroActionType 19 | SimulateKeystroke 20 | Modifiers 21 | 256 22 | ReleaseAll 23 | 24 | 25 | 26 | KeyCode 27 | 49 28 | MacroActionType 29 | SimulateKeystroke 30 | Modifiers 31 | 256 32 | ReleaseAll 33 | 34 | 35 | 36 | Action 37 | ByTyping 38 | MacroActionType 39 | InsertText 40 | Text 41 | gsref 42 | 43 | 44 | KeyCode 45 | 9 46 | MacroActionType 47 | SimulateKeystroke 48 | Modifiers 49 | 256 50 | ReleaseAll 51 | 52 | 53 | 54 | KeyCode 55 | 47 56 | MacroActionType 57 | SimulateKeystroke 58 | Modifiers 59 | 0 60 | ReleaseAll 61 | 62 | 63 | 64 | CreationDate 65 | 459267954.64927697 66 | ModificationDate 67 | 480121056.55829602 68 | Name 69 | KM to Alfred 70 | Triggers 71 | 72 | 73 | FireType 74 | Pressed 75 | KeyCode 76 | 5 77 | MacroTriggerType 78 | HotKey 79 | Modifiers 80 | 4864 81 | 82 | 83 | UID 84 | A322B4CA-E7EA-4FD8-B596-61F32E6CC640 85 | 86 | 87 | Name 88 | Firefox 89 | Targeting 90 | 91 | Targeting 92 | Included 93 | TargetingApps 94 | 95 | 96 | BundleIdentifier 97 | org.mozilla.firefox 98 | Name 99 | Firefox 100 | NewFile 101 | /Applications/Firefox.app 102 | 103 | 104 | 105 | ToggleMacroUID 106 | AFBC9B7F-F561-4FB4-B612-5AAC89D9B075 107 | UID 108 | 896AFE56-FD6D-4F19-A1C9-7B29BFC3A5F6 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /KeyboardMaestro/Open in ST.kmmacros: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Activate 7 | Normal 8 | CreationDate 9 | 459267954.64927697 10 | Macros 11 | 12 | 13 | Actions 14 | 15 | 16 | DisplayKind 17 | Variable 18 | IncludeStdErr 19 | 20 | MacroActionType 21 | ExecuteJavaScriptForAutomation 22 | Path 23 | 24 | Text 25 | // JAVASCRIPT Version for CocoaTech PATH FINDER 26 | 27 | // for each selected item returns a triple of: 28 | // - full path 29 | // - folder path 30 | // - file name (or "" if the selection is a folder) 31 | 32 | function run() { 33 | 34 | var pfSeln = Application("Path Finder").selection(); 35 | 36 | return pfSeln ? pfSeln.map(pathFolderFile) : []; 37 | 38 | } 39 | 40 | function pathFolderFile(x) { 41 | var strPath = x.posixPath(), 42 | lstParts = strPath.split(/\//), 43 | blnFolder = x.kind() === 'Folder', 44 | strFile = blnFolder ? '' : lstParts.pop(); 45 | 46 | return [strPath]; 47 | } 48 | TimeOutAbortsMacro 49 | 50 | TrimResults 51 | 52 | TrimResultsNew 53 | 54 | UseText 55 | 56 | Variable 57 | FolderPath 58 | 59 | 60 | DisplayKind 61 | Window 62 | IncludeStdErr 63 | 64 | MacroActionType 65 | ExecuteShellScript 66 | Path 67 | 68 | Text 69 | open -a Sublime\ Text "$KMVAR_FolderPath" 70 | TimeOutAbortsMacro 71 | 72 | TrimResults 73 | 74 | TrimResultsNew 75 | 76 | UseText 77 | 78 | 79 | 80 | CreationDate 81 | 526638807.81895 82 | ModificationDate 83 | 526640207.89536399 84 | Name 85 | Open in ST 86 | Triggers 87 | 88 | 89 | FireType 90 | Pressed 91 | KeyCode 92 | 1 93 | MacroTriggerType 94 | HotKey 95 | Modifiers 96 | 768 97 | 98 | 99 | UID 100 | 7B8A17EC-D63D-4D5D-A39D-ADC58F423BAB 101 | 102 | 103 | Name 104 | Path Finder 105 | Targeting 106 | 107 | Targeting 108 | Included 109 | TargetingApps 110 | 111 | 112 | BundleIdentifier 113 | com.cocoatech.PathFinder 114 | Name 115 | Path Finder 116 | NewFile 117 | /Applications/Path Finder.app 118 | 119 | 120 | 121 | ToggleMacroUID 122 | 0C2A6157-DDA1-4C83-BB1B-B2016B927DCC 123 | UID 124 | 2D2680B7-F6C2-400E-9850-1E54DD0B5CB5 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /KeyboardMaestro/README.md: -------------------------------------------------------------------------------- 1 | These are some Keyboard Maestro macros I adapted according to my needs. Read the comments in macros for more information. If you want you can use associated popclip extensions at [emraher/popclipextensions](https://github.com/emraher/popclipextensions) 2 | 3 | 4 | ###SkimToDTPO 5 | The following gif gives an idea how SkimToDTPO macro works. 6 | 7 | ![](skimtodtpo.gif) 8 | 9 | 10 | 11 | ###Change pdf Metadata 12 | This macro works with [BibDesk](http://bibdesk.sourceforge.net/). It requires [exiftool](http://www.sno.phy.queensu.ca/~phil/exiftool/), [Growl](http://growl.info/), and the shell script named [changemetadata.sh](https://github.com/emraher/KMmacros/blob/master/changemetadata.sh) 13 | 14 | After you download the shell script change permissions. You may also need to change the first line of the script if you don't use zsh. 15 | 16 | In KM macro choose the path of the shell script. 17 | 18 | ![](changemetadata.gif) 19 | 20 | 21 | 22 | ###Capitalize All 23 | This one is a combination of various applescripts of [Christiaan Hofman](http://www.physics.rutgers.edu/~hofman/applescript/) -------------------------------------------------------------------------------- /KeyboardMaestro/ReadMarkdownandTakeNoteDTPO.kmmacros: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Activate 7 | Normal 8 | CreationDate 9 | 459267954.64927697 10 | IsActive 11 | 12 | Macros 13 | 14 | 15 | Actions 16 | 17 | 18 | DisplayKind 19 | Variable 20 | IncludeStdErr 21 | 22 | IsActive 23 | 24 | IsDisclosed 25 | 26 | MacroActionType 27 | ExecuteAppleScript 28 | Path 29 | 30 | Text 31 | tell application "DEVONthink Pro" 32 | set theFile to the content record of the think window 1 33 | set thePath to get the path of theFile 34 | end tell 35 | TimeOutAbortsMacro 36 | 37 | TrimResults 38 | 39 | TrimResultsNew 40 | 41 | UseText 42 | 43 | Variable 44 | Path 45 | 46 | 47 | DisplayKind 48 | Variable 49 | IncludeStdErr 50 | 51 | IsActive 52 | 53 | IsDisclosed 54 | 55 | MacroActionType 56 | ExecuteAppleScript 57 | Path 58 | 59 | Text 60 | tell application "DEVONthink Pro" 61 | set theFile to the content record of the think window 1 62 | set theName to the filename of theFile as Unicode text 63 | end tell 64 | TimeOutAbortsMacro 65 | 66 | TrimResults 67 | 68 | TrimResultsNew 69 | 70 | UseText 71 | 72 | Variable 73 | Name 74 | 75 | 76 | IsActive 77 | 78 | IsDisclosed 79 | 80 | MacroActionType 81 | SetVariableToText 82 | Text 83 | NOTE: %Variable%Name% on %ICUDateTime%Y-MM-dd-%%LongTime% 84 | Variable 85 | nvaltTitle 86 | 87 | 88 | IsActive 89 | 90 | IsDisclosed 91 | 92 | MacroActionType 93 | SetVariableToText 94 | Text 95 | 96 | Variable 97 | nvaltBody 98 | 99 | 100 | IsActive 101 | 102 | IsDisclosed 103 | 104 | MacroActionType 105 | SetVariableToText 106 | Text 107 | devonthink 108 | Variable 109 | nvaltTags 110 | 111 | 112 | Action 113 | PercentEncodeForURL 114 | IsActive 115 | 116 | IsDisclosed 117 | 118 | MacroActionType 119 | FilterVariable 120 | Variable 121 | nvaltTitle 122 | 123 | 124 | Action 125 | PercentEncodeForURL 126 | IsActive 127 | 128 | IsDisclosed 129 | 130 | MacroActionType 131 | FilterVariable 132 | Variable 133 | nvaltBody 134 | 135 | 136 | Action 137 | PercentEncodeForURL 138 | IsActive 139 | 140 | IsDisclosed 141 | 142 | MacroActionType 143 | FilterVariable 144 | Variable 145 | nvaltTags 146 | 147 | 148 | IsActive 149 | 150 | IsDisclosed 151 | 152 | MacroActionType 153 | SetVariableToText 154 | Text 155 | nvalt://make/?title=%Variable%nvaltTitle%&html=%Variable%nvaltBody%&tags=%Variable%nvaltTags% 156 | Variable 157 | nvaltURL 158 | 159 | 160 | AllWindows 161 | 162 | AlreadyActivatedActionType 163 | Normal 164 | Application 165 | 166 | BundleIdentifier 167 | net.elasticthreads.nv 168 | Name 169 | nvALT 170 | NewFile 171 | /Applications/nvALT.app 172 | 173 | IsActive 174 | 175 | IsDisclosed 176 | 177 | MacroActionType 178 | ActivateApplication 179 | ReopenWindows 180 | 181 | TimeOutAbortsMacro 182 | 183 | 184 | 185 | Conditions 186 | 187 | ConditionList 188 | 189 | 190 | Application 191 | 192 | BundleIdentifier 193 | net.elasticthreads.nv 194 | Name 195 | nvALT 196 | NewFile 197 | /Applications/nvALT.app 198 | 199 | ApplicationConditionType 200 | Active 201 | ConditionType 202 | Application 203 | 204 | 205 | Application 206 | 207 | BundleIdentifier 208 | net.elasticthreads.nv 209 | Name 210 | nvALT 211 | NewFile 212 | /Applications/nvALT.app 213 | 214 | ConditionType 215 | FrontWindow 216 | FrontWindowConditionType 217 | Exists 218 | IsFrontApplication 219 | 220 | 221 | 222 | ConditionListMatch 223 | All 224 | 225 | IsActive 226 | 227 | IsDisclosed 228 | 229 | MacroActionType 230 | PauseUntil 231 | TimeOutAbortsMacro 232 | 233 | 234 | 235 | DisplayKind 236 | None 237 | IncludeStdErr 238 | 239 | IsActive 240 | 241 | IsDisclosed 242 | 243 | MacroActionType 244 | ExecuteShellScript 245 | Path 246 | 247 | Text 248 | open "$KMVAR_nvaltURL" 249 | TimeOutAbortsMacro 250 | 251 | TrimResults 252 | 253 | TrimResultsNew 254 | 255 | UseText 256 | 257 | 258 | 259 | Application 260 | 261 | BundleIdentifier 262 | com.brettterpstra.marked2 263 | Name 264 | Marked 265 | NewFile 266 | /Applications/Marked.app 267 | 268 | IsActive 269 | 270 | IsDefaultApplication 271 | 272 | IsDisclosed 273 | 274 | MacroActionType 275 | Open1File 276 | Path 277 | %Variable%Path% 278 | 279 | 280 | IsActive 281 | 282 | IsDisclosed 283 | 284 | MacroActionType 285 | BringWindowsForward 286 | 287 | 288 | CreationDate 289 | 459267954.64927697 290 | IsActive 291 | 292 | ModificationDate 293 | 451518903.80850101 294 | Name 295 | Read Markdown and Take Note 296 | Triggers 297 | 298 | 299 | FireType 300 | Pressed 301 | KeyCode 302 | 15 303 | MacroTriggerType 304 | HotKey 305 | Modifiers 306 | 6400 307 | 308 | 309 | UID 310 | 4088F95D-252D-4EA9-8418-55499E831A91 311 | 312 | 313 | Name 314 | DevonThink 315 | Targeting 316 | 317 | Targeting 318 | Included 319 | TargetingApps 320 | 321 | 322 | BundleIdentifier 323 | com.devon-technologies.thinkpro2 324 | Name 325 | DEVONthink Pro 326 | NewFile 327 | /Applications/DEVONthink Pro.app 328 | 329 | 330 | 331 | ToggleMacroUID 332 | FB524684-1035-48CA-8746-EBE9205AA353 333 | UID 334 | E0F7BE25-07E3-4205-A84E-8387B564B168 335 | 336 | 337 | 338 | -------------------------------------------------------------------------------- /KeyboardMaestro/ReadMarkdownandTakeNotePathFinder.kmmacros: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Activate 7 | Normal 8 | CreationDate 9 | 459267954.64927697 10 | IsActive 11 | 12 | Macros 13 | 14 | 15 | Actions 16 | 17 | 18 | IsActive 19 | 20 | IsDisclosed 21 | 22 | MacroActionType 23 | SelectMenuItem 24 | Menu 25 | 26 | File 27 | Reveal in Finder 28 | 29 | StopOnFailure 30 | 31 | TargetApplication 32 | 33 | BundleIdentifier 34 | com.cocoatech.PathFinder 35 | Name 36 | Path Finder 37 | NewFile 38 | /Applications/Path Finder.app 39 | 40 | TargetingType 41 | Specific 42 | 43 | 44 | Conditions 45 | 46 | ConditionList 47 | 48 | 49 | Application 50 | 51 | BundleIdentifier 52 | com.apple.finder 53 | Name 54 | Finder 55 | NewFile 56 | /System/Library/CoreServices/Finder.app 57 | 58 | ApplicationConditionType 59 | Active 60 | ConditionType 61 | Application 62 | 63 | 64 | ConditionListMatch 65 | All 66 | 67 | IsActive 68 | 69 | IsDisclosed 70 | 71 | MacroActionType 72 | PauseUntil 73 | TimeOutAbortsMacro 74 | 75 | 76 | 77 | IsActive 78 | 79 | IsDisclosed 80 | 81 | MacroActionType 82 | OpenFinderSelection 83 | TargetApplication 84 | 85 | BundleIdentifier 86 | com.brettterpstra.marked2 87 | Name 88 | Marked 89 | NewFile 90 | /Applications/Marked.app 91 | 92 | TargetingType 93 | Specific 94 | 95 | 96 | Application 97 | 98 | IsActive 99 | 100 | IsDefaultApplication 101 | 102 | IsDisclosed 103 | 104 | MacroActionType 105 | Open1File 106 | Path 107 | /Applications/nvALT.app 108 | 109 | 110 | DisplayKind 111 | None 112 | IncludeStdErr 113 | 114 | IsActive 115 | 116 | IsDisclosed 117 | 118 | MacroActionType 119 | ExecuteAppleScript 120 | Path 121 | 122 | Text 123 | tell application "Finder" 124 | close every window 125 | end tell 126 | TimeOutAbortsMacro 127 | 128 | TrimResults 129 | 130 | TrimResultsNew 131 | 132 | UseText 133 | 134 | 135 | 136 | CreationDate 137 | 459267954.64927697 138 | IsActive 139 | 140 | ModificationDate 141 | 452464238.95656002 142 | Name 143 | Read Markdown and Take Note 144 | Triggers 145 | 146 | 147 | FireType 148 | Pressed 149 | KeyCode 150 | 15 151 | MacroTriggerType 152 | HotKey 153 | Modifiers 154 | 6400 155 | 156 | 157 | UID 158 | 23B6E851-D0EF-4882-90B6-74CF65816927 159 | 160 | 161 | Name 162 | Path Finder 163 | Targeting 164 | 165 | Targeting 166 | Included 167 | TargetingApps 168 | 169 | 170 | BundleIdentifier 171 | com.cocoatech.PathFinder 172 | Name 173 | Path Finder 174 | NewFile 175 | /Applications/Path Finder.app 176 | 177 | 178 | 179 | ToggleMacroUID 180 | 0C2A6157-DDA1-4C83-BB1B-B2016B927DCC 181 | UID 182 | 2D2680B7-F6C2-400E-9850-1E54DD0B5CB5 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /KeyboardMaestro/Sci-Hub.kmmacros: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Activate 7 | Normal 8 | CreationDate 9 | 459267954.64927697 10 | Macros 11 | 12 | 13 | Actions 14 | 15 | 16 | KeyCode 17 | 16 18 | MacroActionType 19 | SimulateKeystroke 20 | Modifiers 21 | 0 22 | ReleaseAll 23 | 24 | 25 | 26 | KeyCode 27 | 17 28 | MacroActionType 29 | SimulateKeystroke 30 | Modifiers 31 | 0 32 | ReleaseAll 33 | 34 | 35 | 36 | Action 37 | ByTyping 38 | MacroActionType 39 | InsertText 40 | Text 41 | http://sci-hub.cc/%CurrentClipboard% 42 | 43 | 44 | KeyCode 45 | 36 46 | MacroActionType 47 | SimulateKeystroke 48 | Modifiers 49 | 0 50 | ReleaseAll 51 | 52 | 53 | 54 | CreationDate 55 | 505664022.91033602 56 | ModificationDate 57 | 505664206.12637401 58 | Name 59 | Sci-Hub 60 | Triggers 61 | 62 | 63 | FireType 64 | Pressed 65 | KeyCode 66 | 1 67 | MacroTriggerType 68 | HotKey 69 | Modifiers 70 | 4864 71 | 72 | 73 | UID 74 | 16BE71E6-E4EE-4FAA-8BF2-8993C3865F45 75 | 76 | 77 | Name 78 | Firefox 79 | Targeting 80 | 81 | Targeting 82 | Included 83 | TargetingApps 84 | 85 | 86 | BundleIdentifier 87 | org.mozilla.firefox 88 | Name 89 | Firefox 90 | NewFile 91 | /Applications/Firefox.app 92 | 93 | 94 | 95 | ToggleMacroUID 96 | AFBC9B7F-F561-4FB4-B612-5AAC89D9B075 97 | UID 98 | 896AFE56-FD6D-4F19-A1C9-7B29BFC3A5F6 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /KeyboardMaestro/changemetadata.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/KeyboardMaestro/changemetadata.gif -------------------------------------------------------------------------------- /KeyboardMaestro/changemetadata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | /usr/local/bin/exiftool -overwrite_original -Title="$KMVAR_title" -Author="$KMVAR_authors" -Subject="$KMVAR_subject" -Keywords="$KMVAR_keywords" "$KMVAR_path" -------------------------------------------------------------------------------- /KeyboardMaestro/skimtodtpo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/KeyboardMaestro/skimtodtpo.gif -------------------------------------------------------------------------------- /PopClip/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/.DS_Store -------------------------------------------------------------------------------- /PopClip/RunR.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | AppleScript File 9 | RunR.applescript 10 | Image File 11 | RunR.png 12 | Title 13 | Run R Command in RStudio 14 | 15 | 16 | Extension Description 17 | Run the selected text as a R command in RStudio. 18 | Extension Identifier 19 | com.emraher.popclip.extension.rrc 20 | Extension Image File 21 | RunR.png 22 | Extension Name 23 | RStudio 24 | 25 | 26 | -------------------------------------------------------------------------------- /PopClip/RunR.popclipext/README.md: -------------------------------------------------------------------------------- 1 | RunR 2 | ============== 3 | 4 | Run R Command extension for PopClip. 5 | 6 | Adapted from [RunCommand](https://github.com/pilotmoon/PopClip-Extensions/tree/master/source/RunCommand). -------------------------------------------------------------------------------- /PopClip/RunR.popclipext/RunR.applescript: -------------------------------------------------------------------------------- 1 | tell application "RStudio" 2 | activate 3 | cmd "{popclip text}" 4 | end tell 5 | -------------------------------------------------------------------------------- /PopClip/RunR.popclipext/RunR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/RunR.popclipext/RunR.png -------------------------------------------------------------------------------- /PopClip/au_library.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | au.png 10 | Title 11 | au_library 12 | URL 13 | http://search.ebscohost.com/login.aspx?search_prefix=&bquery={popclip text}&uquery={popclip text}&direct=true&scope=site&site=eds-live&profile=eds&authtype=ip&authtype=guest&custid=s6844938&groupid=main&cli0=FT&clv0=N&cli1=RV&clv1=N&cli2=FC&clv2=N&cli3=FC1&clv3=N 14 | 15 | 16 | Extension Description 17 | au_library 18 | Extension Identifier 19 | com.eremrah.popclip.extension.au_library 20 | Extension Name 21 | au_library 22 | 23 | -------------------------------------------------------------------------------- /PopClip/au_library.popclipext/au.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/au_library.popclipext/au.png -------------------------------------------------------------------------------- /PopClip/eksisozluk.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | eksisozluk.png 10 | Title 11 | eksisozluk 12 | URL 13 | https://eksisozluk.com/?q={popclip text} 14 | 15 | 16 | Extension Description 17 | eksisozluk 18 | Extension Identifier 19 | com.eremrah.popclip.extension.eksisozluk 20 | Extension Name 21 | eksisozluk 22 | 23 | 24 | -------------------------------------------------------------------------------- /PopClip/eksisozluk.popclipext/eksisozluk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/eksisozluk.popclipext/eksisozluk.png -------------------------------------------------------------------------------- /PopClip/github.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | github.png 10 | Title 11 | github 12 | URL 13 | https://github.com/search?q={popclip text} 14 | 15 | 16 | Extension Description 17 | github 18 | Extension Identifier 19 | com.eremrah.popclip.extension.github 20 | Extension Name 21 | github 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /PopClip/github.popclipext/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/github.popclipext/github.png -------------------------------------------------------------------------------- /PopClip/iplookup.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | iplookup.png 10 | Title 11 | iplookup 12 | URL 13 | http://{popclip text}.ipaddress.com 14 | 15 | 16 | Extension Description 17 | iplookup 18 | Extension Identifier 19 | com.eremrah.popclip.extension.iplookup 20 | Extension Name 21 | iplookup 22 | 23 | 24 | -------------------------------------------------------------------------------- /PopClip/iplookup.popclipext/iplookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/iplookup.popclipext/iplookup.png -------------------------------------------------------------------------------- /PopClip/ksu_library.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | ksu.png 10 | Title 11 | ksu_library 12 | URL 13 | http://searchit.lib.ksu.edu/primo_library/libweb/action/search.do?fn=search&ct=search&fn=search&ct=search&initialSearch=true&mode=Basic&tab=default_tab&indx=1&dum=true&srt=rank&vid=KSUD&frbg=&tb=t&vl(freeText0)={popclip text}&scp.scps=scope%3A%2801KSU_ALMA%29%2Cscope%3A%2801KSU%29%2Cscope%3A%2801KSU_DSPACE%29%2Cprimo_central_multiple_fe&vl%28391493158UI1%29=all_items&vl%281UIStartWith0%29=contains&vl%28312793377UI0%29=any&vl%28312793377UI0%29=title&vl%28312793377UI0%29=any&Submit=Apply+Search+Limits 14 | 15 | 16 | Extension Description 17 | ksu_library 18 | Extension Identifier 19 | com.eremrah.popclip.extension.ksu_library 20 | Extension Name 21 | ksu_library 22 | 23 | 24 | -------------------------------------------------------------------------------- /PopClip/ksu_library.popclipext/ksu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/ksu_library.popclipext/ksu.png -------------------------------------------------------------------------------- /PopClip/libgen.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | libgen.png 10 | Title 11 | libgen 12 | URL 13 | http://libgen.io/search.php?req={popclip text}&lg_topic=libgen&open=0&view=simple&phrase=1&column=def 14 | 15 | 16 | Extension Description 17 | libgen 18 | Extension Identifier 19 | com.eremrah.popclip.extension.libgen 20 | Extension Name 21 | libgen 22 | 23 | 24 | -------------------------------------------------------------------------------- /PopClip/libgen.popclipext/libgen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/libgen.popclipext/libgen.png -------------------------------------------------------------------------------- /PopClip/rseek.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | rseek.png 10 | Title 11 | rseek 12 | URL 13 | http://www.rseek.org/?q={popclip text} 14 | 15 | 16 | Extension Description 17 | rseek 18 | Extension Identifier 19 | com.eremrah.popclip.extension.rseek 20 | Extension Name 21 | rseek 22 | 23 | 24 | -------------------------------------------------------------------------------- /PopClip/rseek.popclipext/rseek.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/rseek.popclipext/rseek.png -------------------------------------------------------------------------------- /PopClip/scihub.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | Image File 9 | scihub.png 10 | Title 11 | scihub 12 | URL 13 | https://sci-hub.tw/{popclip text} 14 | 15 | 16 | Extension Description 17 | scihub 18 | Extension Identifier 19 | com.eremrah.popclip.extension.scihub 20 | Extension Name 21 | scihub 22 | 23 | 24 | -------------------------------------------------------------------------------- /PopClip/scihub.popclipext/scihub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/scihub.popclipext/scihub.png -------------------------------------------------------------------------------- /PopClip/skimdtpo.popclipext/Config.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Actions 6 | 7 | 8 | AppleScript File 9 | km.applescript 10 | Image File 11 | hlite.png 12 | Requirements 13 | 14 | copy 15 | 16 | Title 17 | skimdtpo 18 | 19 | 20 | Apps 21 | 22 | 23 | Link 24 | http://www.keyboardmaestro.com/main/ 25 | Name 26 | Keyboard Maestro 27 | 28 | 29 | Link 30 | http://skim-app.sourceforge.net/ 31 | Name 32 | Skim 33 | 34 | 35 | Link 36 | http://www.devontechnologies.com/redirect.php?id=product-dt 37 | Name 38 | DEVONthink Pro 39 | 40 | 41 | Credits 42 | 43 | 44 | Name 45 | Emrah Er 46 | 47 | 48 | Extension Description 49 | Higlight, take note and save to DTPO 50 | Extension Identifier 51 | com.eremrah.popclip.extension.skimdtpo 52 | Extension Image File 53 | hlite.png 54 | Extension Name 55 | skimdtpo 56 | 57 | 58 | -------------------------------------------------------------------------------- /PopClip/skimdtpo.popclipext/hlite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/PopClip/skimdtpo.popclipext/hlite.png -------------------------------------------------------------------------------- /PopClip/skimdtpo.popclipext/km.applescript: -------------------------------------------------------------------------------- 1 | tell application "System Events" to keystroke "n" using control down 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | These are the scripts, codes, etc. that I use in my workflow. 2 | -------------------------------------------------------------------------------- /Scripts/Applescripts/README.md: -------------------------------------------------------------------------------- 1 | **appInfoInTitle:** See [MacHints](http://hints.macworld.com/article.php?story=20070105053507738). -------------------------------------------------------------------------------- /Scripts/Applescripts/appInfoInTitle.applescript: -------------------------------------------------------------------------------- 1 | -- appInfoInTitle: -- This AppleScript displays the amount of memory being used by designated applications -- in the title of their frontmost windows. -- It also displays the CPU usage of these apps if it exceeds 10%. -- And it gives a warning if the memory usage of an app exceeds a specified level. -- This was originally designed to keep watch on Safari's memory consumption -- but it can be used for various apps. -- It is intended to be saved as an application and left running all of the time. -- Cameron Hayne (macdev@hayne.net) December 2006 property scriptName : "appInfoInTitle" property useDelayLoop : false -- set this to true if you want to run from Script Editor property useGrowl : true -- set this to true to get warnings via Growl (http://growl.info/) property updateDelay : 5 -- seconds property cpuFloor : 10 -- % above which CPU usage will be shown in the title property warnIntervalIncrement : 120 -- seconds global appInfoList -- list of AppInfo objects (added to via 'addAppInfo') -- registerApps: -- Add a call to 'addAppInfo' for each app you want to watch on registerApps() addAppInfo given appName:"Safari", updatePeriod:5, warnMB:100 addAppInfo given appName:"Terminal", updatePeriod:60, warnMB:15 addAppInfo given appName:"Mail", updatePeriod:60, warnMB:30 end registerApps -- update: -- This subroutine is invoked every 'updateDelay' seconds on update() repeat with appInfo in appInfoList updateAppInfo(appInfo) end repeat end update -- the run handler (invoked at script startup) on run set appInfoList to {} registerApps() if useGrowl then registerWithGrowl() end if if useDelayLoop then repeat update() delay updateDelay end repeat end if end run -- the idle handler (invoked every 'updateDelay' seconds) on idle if useDelayLoop then -- we should never get here display alert "Internal error: idle handler called even though using delay loop" quit end if update() return updateDelay end idle -- addAppInfo: -- Creates a new 'appInfo' object and adds it to 'appInfoList' -- 'updatePeriod' is the time in seconds between updates for this app -- 'warnMB' is the memory usage (in megabytes) at which warnings will be issued on addAppInfo given appName:anAppName, updatePeriod:anUpdatePeriod, warnMB:aWarnMB --on addAppInfo(anAppName, anUpdatePeriod, aWarnMB) set prevTime to (current date) - 1000 script appInfo property appName : anAppName property updatePeriod : anUpdatePeriod property warnMB : aWarnMB property lastUpdateTime : prevTime property lastWarnTime : prevTime property numWarnings : 0 property numMB : 0 property percentCpu : 0 end script set appInfoList to appInfoList & appInfo end addAppInfo -- updateAppInfo: -- Displays the amount of memory being used by the app 'appName' -- Pops up an alert dialog if the amount of memory used exceeds 'warnMB' on updateAppInfo(appInfo) set elapsed to secondsSince(lastUpdateTime of appInfo) if elapsed < (updatePeriod of appInfo) then return set pid to pidOfRunningApp(appName of appInfo) if pid is -1 then -- app is not running, so nothing to do else set info to getProcessInfo(pid) if info is "" then return set numMB of appInfo to round (first word of info as real) set percentCpu of appInfo to round (second word of info as real) showAppInfoInTitle(appInfo) checkIfMemoryUseMeritsWarning(appInfo) end if set lastUpdateTime of appInfo to (current date) end updateAppInfo -- showAppInfoInTitle: -- Displays the amount of memory being used by the app 'appName' in the title -- of the frontmost window of that app. on showAppInfoInTitle(appInfo) set appName to (appName of appInfo) set numMB to (numMB of appInfo) set percentCpu to (percentCpu of appInfo) try tell application appName if (count of windows) > 0 then set title to name of window 1 set delim to " *** " set origTitle to my removeLastPart(title, delim) set title to origTitle & delim & numMB & " MB" if percentCpu > cpuFloor then set title to title & ", " & percentCpu & "% CPU" end if set name of window 1 to title end if end tell on error -- there shouldn't be any errors -- (assuming that the app responds to 'name of window') -- but if an error occurs, we ignore it end try end showAppInfoInTitle -- checkIfMemoryUseMeritsWarning: -- Puts up a warning dialog about 'appName's memory usage -- but avoids doing this too soon after the last warning -- (increases the interval between warnings each time) on checkIfMemoryUseMeritsWarning(appInfo) set appName to (appName of appInfo) set numMB to (numMB of appInfo) set warnMB to (warnMB of appInfo) set lastWarnTime to (lastWarnTime of appInfo) set numWarnings to (numWarnings of appInfo) if numMB > warnMB then set elapsed to secondsSince(lastWarnTime) set warnInterval to (numWarnings * warnIntervalIncrement) if elapsed > warnInterval then set msg to appName & " is taking more than " & warnMB & " MB" displayWarning(appName, msg) set lastWarnTime to (current date) set numWarnings to (numWarnings + 1) end if else if numMB > (0.95 * warnMB) then -- avoid continual warnings when oscillating around 'warnMB' level set numWarnings to 1 else set numWarnings to 0 end if set lastWarnTime of appInfo to lastWarnTime set numWarnings of appInfo to numWarnings end checkIfMemoryUseMeritsWarning -- displayWarning: -- Displays a warning relating to 'appName' on displayWarning(appName, msg) if useGrowl then try displayWarningViaGrowl(appName, msg) on error displayWarningViaAlert(appName, msg) end try else displayWarningViaAlert(appName, msg) end if end displayWarning -- displayWarningViaAlert: -- Displays a warning via an AppleScript alert dialog on displayWarningViaAlert(appName, msg) tell application appName display alert msg end tell end displayWarningViaAlert -- displayWarningViaGrowl: -- Displays a warning via "Growl" on displayWarningViaGrowl(appName, msg) tell application "GrowlHelperApp" notify with name "MemoryUseWarning" title "Warning" description msg application name scriptName end tell end displayWarningViaGrowl -- registerWithGrowl: -- Registers our notifications with the "Growl" tool on registerWithGrowl() set notifList to {"MemoryUseWarning"} tell application "GrowlHelperApp" register as application scriptName all notifications notifList default notifications notifList end tell end registerWithGrowl -- secondsSince: -- Returns the number of seconds since 'aDate' on secondsSince(aDate) set curr to (current date) set elapsed to (curr - aDate) return elapsed end secondsSince -- fixLineEndings: -- returns a string with Unix-style line endings on fixLineEndings(str) set oldTIDs to AppleScript's text item delimiters set theLines to paragraphs of str set AppleScript's text item delimiters to ASCII character 10 set fixedStr to theLines as string set AppleScript's text item delimiters to oldTIDs return fixedStr end fixLineEndings -- getProcessInfo: -- Returns info about the resource usage of the specified process. -- It gets this info by invoking the Unix 'ps' command via a Perl script. -- The return value gives the number of megabytes used -- followed by the percentage of CPU used on getProcessInfo(pid) set perlCode to fixLineEndings(" # This script gets the 'RSS' & '%CPU' of the process with the given 'pid' # The 'RSS' (resident set size) is a rough measure of how much RAM # the process is using. The value is converted to megabytes. open(PS, \"/bin/ps -p " & pid & " -o pid,rss,%cpu |\"); while () { if (/^\\s*" & pid & "\\s+(\\d+)\\s+([\\d.]+)\\s*$/) { my $rss = $1; my $cpu = $2; my $rssMB = sprintf(\"%.1f\", $rss / 1024); print \"$rssMB $cpu\"; last; } } close(PS); ") set info to do shell script "perl -e " & quoted form of perlCode return info end getProcessInfo -- removeLastPart: -- Returns the string 'str' without the last part starting with 'delim' on removeLastPart(str, delim) set oldTIDs to AppleScript's text item delimiters set AppleScript's text item delimiters to delim if (count str's text items) > 1 then set str to str's text 1 thru text item -2 end if set AppleScript's text item delimiters to oldTIDs return str end removeLastPart -- pidOfRunningApp: -- Returns the pid of the process if the app 'appName' is running, -- otherwise returns -1 on pidOfRunningApp(appName) tell application "System Events" try set pid to the unix id of process appName on error set pid to -1 end try end tell return pid end pidOfRunningApp -- Copyright 2006 Cameron Hayne - macdev@hayne.net -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -------------------------------------------------------------------------------- /Scripts/Automator/README.md: -------------------------------------------------------------------------------- 1 | **gitinfo.workflow** creates git repo with [gitinfo2](https://www.ctan.org/tex-archive/macros/latex/contrib/gitinfo2?lang=en) hook changes added. 2 | 3 | **vc.workflow** creates git repo with [vc](https://www.ctan.org/pkg/vc?lang=en) files changes added. 4 | 5 | **nvALT2DTPO-Personal.workflow** 6 | 7 | **nvALT2DTPO.workflow** 8 | -------------------------------------------------------------------------------- /Scripts/Automator/gitinfo.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | gitinfo 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | NSRequiredContext 16 | 17 | NSApplicationIdentifier 18 | com.cocoatech.PathFinder 19 | 20 | NSSendFileTypes 21 | 22 | public.folder 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Scripts/Automator/gitinfo.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Automator/gitinfo.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Scripts/Automator/gitinfo.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 444.7 7 | AMApplicationVersion 8 | 2.8 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} ------------------------------------------------------------------------------------------------ set the_path to (the POSIX path of input) set AppleScript's text item delimiters to "/" if the_path does not end with "/" then set parenPath to the_path & "/" copy parenPath to the_path end if -- the variable the_path now contains the current working directory with trailing slash set the clipboard to the_path as text set fileTarget to the_path & ".git" as text ------------------------------------------------------------------------------------------------ set gitinfoPath to "/Volumes/Dropbox/Dropbox/gitRepos/SourcesOnGithub/workflow/Scripts/Automator/gitinfo/" --------------- CHANGE THIS LINE ------------------------------------------------------------------------------------------------ if FileExists(fileTarget) then --------------------------- There's a git repo. So copy hooks to existing .git folder. set cmd to "cd " & quoted form of the_path do shell script cmd set cmd to "cp " & gitinfoPath & "post-checkout " & quoted form of the_path & "/.git/hooks/" do shell script cmd set cmd to "chmod 755 " & quoted form of the_path & "/.git/hooks/post-checkout" do shell script cmd set cmd to "cp " & gitinfoPath & "post-commit " & quoted form of the_path & "/.git/hooks/" do shell script cmd set cmd to "chmod 755 " & quoted form of the_path & "/.git/hooks/post-commit" do shell script cmd set cmd to "cp " & gitinfoPath & "post-merge " & quoted form of the_path & "/.git/hooks/" do shell script cmd set cmd to "chmod 755 " & quoted form of the_path & "/.git/hooks/post-merge" do shell script cmd display notification "There is already Git repository here! gitinfo files have been copied to its hooks." with title "gitinfo" else --------------------------- There's no git repo. So create one and copy hooks to it. set cmd to "cd " & quoted form of the_path & " && git init" do shell script cmd set cmd to "cp " & gitinfoPath & "post-checkout " & quoted form of the_path & "/.git/hooks/" do shell script cmd set cmd to "chmod 755 " & quoted form of the_path & "/.git/hooks/post-checkout" do shell script cmd set cmd to "cp " & gitinfoPath & "post-commit " & quoted form of the_path & "/.git/hooks/" do shell script cmd set cmd to "chmod 755 " & quoted form of the_path & "/.git/hooks/post-commit" do shell script cmd set cmd to "cp " & gitinfoPath & "post-merge " & quoted form of the_path & "/.git/hooks/" do shell script cmd set cmd to "chmod 755 " & quoted form of the_path & "/.git/hooks/post-merge" do shell script cmd set cmd to "cd " & quoted form of the_path & " && touch README.md" & " && git add --all" & " && git commit -am 'Initial Commit'" do shell script cmd display notification "A Git repository and a README file have been created, gitinfo files have been copied to hooks, and an initial commit has been made." with title "gitinfo" end if end run on FileExists(theFile) -- (String) as Boolean tell application "System Events" if exists folder theFile then return true else return false end if end tell end FileExists 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | 0E4A89D9-7435-4AED-9E67-275B77547F8E 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | B532C468-D3CC-4E12-843B-714D54269EAA 78 | UUID 79 | 236E01FB-1F8E-4B45-AB60-62DA87E3DC31 80 | UnlocalizedApplications 81 | 82 | Automator 83 | 84 | arguments 85 | 86 | 0 87 | 88 | default value 89 | on run {input, parameters} 90 | 91 | (* Your script goes here *) 92 | 93 | return input 94 | end run 95 | name 96 | source 97 | required 98 | 0 99 | type 100 | 0 101 | uuid 102 | 0 103 | 104 | 105 | isViewVisible 106 | 107 | location 108 | 309.000000:615.000000 109 | nibPath 110 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 111 | 112 | isViewVisible 113 | 114 | 115 | 116 | connectors 117 | 118 | workflowMetaData 119 | 120 | serviceApplicationBundleID 121 | com.cocoatech.PathFinder 122 | serviceApplicationPath 123 | /Applications/Path Finder.app 124 | serviceInputTypeIdentifier 125 | com.apple.Automator.fileSystemObject.folder 126 | serviceOutputTypeIdentifier 127 | com.apple.Automator.nothing 128 | serviceProcessesInput 129 | 0 130 | workflowTypeIdentifier 131 | com.apple.Automator.servicesMenu 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /Scripts/Automator/gitinfo/post-checkout: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2014 Brent Longborough 3 | # Part of gitinfo2 package Version 2 4 | # Please read gitinfo2.pdf for licencing and other details 5 | # ----------------------------------------------------- 6 | # Post-{commit,checkout,merge} hook for the gitinfo2 package 7 | # 8 | # Get the first tag found in the history from the current HEAD 9 | FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null) 10 | # Get the first tag in history that looks like a Release 11 | RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null) 12 | # Hoover up the metadata 13 | git --no-pager log -1 --date=short --decorate=short \ 14 | --pretty=format:"\usepackage[% 15 | shash={%h}, 16 | lhash={%H}, 17 | authname={%an}, 18 | authemail={%ae}, 19 | authsdate={%ad}, 20 | authidate={%ai}, 21 | authudate={%at}, 22 | commname={%an}, 23 | commemail={%ae}, 24 | commsdate={%ad}, 25 | commidate={%ai}, 26 | commudate={%at}, 27 | refnames={%d}, 28 | firsttagdescribe={$FIRSTTAG}, 29 | reltag={$RELTAG} 30 | ]{gitexinfo}" HEAD > .git/gitHeadInfo.gin 31 | -------------------------------------------------------------------------------- /Scripts/Automator/gitinfo/post-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2014 Brent Longborough 3 | # Part of gitinfo2 package Version 2 4 | # Please read gitinfo2.pdf for licencing and other details 5 | # ----------------------------------------------------- 6 | # Post-{commit,checkout,merge} hook for the gitinfo2 package 7 | # 8 | # Get the first tag found in the history from the current HEAD 9 | FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null) 10 | # Get the first tag in history that looks like a Release 11 | RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null) 12 | # Hoover up the metadata 13 | git --no-pager log -1 --date=short --decorate=short \ 14 | --pretty=format:"\usepackage[% 15 | shash={%h}, 16 | lhash={%H}, 17 | authname={%an}, 18 | authemail={%ae}, 19 | authsdate={%ad}, 20 | authidate={%ai}, 21 | authudate={%at}, 22 | commname={%an}, 23 | commemail={%ae}, 24 | commsdate={%ad}, 25 | commidate={%ai}, 26 | commudate={%at}, 27 | refnames={%d}, 28 | firsttagdescribe={$FIRSTTAG}, 29 | reltag={$RELTAG} 30 | ]{gitexinfo}" HEAD > .git/gitHeadInfo.gin 31 | -------------------------------------------------------------------------------- /Scripts/Automator/gitinfo/post-merge: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2014 Brent Longborough 3 | # Part of gitinfo2 package Version 2 4 | # Please read gitinfo2.pdf for licencing and other details 5 | # ----------------------------------------------------- 6 | # Post-{commit,checkout,merge} hook for the gitinfo2 package 7 | # 8 | # Get the first tag found in the history from the current HEAD 9 | FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null) 10 | # Get the first tag in history that looks like a Release 11 | RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null) 12 | # Hoover up the metadata 13 | git --no-pager log -1 --date=short --decorate=short \ 14 | --pretty=format:"\usepackage[% 15 | shash={%h}, 16 | lhash={%H}, 17 | authname={%an}, 18 | authemail={%ae}, 19 | authsdate={%ad}, 20 | authidate={%ai}, 21 | authudate={%at}, 22 | commname={%an}, 23 | commemail={%ae}, 24 | commsdate={%ad}, 25 | commidate={%ai}, 26 | commudate={%at}, 27 | refnames={%d}, 28 | firsttagdescribe={$FIRSTTAG}, 29 | reltag={$RELTAG} 30 | ]{gitexinfo}" HEAD > .git/gitHeadInfo.gin 31 | -------------------------------------------------------------------------------- /Scripts/Automator/nvALT2DTPO-Personal.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Automator/nvALT2DTPO-Personal.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Scripts/Automator/nvALT2DTPO-Personal.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 381 7 | AMApplicationVersion 8 | 2.4 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.cocoa.path 25 | 26 | 27 | AMActionVersion 28 | 2.1.1 29 | AMApplication 30 | 31 | Finder 32 | 33 | AMParameterProperties 34 | 35 | AMProvides 36 | 37 | Container 38 | List 39 | Types 40 | 41 | com.apple.cocoa.path 42 | 43 | 44 | AMRequiredResources 45 | 46 | ActionBundlePath 47 | /System/Library/Automator/Get Selected Finder Items 2.action 48 | ActionName 49 | Get Selected Finder Items 50 | ActionParameters 51 | 52 | BundleIdentifier 53 | com.apple.Automator.Get_Selected_Finder_Items_2 54 | CFBundleVersion 55 | 2.1.1 56 | CanShowSelectedItemsWhenRun 57 | 58 | CanShowWhenRun 59 | 60 | Category 61 | 62 | AMCategoryFilesAndFolders 63 | 64 | Class Name 65 | AMGetSelectedFinderItemsAction 66 | InputUUID 67 | AB800C16-BEE3-4669-835F-C1F2060D127D 68 | Keywords 69 | 70 | OutputUUID 71 | 769E009F-31D5-47AC-9485-91DACE93E45F 72 | UUID 73 | C5491D9E-0C52-4654-85BB-7DF9C584213A 74 | UnlocalizedApplications 75 | 76 | Finder 77 | 78 | arguments 79 | 80 | 81 | 82 | 83 | action 84 | 85 | AMAccepts 86 | 87 | Container 88 | List 89 | Optional 90 | 91 | Types 92 | 93 | * 94 | 95 | 96 | AMActionVersion 97 | 2.7.2 98 | AMApplication 99 | 100 | DEVONthink Pro Office 101 | 102 | AMParameterProperties 103 | 104 | databaseUUID 105 | 106 | groupPath 107 | 108 | tokenizedValue 109 | 110 | 111 | selectedGroupName 112 | 113 | selectedGroupUUID 114 | 115 | 116 | AMProvides 117 | 118 | Container 119 | List 120 | Types 121 | 122 | * 123 | 124 | 125 | AMRequiredResources 126 | 127 | 128 | Display Name 129 | DEVONthink Pro 130 | Resource 131 | com.devon-technologies.thinkpro2 132 | Type 133 | application 134 | Version 135 | 2.3.4 136 | 137 | 138 | ActionBundlePath 139 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Set Current Group.action 140 | ActionName 141 | Set Current Group 142 | ActionParameters 143 | 144 | databaseUUID 145 | 9B7F8D2D-B8E1-47AE-86B9-F78CF9F4052A 146 | selectedGroupName 147 | Notes 148 | selectedGroupUUID 149 | 146F6ACF-C943-429F-A248-7E19E29F5531 150 | 151 | BundleIdentifier 152 | com.devon-technologies.thinkpro2.otto.SetCurrentGroup 153 | CFBundleVersion 154 | 2.7.2 155 | CanShowSelectedItemsWhenRun 156 | 157 | CanShowWhenRun 158 | 159 | Category 160 | 161 | AMCategoryDocuments 162 | 163 | Class Name 164 | DTPSetCurrentGroup 165 | InputUUID 166 | DD97089A-6061-4C79-97D9-9C55CD603D7E 167 | Keywords 168 | 169 | DEVONthink 170 | Database 171 | Group 172 | Current 173 | Record 174 | 175 | OutputUUID 176 | BDAEB44A-2FF0-4253-BC16-73758AD844A2 177 | UUID 178 | 9EDFC493-24D6-4815-AB04-2084E4C326DD 179 | UnlocalizedApplications 180 | 181 | DEVONthink Pro 182 | 183 | arguments 184 | 185 | isViewVisible 186 | 187 | location 188 | 374.500000:443.000000 189 | nibPath 190 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Set Current Group.action/Contents/Resources/English.lproj/main.nib 191 | 192 | isViewVisible 193 | 194 | 195 | 196 | action 197 | 198 | AMAccepts 199 | 200 | Container 201 | List 202 | Optional 203 | 204 | Types 205 | 206 | com.apple.applescript.alias-object 207 | 208 | 209 | AMActionVersion 210 | 2.0 211 | AMApplication 212 | 213 | DEVONthink Pro Office 214 | 215 | AMParameterProperties 216 | 217 | addItemsOption 218 | 219 | 220 | AMProvides 221 | 222 | Container 223 | List 224 | Types 225 | 226 | com.devon-technologies.thinkpro2.record-object 227 | 228 | 229 | AMRequiredResources 230 | 231 | 232 | Display Name 233 | DEVONthink Pro 234 | Resource 235 | com.devon-technologies.thinkpro2 236 | Type 237 | application 238 | Version 239 | 2.0 240 | 241 | 242 | ActionBundlePath 243 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Add Items to Current Group.action 244 | ActionName 245 | Add Items to Current Group 246 | ActionParameters 247 | 248 | addItemsOption 249 | 0 250 | 251 | BundleIdentifier 252 | com.devon-technologies.thinkpro2.otto.AddItemsToCurrentGroup 253 | CFBundleVersion 254 | 2.0 255 | CanShowSelectedItemsWhenRun 256 | 257 | CanShowWhenRun 258 | 259 | Category 260 | 261 | AMCategoryFilesAndFolders 262 | 263 | Class Name 264 | AMAppleScriptAction 265 | InputUUID 266 | BA4C864C-3CC9-4089-A435-DB269F5B9BA8 267 | Keywords 268 | 269 | DEVONthink 270 | Database 271 | Item 272 | Folder 273 | File 274 | Selection 275 | Get 276 | Add 277 | Record 278 | 279 | OutputUUID 280 | 2A100984-F8CD-4538-8123-6B024EF9117F 281 | UUID 282 | 9972C1BD-FF62-492F-8BAA-892F718AF969 283 | UnlocalizedApplications 284 | 285 | DEVONthink Pro 286 | 287 | arguments 288 | 289 | 0 290 | 291 | default value 292 | 0 293 | name 294 | addItemsOption 295 | required 296 | 0 297 | type 298 | 0 299 | uuid 300 | 0 301 | 302 | 303 | isViewVisible 304 | 305 | location 306 | 374.500000:206.000000 307 | nibPath 308 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Add Items to Current Group.action/Contents/Resources/English.lproj/main.nib 309 | 310 | isViewVisible 311 | 312 | 313 | 314 | connectors 315 | 316 | 99E11559-C67C-46D5-A434-C43C3A515788 317 | 318 | from 319 | C5491D9E-0C52-4654-85BB-7DF9C584213A - C5491D9E-0C52-4654-85BB-7DF9C584213A 320 | to 321 | 9EDFC493-24D6-4815-AB04-2084E4C326DD - 9EDFC493-24D6-4815-AB04-2084E4C326DD 322 | 323 | DA7DF953-BEF2-41FF-9700-A0D21CB65DC6 324 | 325 | from 326 | 9EDFC493-24D6-4815-AB04-2084E4C326DD - 9EDFC493-24D6-4815-AB04-2084E4C326DD 327 | to 328 | 9972C1BD-FF62-492F-8BAA-892F718AF969 - 9972C1BD-FF62-492F-8BAA-892F718AF969 329 | 330 | 331 | workflowMetaData 332 | 333 | workflowTypeIdentifier 334 | com.apple.Automator.workflow 335 | 336 | 337 | 338 | -------------------------------------------------------------------------------- /Scripts/Automator/nvALT2DTPO.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Automator/nvALT2DTPO.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Scripts/Automator/nvALT2DTPO.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 381 7 | AMApplicationVersion 8 | 2.4 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.cocoa.path 25 | 26 | 27 | AMActionVersion 28 | 2.1.1 29 | AMApplication 30 | 31 | Finder 32 | 33 | AMParameterProperties 34 | 35 | AMProvides 36 | 37 | Container 38 | List 39 | Types 40 | 41 | com.apple.cocoa.path 42 | 43 | 44 | AMRequiredResources 45 | 46 | ActionBundlePath 47 | /System/Library/Automator/Get Selected Finder Items 2.action 48 | ActionName 49 | Get Selected Finder Items 50 | ActionParameters 51 | 52 | BundleIdentifier 53 | com.apple.Automator.Get_Selected_Finder_Items_2 54 | CFBundleVersion 55 | 2.1.1 56 | CanShowSelectedItemsWhenRun 57 | 58 | CanShowWhenRun 59 | 60 | Category 61 | 62 | AMCategoryFilesAndFolders 63 | 64 | Class Name 65 | AMGetSelectedFinderItemsAction 66 | InputUUID 67 | AB800C16-BEE3-4669-835F-C1F2060D127D 68 | Keywords 69 | 70 | OutputUUID 71 | 769E009F-31D5-47AC-9485-91DACE93E45F 72 | UUID 73 | C5491D9E-0C52-4654-85BB-7DF9C584213A 74 | UnlocalizedApplications 75 | 76 | Finder 77 | 78 | arguments 79 | 80 | 81 | 82 | 83 | action 84 | 85 | AMAccepts 86 | 87 | Container 88 | List 89 | Optional 90 | 91 | Types 92 | 93 | * 94 | 95 | 96 | AMActionVersion 97 | 2.7.2 98 | AMApplication 99 | 100 | DEVONthink Pro Office 101 | 102 | AMParameterProperties 103 | 104 | databaseUUID 105 | 106 | groupPath 107 | 108 | tokenizedValue 109 | 110 | 111 | selectedGroupName 112 | 113 | selectedGroupUUID 114 | 115 | 116 | AMProvides 117 | 118 | Container 119 | List 120 | Types 121 | 122 | * 123 | 124 | 125 | AMRequiredResources 126 | 127 | 128 | Display Name 129 | DEVONthink Pro 130 | Resource 131 | com.devon-technologies.thinkpro2 132 | Type 133 | application 134 | Version 135 | 2.3.4 136 | 137 | 138 | ActionBundlePath 139 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Set Current Group.action 140 | ActionName 141 | Set Current Group 142 | ActionParameters 143 | 144 | databaseUUID 145 | 07D1983D-EE11-42DB-A328-D8D299D6CA02 146 | selectedGroupName 147 | Notes 148 | selectedGroupUUID 149 | 950ADE9A-E003-4F2D-B531-FCBB0217E8D9 150 | 151 | BundleIdentifier 152 | com.devon-technologies.thinkpro2.otto.SetCurrentGroup 153 | CFBundleVersion 154 | 2.7.2 155 | CanShowSelectedItemsWhenRun 156 | 157 | CanShowWhenRun 158 | 159 | Category 160 | 161 | AMCategoryDocuments 162 | 163 | Class Name 164 | DTPSetCurrentGroup 165 | InputUUID 166 | DD97089A-6061-4C79-97D9-9C55CD603D7E 167 | Keywords 168 | 169 | DEVONthink 170 | Database 171 | Group 172 | Current 173 | Record 174 | 175 | OutputUUID 176 | BDAEB44A-2FF0-4253-BC16-73758AD844A2 177 | UUID 178 | 9EDFC493-24D6-4815-AB04-2084E4C326DD 179 | UnlocalizedApplications 180 | 181 | DEVONthink Pro 182 | 183 | arguments 184 | 185 | isViewVisible 186 | 187 | location 188 | 374.500000:497.000000 189 | nibPath 190 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Set Current Group.action/Contents/Resources/English.lproj/main.nib 191 | 192 | isViewVisible 193 | 194 | 195 | 196 | action 197 | 198 | AMAccepts 199 | 200 | Container 201 | List 202 | Optional 203 | 204 | Types 205 | 206 | com.apple.applescript.alias-object 207 | 208 | 209 | AMActionVersion 210 | 2.0 211 | AMApplication 212 | 213 | DEVONthink Pro Office 214 | 215 | AMParameterProperties 216 | 217 | addItemsOption 218 | 219 | 220 | AMProvides 221 | 222 | Container 223 | List 224 | Types 225 | 226 | com.devon-technologies.thinkpro2.record-object 227 | 228 | 229 | AMRequiredResources 230 | 231 | 232 | Display Name 233 | DEVONthink Pro 234 | Resource 235 | com.devon-technologies.thinkpro2 236 | Type 237 | application 238 | Version 239 | 2.0 240 | 241 | 242 | ActionBundlePath 243 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Add Items to Current Group.action 244 | ActionName 245 | Add Items to Current Group 246 | ActionParameters 247 | 248 | addItemsOption 249 | 1 250 | 251 | BundleIdentifier 252 | com.devon-technologies.thinkpro2.otto.AddItemsToCurrentGroup 253 | CFBundleVersion 254 | 2.0 255 | CanShowSelectedItemsWhenRun 256 | 257 | CanShowWhenRun 258 | 259 | Category 260 | 261 | AMCategoryFilesAndFolders 262 | 263 | Class Name 264 | AMAppleScriptAction 265 | InputUUID 266 | BA4C864C-3CC9-4089-A435-DB269F5B9BA8 267 | Keywords 268 | 269 | DEVONthink 270 | Database 271 | Item 272 | Folder 273 | File 274 | Selection 275 | Get 276 | Add 277 | Record 278 | 279 | OutputUUID 280 | 2A100984-F8CD-4538-8123-6B024EF9117F 281 | UUID 282 | 9972C1BD-FF62-492F-8BAA-892F718AF969 283 | UnlocalizedApplications 284 | 285 | DEVONthink Pro 286 | 287 | arguments 288 | 289 | 0 290 | 291 | default value 292 | 0 293 | name 294 | addItemsOption 295 | required 296 | 0 297 | type 298 | 0 299 | uuid 300 | 0 301 | 302 | 303 | isViewVisible 304 | 305 | location 306 | 374.500000:260.000000 307 | nibPath 308 | /Applications/DEVONthink Pro.app/Contents/Library/Automator/Add Items to Current Group.action/Contents/Resources/English.lproj/main.nib 309 | 310 | isViewVisible 311 | 312 | 313 | 314 | connectors 315 | 316 | 5277C47F-AAF1-4816-820D-42291A36C7B8 317 | 318 | from 319 | C5491D9E-0C52-4654-85BB-7DF9C584213A - C5491D9E-0C52-4654-85BB-7DF9C584213A 320 | to 321 | 9EDFC493-24D6-4815-AB04-2084E4C326DD - 9EDFC493-24D6-4815-AB04-2084E4C326DD 322 | 323 | 5F18B9A8-D7F3-442A-876F-E85766FCB720 324 | 325 | from 326 | 9EDFC493-24D6-4815-AB04-2084E4C326DD - 9EDFC493-24D6-4815-AB04-2084E4C326DD 327 | to 328 | 9972C1BD-FF62-492F-8BAA-892F718AF969 - 9972C1BD-FF62-492F-8BAA-892F718AF969 329 | 330 | 331 | workflowMetaData 332 | 333 | workflowTypeIdentifier 334 | com.apple.Automator.workflow 335 | 336 | 337 | 338 | -------------------------------------------------------------------------------- /Scripts/Automator/vc.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | vc 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | NSRequiredContext 16 | 17 | NSApplicationIdentifier 18 | com.cocoatech.PathFinder 19 | 20 | NSSendFileTypes 21 | 22 | public.folder 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Scripts/Automator/vc.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Automator/vc.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Scripts/Automator/vc.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 444.7 7 | AMApplicationVersion 8 | 2.8 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | -- Derived from http://bigdogmoe.com/blog/applescript-initialize-new-git-repository-finder -- Altered according to my need -- Copy to $HOME/Library/Services on run {input, parameters} ------------------------------------------------------------------------------------------------ set the_path to (the POSIX path of input) set AppleScript's text item delimiters to "/" if the_path does not end with "/" then set parenPath to the_path & "/" copy parenPath to the_path end if -- the variable the_path now contains the current working directory with trailing slash set the clipboard to the_path as text set fileTarget to the_path & ".git" as text ------------------------------------------------------------------------------------------------ set vcPath to "/Volumes/Dropbox/Dropbox/gitRepos/SourcesOnGithub/workflow/Scripts/Automator/vc/" --------------------------------- CHANGE THIS LINE ------------------------------------------------------------------------------------------------ if FileExists(fileTarget) then --------------------------- There's a git repo. Do nothing. Display notifications. display notification "There is already Git repository here. The path has been copied to the clipboard" with title "vc" else --------------------------- There's no git repo. So create one and copy files into it. Display notifications. set cmd to "cd " & quoted form of the_path & " && git init" & " && touch README.md" & " && git add --all" & " && git commit -am 'Initial Commit'" do shell script cmd set cmd to "cp " & vcPath & "vc " & quoted form of the_path do shell script cmd set cmd to "cp " & vcPath & "vc-git.awk " & quoted form of the_path do shell script cmd display notification "A Git repository and a README file have been created, vc files have been copied, and an initial commit has been made." with title "vc" end if end run on FileExists(theFile) -- (String) as Boolean tell application "System Events" if exists folder theFile then return true else return false end if end tell end FileExists 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | 00F94EA4-94E6-4AF0-8C05-2ABC884A6FF5 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | EDA5041B-1161-416D-89E0-0CE15124AAF6 78 | UUID 79 | 282E9F50-BCC2-417D-B788-3A567A3F7C61 80 | UnlocalizedApplications 81 | 82 | Automator 83 | 84 | arguments 85 | 86 | 0 87 | 88 | default value 89 | on run {input, parameters} 90 | 91 | (* Your script goes here *) 92 | 93 | return input 94 | end run 95 | name 96 | source 97 | required 98 | 0 99 | type 100 | 0 101 | uuid 102 | 0 103 | 104 | 105 | isViewVisible 106 | 107 | location 108 | 769.000000:771.000000 109 | nibPath 110 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 111 | 112 | isViewVisible 113 | 114 | 115 | 116 | connectors 117 | 118 | workflowMetaData 119 | 120 | serviceApplicationBundleID 121 | com.cocoatech.PathFinder 122 | serviceApplicationPath 123 | /Applications/Path Finder.app 124 | serviceInputTypeIdentifier 125 | com.apple.Automator.fileSystemObject.folder 126 | serviceOutputTypeIdentifier 127 | com.apple.Automator.nothing 128 | serviceProcessesInput 129 | 0 130 | workflowTypeIdentifier 131 | com.apple.Automator.servicesMenu 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /Scripts/Automator/vc/vc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is file 'vc' from the vc bundle for TeX. 3 | # The original file can be found at CTAN:support/vc. 4 | # This file is Public Domain. 5 | 6 | # Parse command line options. 7 | full=0 8 | mod=0 9 | while [ -n "$(echo $1 | grep '-')" ]; do 10 | case $1 in 11 | -f ) full=1 ;; 12 | -m ) mod=1 ;; 13 | * ) echo 'usage: vc [-f] [-m]' 14 | exit 1 15 | esac 16 | shift 17 | done 18 | # English locale. 19 | LC_ALL=C 20 | git --no-pager log -1 HEAD --pretty=format:"Hash: %H%nAbr. Hash: %h%nParent Hashes: %P%nAbr. Parent Hashes: %p%nAuthor Name: %an%nAuthor Email: %ae%nAuthor Date: %ai%nCommitter Name: %cn%nCommitter Email: %ce%nCommitter Date: %ci%n" |gawk -v script=log -v full=$full -f vc-git.awk > vc.tex 21 | if [ "$mod" = 1 ] 22 | then 23 | git status |gawk -v script=status -f vc-git.awk >> vc.tex 24 | fi 25 | -------------------------------------------------------------------------------- /Scripts/Automator/vc/vc-git.awk: -------------------------------------------------------------------------------- 1 | # This is file 'vc-git.awk' from the vc bundle for TeX. 2 | # The original file can be found at CTAN:support/vc. 3 | # This file is Public Domain. 4 | BEGIN { 5 | 6 | ### Process output of "git status". 7 | if (script=="status") { 8 | modified = 0 9 | } 10 | 11 | } 12 | 13 | 14 | 15 | ### Process output of "git log". 16 | script=="log" && /^Hash:/ { Hash = substr($0, 2+match($0, ":")) } 17 | script=="log" && /^Abr. Hash:/ { AbrHash = substr($0, 2+match($0, ":")) } 18 | script=="log" && /^Parent Hashes:/ { ParentHashes = substr($0, 2+match($0, ":")) } 19 | script=="log" && /^Abr. Parent Hashes:/ { AbrParentHashes = substr($0, 2+match($0, ":")) } 20 | script=="log" && /^Author Name:/ { AuthorName = substr($0, 2+match($0, ":")) } 21 | script=="log" && /^Author Email:/ { AuthorEmail = substr($0, 2+match($0, ":")) } 22 | script=="log" && /^Author Date:/ { AuthorDate = substr($0, 2+match($0, ":")) } 23 | script=="log" && /^Committer Name:/ { CommitterName = substr($0, 2+match($0, ":")) } 24 | script=="log" && /^Committer Email:/ { CommitterEmail = substr($0, 2+match($0, ":")) } 25 | script=="log" && /^Committer Date:/ { CommitterDate = substr($0, 2+match($0, ":")) } 26 | 27 | ### Process output of "git status". 28 | ### Changed index? 29 | script=="status" && /^# Changes to be committed:/ { modified = 1 } 30 | ### Unstaged modifications? 31 | script=="status" && /^# Changed but not updated:/ { modified = 2 } 32 | 33 | 34 | 35 | END { 36 | 37 | ### Process output of "git log". 38 | if (script=="log") { 39 | ### Standard encoding is UTF-8. 40 | if (Encoding == "") Encoding = "UTF-8" 41 | ### Extract relevant information from variables. 42 | LongDate = substr(AuthorDate, 1, 25) 43 | DateRAW = substr(LongDate, 1, 10) 44 | DateISO = DateRAW 45 | DateTEX = DateISO 46 | gsub("-", "/", DateTEX) 47 | Time = substr(LongDate, 12, 14) 48 | ### Write file identification to vc.tex. 49 | print "%%% This file has been generated by the vc bundle for TeX." 50 | print "%%% Do not edit this file!" 51 | print "%%%" 52 | ### Write Git specific macros. 53 | print "%%% Define Git specific macros." 54 | print "\\gdef\\GITHash{" Hash "}%" 55 | print "\\gdef\\GITAbrHash{" AbrHash "}%" 56 | print "\\gdef\\GITParentHashes{" ParentHashes "}%" 57 | print "\\gdef\\GITAbrParentHashes{" AbrParentHashes "}%" 58 | print "\\gdef\\GITAuthorName{" AuthorName "}%" 59 | print "\\gdef\\GITAuthorEmail{" AuthorEmail "}%" 60 | print "\\gdef\\GITAuthorDate{" AuthorDate "}%" 61 | print "\\gdef\\GITCommitterName{" CommitterName "}%" 62 | print "\\gdef\\GITCommitterEmail{" CommitterEmail "}%" 63 | print "\\gdef\\GITCommitterDate{" CommitterDate "}%" 64 | ### Write generic version control macros. 65 | print "%%% Define generic version control macros." 66 | print "\\gdef\\VCRevision{\\GITAbrHash}%" 67 | print "\\gdef\\VCAuthor{\\GITAuthorName}%" 68 | print "\\gdef\\VCDateRAW{" DateRAW "}%" 69 | print "\\gdef\\VCDateISO{" DateISO "}%" 70 | print "\\gdef\\VCDateTEX{" DateTEX "}%" 71 | print "\\gdef\\VCTime{" Time "}%" 72 | print "\\gdef\\VCModifiedText{\\textcolor{red}{with local modifications!}}%" 73 | print "%%% Assume clean working copy." 74 | print "\\gdef\\VCModified{0}%" 75 | print "\\gdef\\VCRevisionMod{\\VCRevision}%" 76 | } 77 | 78 | ### Process output of "git status". 79 | if (script=="status") { 80 | print "%%% Is working copy modified?" 81 | print "\\gdef\\VCModified{" modified "}%" 82 | if (modified==0) { 83 | print "\\gdef\\VCRevisionMod{\\VCRevision}%" 84 | } else { 85 | print "\\gdef\\VCRevisionMod{\\VCRevision~\\VCModifiedText}%" 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Scripts/Bibdesk/Bibdesk Download.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Bibdesk/Bibdesk Download.scpt -------------------------------------------------------------------------------- /Scripts/Bibdesk/Capitalize.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Bibdesk/Capitalize.scpt -------------------------------------------------------------------------------- /Scripts/Bibdesk/Error Reporting.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Bibdesk/Error Reporting.scpt -------------------------------------------------------------------------------- /Scripts/Bibdesk/README.md: -------------------------------------------------------------------------------- 1 | **bibfetch.pl.scpt** is from [mankoff/BibDeskAppleScripts](https://github.com/mankoff/BibDeskAppleScripts). -------------------------------------------------------------------------------- /Scripts/Bibdesk/Toggle Journal Abbreviation.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Bibdesk/Toggle Journal Abbreviation.scpt -------------------------------------------------------------------------------- /Scripts/Bibdesk/bibfetch.pl.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/Bibdesk/bibfetch.pl.scpt -------------------------------------------------------------------------------- /Scripts/ControlPlaneScripts/viscosity_connect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | osascript -e 'tell application "Viscosity" to connect "Dedicated"' 3 | 4 | osascript <<'END' 5 | tell application "Scroll Reverser" 6 | set enabled to false 7 | end tell 8 | END -------------------------------------------------------------------------------- /Scripts/ControlPlaneScripts/viscosity_disconnect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | osascript -e 'tell application "Viscosity" to disconnectall' 3 | 4 | osascript <<'END' 5 | tell application "Scroll Reverser" 6 | set enabled to true 7 | end tell 8 | END -------------------------------------------------------------------------------- /Scripts/DT/AddKeywordsToPdfMetadata___Ctrl-Alt-9.scptd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/AddKeywordsToPdfMetadata___Ctrl-Alt-9.scptd -------------------------------------------------------------------------------- /Scripts/DT/AddPathToPdfMetadata___Ctrl-Alt-0.scptd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/AddPathToPdfMetadata___Ctrl-Alt-0.scptd -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleAllowMixedLocalizations 6 | 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleIdentifier 10 | com.example.annotation 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Annotation 15 | LSRequiresCarbon 16 | 17 | WindowState 18 | 19 | dividerCollapsed 20 | 21 | eventLogLevel 22 | 1 23 | name 24 | ScriptWindowState 25 | positionOfDivider 26 | 471.5 27 | savedFrame 28 | 174 -24 1255 998 0 0 1920 1058 29 | selectedTabView 30 | event log 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 13D65 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | Pashua 11 | CFBundleIconFile 12 | AppIcon 13 | CFBundleIdentifier 14 | net.bluem.pashua 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | Pash 21 | CFBundleVersion 22 | 0.9.5.1 23 | DTCompiler 24 | com.apple.compilers.llvm.clang.1_0 25 | DTPlatformBuild 26 | 5A3005 27 | DTPlatformVersion 28 | GM 29 | DTSDKBuild 30 | 10M2423 31 | DTSDKName 32 | macosx10.6 33 | DTXcode 34 | 0502 35 | DTXcodeBuild 36 | 5A3005 37 | LSUIElement 38 | 39 | NSMainNibFile 40 | MainMenu 41 | NSPrincipalClass 42 | NSApplication 43 | 44 | 45 | -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/MacOS/Pashua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/MacOS/Pashua -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPLPash -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/AppIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/AppIcon.icns -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/AppIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/AppIcon.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/AppIcon@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/AppIcon@2.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/English.lproj/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/English.lproj/MainMenu.nib -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/English.lproj/Read me.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Pashua 0.9.5.1 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | Carsten Blüm Mac Development 15 |
16 | 17 |

Pashua 0.9.5.1

18 | 19 |

What is Pashua?

20 |

Pashua ist a tool for creating ‘real’ dialog windows for Perl, PHP, Tcl, Python, Groovy, Ruby, Rexx and shell scripts as well as AppleScript. The GUI elements which can be used for such dialogs include text input fields, checkboxes, radiobuttons, popup menus, buttons and so on. Moreover, it is also possible to embed images or PDFs.
21 | Any data submitted from the dialog will be passed on to the calling script, which can (of course) use it for anything.
22 | To describe the dialog window, Pashua uses a very simple syntax. All the tedious details such as positioning the elements, calculating the window size etc. are handled automatically by Pashua, thus you can fully concentrate on your application.

23 | 24 |

Price

25 |

Pashua is free. However, if you appreciate it and would like to send a “Thank you”, there are a number of ways to do that.

26 | 27 |

How to use

28 |

In the folder “Examples” on the disk image containing this Readme, there are several scripts which demonstrate how to use Pashua:

29 | 40 | 41 |

The AppleScript example can be launched by simply doubleclicking the icon. All the other examples can be launched by entering the script path at the terminal (the easiest way to do this, is to drag the script onto Terminal.app).
42 | Important: In order to work, Pashua (the application itself, not the calling script) must be located in the global application folder /Applications, in your personal application folder ~/Applications, in the folder containing the calling script or in the working directory. Otherwise execution will fail. But of course you can modify the search locations according to your filesystem layout. (But to simply launch the examples, you do not have to install anything: they will run directly from the disk image.)

43 | 44 |

Can you tell me more about the configuration syntax?

45 |

Pashua’s 46 | 56 | explains the configuration syntax, as well as any GUI element types and their attributes.

57 | 58 |

What about additional programming languages?

59 |

Basically you can use Pashua from any language that is able to write a file or write to a Unix pipe, call an application with command line arguments, manipulate strings and declare variables dynamically or handle associative arrays.

60 | 61 |

What is new in version 0.9.5.1?

62 | 67 |

Pashua 0.9.5.1 was released on 06/20/2014.
68 | Release notes for previous versions can be found on the website

69 | 70 |

Credits

71 |

The following users contributed code, fixes and/or translations: Bruce M. Axtens, Hans Haesler, Mike Hall, Ed Heil, Canis Lupus, James Reese, Daniel Robillard, Eddy Roosnek, Tor Sigurdsson, Bruce Woller.

72 | 73 |

Disclaimer

74 |

This application is provided as-is. Support is not included. Use this software at your own risk. If for some obscure reason any damage or data loss may arise from using it (which in my opinion is nearly impossible), it is nobody else’s problem than yours.

75 | 76 | 77 |

Contact / Feedback

78 |

Carsten Blüm
79 | E-Mail: macapps@bluem.net
80 | Pashua Homepage: www.bluem.net/en/mac/pashua/

81 | 82 |
83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/English.lproj/dict.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/English.lproj/dict.strings -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/French.lproj/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/French.lproj/MainMenu.nib -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/French.lproj/dict.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/French.lproj/dict.strings -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/German.lproj/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/German.lproj/MainMenu.nib -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/German.lproj/Read me.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Pashua 0.9.5.1 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | Carsten Blüm Mac Development 15 |
16 | 17 |

Pashua 0.9.5.1

18 | 19 |

Was ist Pashua?

20 |

Pashua ist ein Utility zur Erzeugung von ›echten‹ Dialogfenstern für Perl-, PHP-, Tcl-, Python-, Groovy-, Shell-, Ruby- sowie Rexx-Skripte und AppleScripts unter Mac OS X. Hierfür stehen eine Reihe von GUI-Elementen zur Verfügung: Texteingabefelder, Check­boxes, Aufklapp­menüs, Combo Boxes, Buttons und so weiter; außerdem können auch Bilder und PDFs eingebettet werden.
21 | Die vom Benutzer einge­ge­benen Daten werden von Pashua an das aufrufende Skript zurückgeben, welches dann mit diesen arbeiten kann.
22 | Pashua bedient sich dabei einer äußerst einfachen Syntax für die Beschrei­bung des Dialoges; alle Fleiß­arbeiten wie das Posi­tio­nieren der Elemente, die Berechnung der Fenstergröße etc. werden vollautomatisch übernommen.

23 | 24 |

Was kostet Pashua?

25 |

Pashua ist kostenlos. Aber wenn das Programm für Sie nützlich ist und Sie ein »Danke« senden möchten, gibt es dafür eine Reihe von Möglichkeiten.

26 | 27 |

Wie benutzt man Pashua?

28 |

Im Ordner »Examples« auf dem Disk Image, welches dieses Readme enthält, befinden sich einige Dateien, welche die Anwendung exemplarisch zeigen:

29 | 40 | 41 |

Das AppleScript-Beispiel wurde als Applikation gesichert und kann daher einfach durch Doppelklicken gestartet werden. Alle anderen Beispiele kann man einfach ausprobieren, indem den Pfad des Skripts im Ter­mi­nal eingibt (am einfachsten geht das, indem man das Icon des gewünschten Skripts auf das Fenster des Ter­mi­nal-Programmes zieht) und dann Return drückt.
42 | Wichtig: Es wird erwartet, dass Pashua (also das Programm, nicht das aufrufende Skript) entweder im all­ge­mei­nen Programm-Ordner /Applications, im persönlichen Programm-Ordner ~/Applications, im gleichen Ordner wie das aufrufende Skript oder im aktuellen Arbeits­verzeichnis liegt. Andernfalls wird die Ausführung mit einer Feh­ler­meldung abgebrochen. Natürlich lässt sich das aber anpassen, wenn ein anderes Verhalten benötigt wird. (Um Pashua einfach auszuprobieren, muss man aber nichts installieren, denn die Beispiele laufen alle direkt vom Disk Image aus.)

43 | 44 |

Wie ist die genaue Syntax der Konfiguration?

45 |

Sämtliche GUI-Elementtypen und deren Attribute werden in der (englischen) 46 | 56 | erklärt.

57 | 58 |

Wie steht es mit weiteren Programmiersprachen?

59 |

Prinzipiell kann man Pashua aus jeder Sprache heraus nutzen, die in eine Datei oder in eine Unix-Pipe schrei­ben, ein externes Pro­gramm via Shell mit Argu­menten aufrufen, Strings bear­beiten und entweder Variablen dy­namisch deklarieren oder mit asso­zia­tiven Arrays umgehen kann.

60 | 61 |

Was ist neu in Version 0.9.5.1?

62 | 67 | 68 |

Pashua 0.9.5.1 wurde am 20.06.2014 veröffentlicht.
69 | Informationen für ältere Versionen finden Sie auf der Website

70 | 71 |

Credits

72 |

Folgende Benutzer haben Code, Korrekturen und/oder Übersetzungen beigesteuert: Bruce M. Axtens, Hans Haesler, Mike Hall, Ed Heil, Canis Lupus, James Reese, Daniel Robillard, Eddy Roosnek, Tor Sigurdsson, Bruce Woller.

73 | 74 |

Das Kleingedruckte

75 |

Dieses Programm wird ohne jegliche Gewährleistung, Garantie, Support etc. zur Verfügung gestellt. Die Benut­zung erfolgt auf eigenes Risiko, und sollte der unwahrscheinliche Fall auftreten, dass durch die Nutzung ein wie auch immer gearteter Schaden auftritt, kann niemand außer der das Programm benutzenden Person dafür haft­bar gemacht werden.

76 | 77 | 78 |

Kontakt / Feedback

79 |

Carsten Blüm
80 | E-Mail: macapps@bluem.net
81 | Pashua Homepage: www.bluem.net/de/mac/pashua/

82 | 83 |
84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/German.lproj/dict.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/German.lproj/dict.strings -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/bar.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/bar@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/bar@2.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/clear.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/clear@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/clear@2x.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/li.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/li.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/logo.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/logo@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/logo@2.png -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/MacOS/Pashua.app/Contents/Resources/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | color: #000; 3 | font-family: Helvetica, Arial, sans-serif; 4 | font-size: 13px; 5 | line-height: 18px; 6 | } 7 | 8 | body { 9 | background: #FFF; 10 | margin: 0; 11 | padding: 0; 12 | } 13 | 14 | a { 15 | text-decoration: none; 16 | border-width: 1px; 17 | border-style: none none solid none; 18 | border-color: #BFBEBE; 19 | } 20 | 21 | p a:hover, li a:hover { 22 | border-style: none none solid none; 23 | border-color: #7E7D7D; 24 | } 25 | 26 | p { 27 | margin: 0 0 0.8em 0; 28 | } 29 | 30 | h1, h2, h3 { 31 | text-transform: uppercase; 32 | margin: 1.75em 0 0.25em 0; 33 | font-size: 14px; 34 | color: #414040; 35 | } 36 | 37 | h1 { 38 | font-size: 20px; 39 | font-weight: normal; 40 | margin-top: 0; 41 | } 42 | 43 | h2, h3 { 44 | font-weight: normal; 45 | letter-spacing: 1px; 46 | } 47 | 48 | h3 { 49 | font-size: 12px; 50 | margin: 4px 0 2px 0; 51 | } 52 | 53 | h1:after { 54 | content: ""; 55 | display: block; 56 | width: 128px; 57 | height: 128px; 58 | float: right; 59 | margin: 0 0 2em 2em; 60 | background: url(AppIcon.png) no-repeat 0 0; 61 | } 62 | 63 | div.version, div.version ul { 64 | margin-left: 16px; 65 | } 66 | 67 | ul { 68 | margin: 0 0 8px 0; 69 | padding: 0; 70 | } 71 | 72 | li { 73 | list-style-type: none; 74 | padding: 0 48px 0 16px; 75 | margin: 0 0 3px 0; 76 | background: url(li.png) no-repeat 0 4px; 77 | background-size: 9px 4px; 78 | } 79 | 80 | pre, code { 81 | font-family: Monaco, Courier; 82 | color: #414040; 83 | font-size: 11px; 84 | } 85 | 86 | #frame { 87 | max-width: 680px; 88 | padding: 0; 89 | margin: 35px auto; 90 | } 91 | 92 | header { 93 | height: 34px; 94 | background: url(bar.png) repeat-x 0 bottom; 95 | margin-bottom: 38px; 96 | } 97 | 98 | header a { 99 | display: block; 100 | border-style: none; 101 | background: url(logo.png) no-repeat 0 0; 102 | width: 255px; 103 | height: 17px; 104 | } 105 | 106 | header span { 107 | position: absolute; 108 | top: -100em; 109 | } 110 | 111 | @media (min--moz-device-pixel-ratio: 1.3), 112 | (-o-min-device-pixel-ratio: 2.6/2), 113 | (-webkit-min-device-pixel-ratio: 1.3), 114 | (min-device-pixel-ratio: 1.3), 115 | (min-resolution: 1.3dppx) { 116 | header { 117 | background-image: url(bar@2.png); 118 | background-size: 255px 3px; 119 | } 120 | header a { 121 | background-image: url(logo@2.png); 122 | background-size: 100%; 123 | } 124 | h1:after { 125 | background-image: url(AppIcon@2.png); 126 | background-size: 100%; 127 | } 128 | } -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/Resources/Scripts/main.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/Resources/Scripts/main.scpt -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/Resources/description.rtfd/TXT.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 2 | {\fonttbl} 3 | {\colortbl;\red255\green255\blue255;} 4 | } -------------------------------------------------------------------------------- /Scripts/DT/Annotation template with specific issue tagging___Ctrl-Alt-2.scptd/Contents/Resources/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | color: #000; 3 | font-family: Helvetica, Arial, sans-serif; 4 | font-size: 13px; 5 | line-height: 18px; 6 | } 7 | 8 | body { 9 | background: #FFF; 10 | margin: 0; 11 | padding: 0; 12 | } 13 | 14 | a { 15 | text-decoration: none; 16 | border-width: 1px; 17 | border-style: none none solid none; 18 | border-color: #BFBEBE; 19 | } 20 | 21 | p a:hover, li a:hover { 22 | border-style: none none solid none; 23 | border-color: #7E7D7D; 24 | } 25 | 26 | p { 27 | margin: 0 0 0.8em 0; 28 | } 29 | 30 | h1, h2, h3 { 31 | text-transform: uppercase; 32 | margin: 1.75em 0 0.25em 0; 33 | font-size: 14px; 34 | color: #414040; 35 | } 36 | 37 | h1 { 38 | font-size: 20px; 39 | font-weight: normal; 40 | margin-top: 0; 41 | } 42 | 43 | h2, h3 { 44 | font-weight: normal; 45 | letter-spacing: 1px; 46 | } 47 | 48 | h3 { 49 | font-size: 12px; 50 | margin: 4px 0 2px 0; 51 | } 52 | 53 | h1:after { 54 | content: ""; 55 | display: block; 56 | width: 128px; 57 | height: 128px; 58 | float: right; 59 | margin: 0 0 2em 2em; 60 | background: url(AppIcon.png) no-repeat 0 0; 61 | } 62 | 63 | div.version, div.version ul { 64 | margin-left: 16px; 65 | } 66 | 67 | ul { 68 | margin: 0 0 8px 0; 69 | padding: 0; 70 | } 71 | 72 | li { 73 | list-style-type: none; 74 | padding: 0 48px 0 16px; 75 | margin: 0 0 3px 0; 76 | background: url(li.png) no-repeat 0 4px; 77 | background-size: 9px 4px; 78 | } 79 | 80 | pre, code { 81 | font-family: Monaco, Courier; 82 | color: #414040; 83 | font-size: 11px; 84 | } 85 | 86 | #frame { 87 | max-width: 680px; 88 | padding: 0; 89 | margin: 35px auto; 90 | } 91 | 92 | header { 93 | height: 34px; 94 | background: url(bar.png) repeat-x 0 bottom; 95 | margin-bottom: 38px; 96 | } 97 | 98 | header a { 99 | display: block; 100 | border-style: none; 101 | background: url(logo.png) no-repeat 0 0; 102 | width: 255px; 103 | height: 17px; 104 | } 105 | 106 | header span { 107 | position: absolute; 108 | top: -100em; 109 | } 110 | 111 | @media (min--moz-device-pixel-ratio: 1.3), 112 | (-o-min-device-pixel-ratio: 2.6/2), 113 | (-webkit-min-device-pixel-ratio: 1.3), 114 | (min-device-pixel-ratio: 1.3), 115 | (min-resolution: 1.3dppx) { 116 | header { 117 | background-image: url(bar@2.png); 118 | background-size: 255px 3px; 119 | } 120 | header a { 121 | background-image: url(logo@2.png); 122 | background-size: 100%; 123 | } 124 | h1:after { 125 | background-image: url(AppIcon@2.png); 126 | background-size: 100%; 127 | } 128 | } -------------------------------------------------------------------------------- /Scripts/DT/DT_Skim.scpt: -------------------------------------------------------------------------------- 1 | tell application ":Applications:DEVONthink Pro.app" 2 | set pdfFile to the content record of the think window 1 3 | set RecordLink to the reference URL of pdfFile 4 | set PdfPage to current page of the think window 1 5 | set DevonThinkLink to RecordLink & "?page=" & PdfPage 6 | set the clipboard to DevonThinkLink 7 | set PdfPath to get the path of pdfFile 8 | set PdfPath to (POSIX file PdfPath) as Unicode text 9 | close the think window 1 10 | 11 | tell application "Skim" 12 | activate 13 | open file PdfPath 14 | set PdfPage to PdfPage + 1 15 | go document 1 to page PdfPage of document 1 16 | end tell 17 | end tell 18 | -------------------------------------------------------------------------------- /Scripts/DT/Mark Read.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Mark Read.scpt -------------------------------------------------------------------------------- /Scripts/DT/RefreshAllRSS___Ctrl-Alt-1.scptd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/RefreshAllRSS___Ctrl-Alt-1.scptd -------------------------------------------------------------------------------- /Scripts/DT/Remove all tags from selection.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/Remove all tags from selection.scpt -------------------------------------------------------------------------------- /Scripts/DT/database_change_error.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DT/database_change_error.scpt -------------------------------------------------------------------------------- /Scripts/DevonAgent/Open URL in Default Browser.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emraher/workflow/35f6c18abebc391dca05ec6c6d1d0bd3a153139b/Scripts/DevonAgent/Open URL in Default Browser.scpt -------------------------------------------------------------------------------- /Scripts/PerlScripts/README.md: -------------------------------------------------------------------------------- 1 | 2 | ### bibfetch.pl.scpt 3 | 4 | 5 | These are for the "bibfetch.pl.scpt" on the [mankoff/BibDeskAppleScripts](https://github.com/mankoff/BibDeskAppleScripts). 6 | 7 | **"bibfetch.pl" is from [dschoepe/bibfetch](https://github.com/dschoepe/bibfetch)** 8 | 9 | ``` 10 | $ brew install perl 11 | ``` 12 | 13 | 14 | Then followed http://triopter.com/archive/how-to-install-perl-modules-on-mac-os-x-in-4-easy-steps/ 15 | 16 | ``` 17 | $ sudo perl -MCPAN -e shell 18 | 19 | 20 | Would you like to configure as much as possible automatically? [yes] 21 | 22 | 23 | What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') [local::lib] sudo 24 | 25 | perl> o conf init 26 | 27 | $ sudo perl -MCPAN -e 'install Bundle::CPAN' 28 | 29 | ``` 30 | 31 | sudo perl -MCPAN -e 'install Bundle::Name' 32 | 33 | ``` 34 | $ sudo perl -MCPAN -e 'install URI::Escape' 35 | $ sudo perl -MCPAN -e 'install Web::Scraper' 36 | $ sudo perl -MCPAN -e 'install WWW::Mechanize' 37 | $ sudo perl -MCPAN -e 'install String::Random' 38 | $ sudo perl -MCPAN -e 'install Pod::Usage' 39 | $ sudo perl -MCPAN -e 'install Getopt::Long' 40 | 41 | $ sudo perl -MCPAN -e 'install List::Util' 42 | Can't locate object method "install" via package "List::Util" at -e line 1. 43 | 44 | ``` 45 | 46 | 47 | Added an if loop to scpt file to fix arxiv pdfs. 48 | 49 | 50 | 51 | ### abbreviateJournalTitles.pl 52 | 53 | For journal title abbreviations script see [Jeremy Van Cleve's page](http://vancleve.theoretical.bio/software/). 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Scripts/PerlScripts/abbreviateJournalTitles.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Jeremy Van Cleve 4 | # 5 | # 2010/12/13: fixed cleanKey function to replace "and" correctly and delete redundant spaces 6 | 7 | use strict; 8 | use warnings; 9 | use Getopt::Std; 10 | 11 | sub cleanKey { 12 | my $key = shift; 13 | 14 | # lowercase key 15 | $key = lc($key); 16 | # remove leading and trailing spaces from potential key or abbreviation 17 | $key =~ s/(^\s+)|(\s+$)//g; 18 | # remove periods 19 | $key =~ s/\.//g; 20 | # replace "and" with "&" and delete leading backslash if present 21 | $key =~ s/\s+and\s+/ & /ig; 22 | $key =~ s/\\&/&/g; 23 | # remove leading "the" 24 | $key =~ s/^the\s+//ig; 25 | # delete redundant spaces 26 | $key =~ s/\s+/ /g; 27 | 28 | return $key 29 | } 30 | 31 | my @abbrevfiles 32 | = ( 33 | "Volumes/Dropbox/Dropbox/gitRepos/SourcesOnGitHub/Scripts/journal_abbreviations/abbreviations.txt" 34 | ); 35 | 36 | my (%abbrevFK, %abbrevAK, %fullname); 37 | my %opts; 38 | 39 | getopts('ima', \%opts); 40 | 41 | if (!defined($opts{'i'}) && !defined($opts{'m'}) && !defined($opts{'a'})) { 42 | print "usage: $0 [opts] args \n"; 43 | print "opts: \n"; 44 | print "\t -i: take titles and return ISO abbreviations\n"; 45 | print "\t -m: take titles and return Medline abbreviations\n"; 46 | print "\t -a: take abbreviations and return titles\n"; 47 | print "args: \n"; 48 | print "\t list of quoted titles or quoted abbreviations\n"; 49 | exit; 50 | } 51 | 52 | foreach my $file (@abbrevfiles) { 53 | open FILE, "<$file" or die "Couldn't open $file\n"; 54 | 55 | while () { 56 | chomp; 57 | my @pieces = split /[=;]/; 58 | 59 | # no full title or abbreviation 60 | if ($#pieces < 1) { 61 | print "!!! no full title or abbreviation for line: $_\n"; 62 | next; 63 | } 64 | 65 | $pieces[0] =~ s/(^\s+)|(\s+$)//g; 66 | $pieces[1] =~ s/(^\s+)|(\s+$)//g; 67 | 68 | # create abbreviated title key w/o capitals or periods or leading or trailing spaces. 69 | my $title_key = $pieces[0]; 70 | $title_key = cleanKey($title_key); 71 | 72 | # if journal hasn't been seen before, add it. 73 | if (!defined($abbrevFK{$title_key})) { 74 | # add abbreviation for full title 75 | $abbrevFK{$title_key} = $pieces[1]; 76 | } 77 | 78 | my $abbrev_key = $pieces[1]; 79 | $abbrev_key = cleanKey($abbrev_key); 80 | 81 | # Check to make sure abbreviation hasn't been seen before either for title replacement; if not add it 82 | if (!defined($abbrevAK{$abbrev_key})) { 83 | # add title and abbreviations keys to abbreviation hash and abbreviation to title hash 84 | $abbrevAK{$abbrev_key} = $pieces[1]; 85 | $fullname{$abbrev_key} = $pieces[0]; 86 | } 87 | } 88 | 89 | 90 | close FILE; 91 | } 92 | 93 | # process options for medline or ISO abbreviation 94 | if ($opts{'i'} || $opts{'m'}) { 95 | foreach my $arg (@ARGV) { 96 | $arg = cleanKey($arg); 97 | my $abrv = ""; 98 | 99 | if (defined($abbrevFK{$arg})) { 100 | # set abbreviation based on full title 101 | $abrv = $abbrevFK{$arg}; 102 | } 103 | elsif (defined($fullname{$arg})) { 104 | # if not given full title, assume abbreviation and turn back into 105 | # full title to find "standard" abbreviation according to abbreviation lists 106 | if (defined($abbrevFK{cleanKey($fullname{$arg})})) { 107 | $abrv = $abbrevFK{cleanKey($fullname{$arg})}; 108 | } 109 | } 110 | elsif (defined($abbrevAK{$arg})) { 111 | # all else fails, output old abbreviation 112 | $abrv = $abbrevAK{$arg}; 113 | } 114 | 115 | if ($opts{'m'}) { 116 | # remove periods for medline abbreviation 117 | $abrv =~ s/\.//g; 118 | } 119 | print "$abrv\n"; 120 | } 121 | } 122 | 123 | # process options for full title 124 | elsif ($opts{'a'}) { 125 | foreach my $arg (@ARGV) { 126 | $arg = cleanKey($arg); 127 | 128 | if (defined($fullname{$arg})) { 129 | # if full title exists, return with added backslash for LaTeX 130 | my $return_name = $fullname{$arg}; 131 | $return_name =~ s/([^\\])&/$1\\&/g; 132 | print $return_name . "\n"; 133 | } 134 | else { 135 | print "\n"; 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /Scripts/PerlScripts/bibfetch.el: -------------------------------------------------------------------------------- 1 | ;;; bibfetch.el -- Fetch BibTeX entries from Google Scholar 2 | 3 | ;; Author: Daniel Schoepe 4 | ;; Version: 0.1 5 | 6 | ;;; Commentary: 7 | 8 | ;; This programs uses the accompanying bibfetch.pl script to fetch 9 | ;; BibTeX entries from Google Scholar, and provides some convenience 10 | ;; functionality for inserting entries into a bibtex file. See 11 | ;; README.org for usage information. 12 | 13 | ;;; Code: 14 | 15 | (require 'bibtex) 16 | 17 | (defcustom bibfetch-script "bibfetch.pl" 18 | "Path to the bibfetch.pl script.") 19 | (defcustom bibfetch-arguments nil 20 | "Arguments to pass to bibfetch.pl.") 21 | 22 | (defvar bibfetch-original-buffer nil 23 | "Buffer from which bibtex was called.") 24 | (make-variable-buffer-local 'bibfetch-original-buffer) 25 | 26 | (defun bibfetch-next-entry () 27 | "Skip to next entry." 28 | (interactive) 29 | (bibtex-end-of-entry) 30 | (forward-char) 31 | (bibtex-beginning-of-entry)) 32 | 33 | (defun bibfetch-previous-entry () 34 | "Skip to previous entry." 35 | (interactive) 36 | (bibtex-beginning-of-entry) 37 | (backward-char) 38 | (bibtex-beginning-of-entry)) 39 | 40 | (defun bibfetch-copy-entry-as-kill () 41 | "Copy current entry to killring." 42 | (interactive) 43 | (save-excursion 44 | (bibtex-mark-entry) 45 | (copy-region-as-kill (region-beginning) (region-end)))) 46 | 47 | (defun bibfetch-append-entry-to-caller () 48 | "Append the current entry in the buffer in which bibfetch was called." 49 | (interactive) 50 | (if (not (buffer-live-p bibfetch-original-buffer)) 51 | (message "Original buffer no longer exists") 52 | (bibfetch-copy-entry-as-kill) 53 | (with-current-buffer bibfetch-original-buffer 54 | (save-excursion 55 | (goto-char (point-max)) 56 | (unless (bolp) 57 | (newline)) 58 | (insert (current-kill 0) "\n"))))) 59 | 60 | (defun bibfetch-quit () 61 | "Exit bibfetch results" 62 | (kill-buffer-and-window)) 63 | 64 | (defvar bibfetch-mode-map 65 | (let ((map (make-sparse-keymap))) 66 | (set-keymap-parent map bibtex-mode-map) 67 | (define-key map "j" #'bibfetch-next-entry) 68 | (define-key map "k" #'bibfetch-previous-entry) 69 | (define-key map "y" #'bibfetch-copy-entry-as-kill) 70 | (define-key map "q" #'bibfetch-quit) 71 | (define-key map (kbd "") #'bibfetch-next-entry) 72 | (define-key map (kbd "") #'bibfetch-previous-entry) 73 | (define-key map (kbd "") #'bibfetch-append-entry-to-caller) 74 | map) 75 | "Key map for interacting with bibfetch results") 76 | 77 | (define-derived-mode bibfetch-mode bibtex-mode "bibfetch results" 78 | (use-local-map bibfetch-mode-map) 79 | (setq buffer-read-only t)) 80 | 81 | (defun bibfetch (query) 82 | "Query Google Scholar with QUERY and return results" 83 | (interactive "MQuery: ") 84 | (let ((buf (generate-new-buffer (concat "*bibfetch: " query "*"))) 85 | (orig-buf (current-buffer))) 86 | (with-current-buffer buf 87 | ;; XXX make this asynchronous 88 | (apply #'call-process bibfetch-script nil t nil query bibfetch-arguments) 89 | (beginning-of-buffer) 90 | (bibfetch-mode) 91 | (setq bibfetch-original-buffer orig-buf) 92 | (switch-to-buffer-other-window buf)))) 93 | 94 | (provide 'bibfetch) 95 | -------------------------------------------------------------------------------- /Scripts/PerlScripts/bibfetch.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use URI; 7 | use URI::Escape; 8 | use Web::Scraper; 9 | use WWW::Mechanize; 10 | use String::Random; 11 | use Pod::Usage; 12 | use Getopt::Long qw(:config no_ignore_case); 13 | use List::Util qw(min); 14 | use v5.10; 15 | no warnings 'experimental::smartmatch'; 16 | 17 | our $verbose; 18 | 19 | sub dblp { 20 | my ($query, $limit) = @_; 21 | my $mech = WWW::Mechanize->new(); 22 | $query = uri_escape($query); 23 | my $url = "http://dblp.uni-trier.de/search?q=$query"; 24 | print STDERR "URL: $url\n" if $verbose; 25 | my $linkscraper = scraper { 26 | process "li", "entries[]" => { class => '@class', id => '@id' }; 27 | result 'entries' 28 | }; 29 | my $response = $mech->get($url); 30 | my $entries = $linkscraper->scrape($response); 31 | my @results; 32 | my $num = 0; 33 | for my $entry (@$entries) { 34 | my %data = (); 35 | if (defined $entry->{'class'} && $entry->{'class'} =~ /entry/) { 36 | # Don't escape URL since key is used verbatim as part of URL. 37 | my $biburl = "http://dblp.uni-trier.de/rec/bib1/".$entry->{'id'}.".bib"; 38 | my $response = $mech->get($biburl); 39 | next unless $response->is_success; 40 | $data{bibtex} = $response->decoded_content(); 41 | # Chop off extra whitespace 42 | $data{bibtex} =~ s/\s+$//ms; 43 | push @results, \%data; 44 | $num++; 45 | last if ($limit > 0 && $num >= $limit); 46 | } 47 | } 48 | return @results; 49 | } 50 | 51 | sub gscholar { 52 | 53 | my ($query, $limit, $fulltext, $doi) = @_; 54 | my $mech = WWW::Mechanize->new(); 55 | 56 | # Generate a random string consisting of 16 hex characters for the 57 | # google ID. This is needed to make google scholar output bibtex 58 | # links for some reason. 59 | my $gid = (new String::Random)->randregex("[0-9a-f]{16}"); 60 | 61 | $mech->agent_alias("Linux Mozilla"); 62 | $mech->add_header(Cookie => "GSP=ID=$gid:CF=4"); 63 | 64 | $query = "allintitle: ".$query unless ($fulltext or $doi); 65 | 66 | $query = uri_escape($query); 67 | 68 | my $url = "http://scholar.google.com/scholar?hl=en&q=".$query."&num=".$limit; 69 | 70 | print STDERR "Query URL: $url\n" if $verbose; 71 | 72 | my $linkscraper = scraper { 73 | process 'div.gs_r', "entries[]" => 74 | scraper { 75 | process "a[href]", "links[]" => { href => '@href', text => 'TEXT' }; 76 | result 'links'; 77 | }; 78 | result 'entries'; 79 | }; 80 | 81 | my $response = $mech->get($url); 82 | 83 | my $raw_results = $linkscraper->scrape($response); 84 | my @results; 85 | for my $entry (@$raw_results) { 86 | my %data = (); 87 | my ($biblink) = grep { $_->{text} =~ /import into bibtex/i } @$entry; 88 | # We don't want articles without bibtex entries: 89 | next unless $biblink; 90 | $response = $mech->get($biblink->{href}); 91 | if ($response->is_success) { 92 | $data{bibtex} = $response->decoded_content; 93 | given ($data{bibtex}) { 94 | # Chop off extra whitespace 95 | s/\s+$//m; 96 | } 97 | } else { next; } 98 | my @pdflinks = grep { $_->{text} =~ /^\[pdf\] from/i } @$entry; 99 | if (@pdflinks) { 100 | $data{pdf} = $pdflinks[0]->{href}; 101 | } 102 | push @results, \%data; 103 | } 104 | 105 | return @results; 106 | } 107 | 108 | 109 | my ($help, $pdfs, $fulltext, $doi, $dblp); 110 | my $limit = 5; 111 | 112 | binmode STDOUT, ":utf8"; 113 | 114 | GetOptions("h|help" => \$help, 115 | "l|limit=i" => \$limit, 116 | "v|verbose" => \$verbose, 117 | "f|fulltext" => \$fulltext, 118 | "d|doi" => \$doi, 119 | "p|pdf" => \$pdfs, 120 | "D|dblp" => \$dblp) 121 | or pod2usage(1); 122 | 123 | pod2usage(1) if ($help); 124 | 125 | pod2usage(-message => "No query given", -verbose => 1) 126 | if (@ARGV == 0); 127 | 128 | my $query = join(" ", @ARGV); 129 | 130 | my @results; 131 | if ($dblp) { 132 | @results = dblp($query, $limit); 133 | } else { 134 | @results = gscholar($query, $limit, $fulltext, $doi); 135 | } 136 | 137 | for my $result (@results[0..min($#results, $limit-1)]) { 138 | print $result->{bibtex}."\n"; 139 | if ($pdfs && exists $result->{pdf}) { 140 | print "PDF: ", $result->{pdf}, "\n\n"; 141 | } 142 | } 143 | 144 | __END__ 145 | 146 | =head1 bibfetch.pl 147 | 148 | Script to fetch bibtex entries from Google Scholar. 149 | 150 | =head1 SYNOPSIS 151 | 152 | bibfetch.pl [-h] [-l LIMIT] [-v] [-f] [-p] QUERY 153 | 154 | Search for QUERY using Google Scholar, and print at most LIMIT 155 | matching bibtex entries. The resulting entries are separated by 156 | newlines. If -p or --pdf is given, each entry may be followed by a 157 | link to a pdf, preceded by "PDF: ". 158 | 159 | Options: 160 | -h|--help This help message 161 | -v|--verbose Print more information on stderr 162 | -l|--limit=LIMIT Maximum number of entries to print (default: 5) 163 | -p|--pdf Include PDF links in output (if any) 164 | -d|--doi Search string passed in is DOI 165 | -f|--fulltext Search full article text, not just the title (default) 166 | -D|--dblp Use DBLP instead of Google Scholar (does not produce PDF links) 167 | 168 | QUERY can contain anything Google Scholar accepts, such as 169 | author:YourFavoriteResearcher. 170 | 171 | =head1 BUGS 172 | 173 | At the moment, this script only supports Google Scholar, but support 174 | for some other search engines would be nice, too. 175 | 176 | =head1 AUTHOR 177 | 178 | Daniel Schoepe 179 | 180 | =head1 LICENSE 181 | 182 | This program is free software, licensed under the (3-clause) BSD license; see 183 | the LICENSE file for details. 184 | 185 | -------------------------------------------------------------------------------- /Scripts/PythonScripts/README.md: -------------------------------------------------------------------------------- 1 | **cb_customs.py** and **convertbibliography.py** are from [twsh/Convertbibliography 2 | ](https://github.com/twsh/Convertbibliography). Convert messy biblatex/bibtex data into nice biblatex. 3 | 4 | **pdfmeat.py** is from [mankoff/BibDeskAppleScripts 5 | ](https://github.com/mankoff/BibDeskAppleScripts). BibDesk Applescripts to download PDFs and fill in info. 6 | -------------------------------------------------------------------------------- /Scripts/PythonScripts/convertbibliography.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import argparse 4 | import re 5 | import shutil 6 | import sys 7 | 8 | import cb_customs 9 | 10 | from bibtexparser.bparser import BibTexParser 11 | from bibtexparser.bwriter import BibTexWriter 12 | from bibtexparser.customization import * 13 | 14 | 15 | def fix_keys(l): 16 | """ list -> list 17 | Take a list that represents lines. 18 | Find lines which are the start of a bibtex entry without a key. 19 | Add dummy keys to those lines. 20 | Remove spaces from keys. 21 | >>> fix_keys( 22 | ['@book{foo bar,', '@article{', ' Author = {Thomas Hodgson}', '}'] 23 | ) 24 | ['@book{foobar,', '@article{Foo1,', ' Author = {Thomas Hodgson}', '}'] 25 | """ 26 | i = 1 27 | j = 0 28 | while j < len(l): 29 | if re.fullmatch('@\\w+\\s*{,{0,1}', l[j].strip()): 30 | l[j] = l[j][:l[j].find('{')+1] + 'Foo' + str(i) + ',' 31 | i += 1 32 | elif re.match('@', l[j].strip()): 33 | # Find where the key starts 34 | start = re.search('{', l[j]).end() 35 | # Get rid of any non word characters 36 | key = re.sub('\W+', '', l[j][start:]) 37 | # Put it back together; add a comma which will have been removed 38 | l[j] = l[j][:start] + key + ',' 39 | j += 1 40 | return l 41 | 42 | 43 | def customizations(record): 44 | """Use some functions delivered by the library 45 | 46 | :param record: a record 47 | :returns: -- customized record 48 | """ 49 | # This needs to come before authors are dealt with 50 | # otherwise there are encoding problems 51 | record = convert_to_unicode(record) 52 | record = author(record) 53 | record = editor(record) 54 | # This is needed after `author` is called to allow writing 55 | record = cb_customs.join_author_editor(record) 56 | record = cb_customs.titlecase_name(record) 57 | record = cb_customs.remove_booktitle(record) 58 | record = cb_customs.language(record) 59 | record = cb_customs.case_title(record) 60 | record = cb_customs.journaltitle(record) 61 | # This should come after `journaltitle`is called 62 | record = cb_customs.add_definite_to_journaltitles(record) 63 | record = cb_customs.remove_pages_from_books_and_collections(record) 64 | record = cb_customs.non_page_hyphens(record) 65 | record = cb_customs.dashes(record) 66 | record = cb_customs.biblatex_page_ranges(record) 67 | record = cb_customs.remove_abstract(record) 68 | record = cb_customs.remove_ISBN(record) 69 | record = cb_customs.remove_ISSN(record) 70 | record = cb_customs.remove_epub(record) 71 | record = cb_customs.remove_copyright(record) 72 | record = cb_customs.remove_publisher(record) 73 | record = cb_customs.remove_link(record) 74 | record = cb_customs.escape_characters(record) 75 | record = cb_customs.remove_ampersand(record) 76 | record = cb_customs.jstor(record) 77 | record = cb_customs.citeulike(record) 78 | record = cb_customs.edition(record) 79 | record = cb_customs.multivolume(record) 80 | record = cb_customs.publisher(record) 81 | record = cb_customs.strip_doi(record) 82 | record = cb_customs.remove_keyword(record) 83 | record = cb_customs.empty_fields(record) 84 | record = cb_customs.remove_protection(record) 85 | record = cb_customs.active_quotes(record) 86 | record = cb_customs.subtitles(record) 87 | record = cb_customs.remove_series(record) 88 | if not args.nodoi: 89 | try: 90 | record = cb_customs.get_doi(record) 91 | # If there is a connection error stop trying to get DOIs 92 | except cb_customs.requests.exceptions.ConnectionError: 93 | if args.verbose: 94 | print( 95 | "I couldn't connect to the CrossRef API. " 96 | "Perhaps you are not connected to the internet?" 97 | ) 98 | args.nodoi = True 99 | return record 100 | 101 | if __name__ == "__main__": 102 | parser = argparse.ArgumentParser() 103 | parser.add_argument( 104 | '--input', 105 | help='Path to the input file' 106 | ) 107 | parser.add_argument( 108 | '--no-doi', 109 | dest='nodoi', 110 | action='store_true', 111 | help="Don't look for DOIs from CrossRef" 112 | ) 113 | parser.add_argument( 114 | '--verbose', 115 | dest='verbose', 116 | action='store_true', 117 | help="Print messages" 118 | ) 119 | args = parser.parse_args() 120 | if args.input: 121 | bib = args.input 122 | try: 123 | shutil.copy(bib, bib + '.backup') 124 | if args.verbose: 125 | print( 126 | "I have made a backup of the orignal file at {}.backup" 127 | .format(bib) 128 | ) 129 | with open(bib, 'r', encoding='utf-8') as biblatex: 130 | content = biblatex.read() 131 | except FileNotFoundError: 132 | if args.verbose: 133 | print("I couldn't find the file {}.".format(bib)) 134 | sys.exit() 135 | else: 136 | content = sys.stdin.read() 137 | # Find the start of the first record 138 | try: 139 | start = re.search('@', content).start() 140 | except AttributeError: 141 | if args.verbose: 142 | print("The file I was given didn't contain any records.") 143 | sys.exit() 144 | content = content[start:].split('\n') 145 | # Provide dummy citekeys 146 | content = fix_keys(content) 147 | fixed_content = '\n'.join(content) 148 | bibliography = BibTexParser( 149 | fixed_content, 150 | customization=customizations, 151 | ignore_nonstandard_types=False 152 | # Otherwise bibtexparser will complain if I give it a collection 153 | ) 154 | output = BibTexWriter().write(bibliography) 155 | if args.input: 156 | with open(bib, 'w', encoding='utf-8') as biblatex: 157 | biblatex.write(output) 158 | else: 159 | sys.stdout.write(output) 160 | -------------------------------------------------------------------------------- /Scripts/ShellScripts/README.md: -------------------------------------------------------------------------------- 1 | **changemetadata.sh** used with KM macro. 2 | 3 | **minion.sh** and **minion2.sh** to install Minion fonts. -------------------------------------------------------------------------------- /Scripts/ShellScripts/changemetadata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | /usr/local/bin/exiftool -overwrite_original -Title="$KMVAR_title" -Author="$KMVAR_authors" -Subject="$KMVAR_subject" -Keywords="$KMVAR_keywords" "$KMVAR_path" 3 | -------------------------------------------------------------------------------- /Scripts/ShellScripts/minion.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ## Information 3 | ## http://carlo-hamalainen.net/blog/2007/12/11/installing-minion-pro-fonts/ 4 | ## http://www.ctan.org/tex-archive/fonts/mnsymbol/ 5 | 6 | ## 0.1: Install LCDF Typetools 7 | ## http://www.lcdf.org/type/ 8 | ## If you use Homebrew (http://mxcl.github.com/homebrew/), then uncomment: 9 | # brew install lcdf-typetools 10 | 11 | ## 0.2: If ~/tmp doesn't exist, create it. 12 | # mkdir ~/tmp 13 | 14 | ## Destination. System wide: 15 | # DEST=`kpsexpand '$TEXMFLOCAL'` 16 | ## Or single-user only: 17 | DEST=~/Library/texmf 18 | 19 | ## Downloader: 20 | DOWNLOAD="curl -L -O" 21 | 22 | ## Directory where minion fonts can be found: 23 | #MINIONSRC=/Applications/Adobe\ Reader.app/Contents/Resources/Resource/Font/ 24 | #MINIONSRC=~/tmp/minionsrc 25 | MINIONSRC=~/Library/Fonts 26 | 27 | ## Everything gets done in a temporary directory 28 | cd ~/tmp 29 | 30 | ## 1: MnSymbol 31 | ## http://www.ctan.org/tex-archive/fonts/mnsymbol/ 32 | $DOWNLOAD http://mirror.ctan.org/fonts/mnsymbol.zip 33 | 34 | unzip mnsymbol 35 | cd mnsymbol/tex 36 | 37 | ## Generates MnSymbol.sty 38 | latex MnSymbol.ins 39 | 40 | mkdir -p $DEST/tex/latex/MnSymbol/ \ 41 | $DEST/fonts/source/public/MnSymbol/ \ 42 | $DEST/doc/latex/MnSymbol/ 43 | 44 | cp MnSymbol.sty $DEST/tex/latex/MnSymbol/MnSymbol.sty 45 | cd .. # we were in mnsymbol/tex 46 | cp source/* $DEST/fonts/source/public/MnSymbol/ 47 | cp MnSymbol.pdf README $DEST/doc/latex/MnSymbol/ 48 | 49 | mkdir -p $DEST/fonts/map/dvips/MnSymbol \ 50 | $DEST/fonts/enc/dvips/MnSymbol \ 51 | $DEST/fonts/type1/public/MnSymbol \ 52 | $DEST/fonts/tfm/public/MnSymbol 53 | cp enc/MnSymbol.map $DEST/fonts/map/dvips/MnSymbol/ 54 | cp enc/*.enc $DEST/fonts/enc/dvips/MnSymbol/ 55 | cp pfb/*.pfb $DEST/fonts/type1/public/MnSymbol/ 56 | cp tfm/* $DEST/fonts/tfm/public/MnSymbol/ 57 | 58 | ## I believe that this is not strictly needed if DEST is in the home 59 | ## tree on OSX, but might be needed otherwise 60 | sudo mktexlsr 61 | updmap --enable MixedMap MnSymbol.map 62 | 63 | # $DOWNLOAD http://carlo-hamalainen.net/blog/myfiles/minionpro/mnsymbol-test.tex 64 | # pdflatex mnsymbol-test.tex 65 | 66 | ## 2: MinionPro 67 | mkdir -p ~/tmp/minionpro 68 | cd ~/tmp/minionpro 69 | 70 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/enc-2.000.zip 71 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/metrics-base.zip 72 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/metrics-full.zip 73 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/scripts.zip 74 | 75 | ## This will make the otf directory, among other things. 76 | unzip scripts.zip 77 | 78 | cp $MINIONSRC/Minion*otf otf/ 79 | 80 | ## Generate the pfb files 81 | ## This step requires that the LCDF type tools are installed. Get them here: 82 | ## http://www.lcdf.org/type/ 83 | ./convert.sh 84 | 85 | ## Copy the pfb files to where they belong: 86 | mkdir -p $DEST/fonts/type1/adobe/MinionPro 87 | cp pfb/*.pfb $DEST/fonts/type1/adobe/MinionPro 88 | 89 | SRC=`pwd` 90 | cd $DEST 91 | unzip $SRC/enc-2.000.zip 92 | unzip $SRC/metrics-base.zip 93 | unzip $SRC/metrics-full.zip 94 | cd $SRC 95 | 96 | sudo mktexlsr 97 | updmap --enable MixedMap MinionPro.map 98 | 99 | ## Test: 100 | # $DOWNLOAD http://carlo-hamalainen.net/blog/myfiles/minionpro/minionpro-test.tex 101 | # pdflatex minionpro-test.tex -------------------------------------------------------------------------------- /Scripts/ShellScripts/minion2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ## Information 3 | ## http://carlo-hamalainen.net/blog/2007/12/11/installing-minion-pro-fonts/ 4 | ## http://www.ctan.org/tex-archive/fonts/mnsymbol/ 5 | 6 | ## 0: Install 7 | ## http://www.lcdf.org/type/ 8 | ## I used --without-kpathsea to configure (with MacTeX 2011): 9 | ## 10 | ## ./configure --without-kpathsea 11 | ## make 12 | ## sudo make install 13 | 14 | ## Destination. I like it here, but 15 | # DEST=`kpsexpand '$TEXMFLOCAL'` 16 | ## might be better for a computer-wide install. 17 | DEST=~/Library/texmf 18 | 19 | ## Downloader: 20 | DOWNLOAD="curl -OL" 21 | 22 | ## Directory where minion fonts can be found: 23 | MINIONSRC=/Applications/Adobe\ Acrobat\ Reader\ DC.app/Contents/Resources/Resource/Font/ 24 | MINIONSRC=~/tmp/minionpro/minion 25 | 26 | ## 1: MnSymbol 27 | ## http://www.ctan.org/tex-archive/fonts/mnsymbol/ 28 | $DOWNLOAD http://mirror.ctan.org/fonts/mnsymbol.zip 29 | 30 | unzip mnsymbol.zip 31 | cd mnsymbol/tex 32 | 33 | ## Generates MnSymbol.sty 34 | latex MnSymbol.ins 35 | 36 | mkdir -p $DEST/tex/latex/MnSymbol/ \ 37 | $DEST/fonts/source/public/MnSymbol/ \ 38 | $DEST/doc/latex/MnSymbol/ 39 | 40 | cp MnSymbol.sty $DEST/tex/latex/MnSymbol/MnSymbol.sty 41 | cd .. # we were in mnsymbol/tex 42 | cp source/* $DEST/fonts/source/public/MnSymbol/ 43 | cp MnSymbol.pdf README $DEST/doc/latex/MnSymbol/ 44 | 45 | mkdir -p $DEST/fonts/map/dvips/MnSymbol \ 46 | $DEST/fonts/enc/dvips/MnSymbol \ 47 | $DEST/fonts/type1/public/MnSymbol \ 48 | $DEST/fonts/tfm/public/MnSymbol 49 | cp enc/MnSymbol.map $DEST/fonts/map/dvips/MnSymbol/ 50 | cp enc/*.enc $DEST/fonts/enc/dvips/MnSymbol/ 51 | cp pfb/*.pfb $DEST/fonts/type1/public/MnSymbol/ 52 | cp tfm/* $DEST/fonts/tfm/public/MnSymbol/ 53 | 54 | ## I believe that this is not strictly needed if DEST is in the home 55 | ## tree on OSX, but might be needed otherwise 56 | sudo mktexlsr 57 | updmap --enable MixedMap MnSymbol.map 58 | 59 | cd .. 60 | 61 | # $DOWNLOAD http://carlo-hamalainen.net/blog/myfiles/minionpro/mnsymbol-test.tex 62 | # pdflatex mnsymbol-test.tex 63 | 64 | ## 2: MinionPro 65 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/enc-2.000.zip 66 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/metrics-base.zip 67 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/metrics-full.zip 68 | $DOWNLOAD http://mirrors.ctan.org/fonts/minionpro/scripts.zip 69 | 70 | ## This will make the otf directory, among other things. 71 | unzip scripts.zip 72 | 73 | cp $MINIONSRC/Minion*otf otf/ 74 | 75 | ## Generate the pfb files 76 | ## This step requires that the LCDF type tools are installed. Get them here: 77 | ## http://www.lcdf.org/type/ 78 | ./convert.sh 79 | 80 | ## Copy the pfb files to where they belong: 81 | mkdir -p $DEST/fonts/type1/adobe/MinionPro 82 | cp pfb/*.pfb $DEST/fonts/type1/adobe/MinionPro 83 | 84 | SRC=`pwd` 85 | cd $DEST 86 | unzip $SRC/enc-2.000.zip 87 | unzip $SRC/metrics-base.zip 88 | unzip $SRC/metrics-full.zip 89 | cd $SRC 90 | 91 | sudo mktexlsr 92 | updmap --enable MixedMap MinionPro.map 93 | 94 | ## Test: 95 | # $DOWNLOAD http://carlo-hamalainen.net/blog/myfiles/minionpro/minionpro-test.tex 96 | # pdflatex minionpro-test.tex 97 | -------------------------------------------------------------------------------- /Scripts/homebrew/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Alex Grant 2 | Original script copyright (c) 2012 Chris Streeter 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 8 | the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Scripts/homebrew/README.md: -------------------------------------------------------------------------------- 1 | # Homebrew and Cask Notifier 2 | 3 | Notifies you when homebrew and cask package updates are available. An extension of 4 | [`brew-update-notifier.sh`](https://gist.github.com/streeter/3254906) with added scripts to install as launch agent. 5 | 6 | ## Installation 7 | 8 | ``` 9 | curl -fsS https://raw.githubusercontent.com/emraher/homebrew-notifier/master/install.sh | sh 10 | ``` 11 | -------------------------------------------------------------------------------- /Scripts/homebrew/cask-notifier.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EnvironmentVariables 6 | 7 | PATH 8 | /usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 9 | 10 | Label 11 | cask-notifier 12 | Program 13 | /usr/local/bin/cask-notifier.sh 14 | RunAtLoad 15 | 16 | StartCalendarInterval 17 | 18 | 19 | Hour 20 | 10 21 | Minute 22 | 1 23 | 24 | 25 | Hour 26 | 22 27 | Minute 28 | 1 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Scripts/homebrew/cask-notifier.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Notify of Homebrew Cask updates via Notification Center on Mac OS X 4 | # 5 | # Requires homebrew-cask-upgrade (https://github.com/emraher/homebrew-cask-upgrade) 6 | # 7 | # If not installed run: 8 | # 9 | # brew tap emraher/cask-upgrade 10 | # 11 | #---------------------------------------------------------------------------- 12 | # Checks updates at 10:01am and 10:01pm. If any, updates. 13 | 14 | NAME="cask-notifier" 15 | export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 16 | 17 | BREW=$(which brew) 18 | TERM_NOTIF=$(which terminal-notifier) 19 | NOTIF_ARGS="-sender com.apple.Terminal" 20 | 21 | outdated=$($BREW cu --list) 22 | 23 | if [ -z "$outdated" ]; then 24 | if [ -e $TERM_NOTIF ]; then 25 | $TERM_NOTIF $NOTIF_ARGS \ 26 | -title "No Homebrew Cask Upgrades Available" \ 27 | -message "" 28 | fi 29 | else 30 | if [ -n "$outdated" ] && [ -e $TERM_NOTIF ]; then 31 | lc=$((`echo "$outdated" | wc -l`)) 32 | message=`echo "$outdated" | head -2` 33 | title=$(printf "$lc Cask Upgrades Available. Update?") 34 | message=$(printf "Some of the upgradable casks are:\n$message ...") 35 | 36 | ANSWER="$("$TERM_NOTIF" "$NOTIF_ARGS" -title "${title}" -message "${message}" -closeLabel "No" -actions Yes -json | jq .activationType,.activationValue)" 37 | 38 | stringarray=($ANSWER) 39 | type=${stringarray[0]} 40 | value=${stringarray[1]} 41 | case $type in 42 | \"contentsClicked\") 43 | ;; 44 | **) 45 | case $value in 46 | \"No\") ANSWER="No" 47 | ;; 48 | \"Yes\") ANSWER="Yes" 49 | ;; 50 | **) 51 | esac 52 | ;; 53 | esac 54 | 55 | if [ "$ANSWER" = "Yes" ]; then 56 | $TERM_NOTIF $NOTIF_ARGS -title "Upgrading..." -message "" -timeout 3 57 | $BREW cu --no-brew-update --all --yes --quiet --cleanup 58 | tee -a "$HOME/Library/Logs/$NAME.log" 59 | LOG="$("$TERM_NOTIF" "$NOTIF_ARGS" -title "Upgraded!" -message "Want to see the log file?" -closeLabel "No" -actions Yes -timeout 5 -json | jq .activationType,.activationValue)" 60 | stringarray=($LOG) 61 | type=${stringarray[0]} 62 | value=${stringarray[1]} 63 | case $type in 64 | \"contentsClicked\") 65 | ;; 66 | **) 67 | case $value in 68 | \"No\") LOG="No" 69 | ;; 70 | \"Yes\") LOG="Yes" 71 | ;; 72 | **) 73 | esac 74 | ;; 75 | esac 76 | if [ "$LOG" = "Yes" ]; then 77 | sublime "$HOME/Library/Logs/$NAME.log" 78 | fi 79 | exit 0 80 | else 81 | $TERM_NOTIF $NOTIF_ARGS -title "Won't be upgrading." -message "" -timeout 3 82 | fi 83 | fi 84 | fi 85 | -------------------------------------------------------------------------------- /Scripts/homebrew/homebrew-notifier.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EnvironmentVariables 6 | 7 | PATH 8 | /usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 9 | 10 | Label 11 | homebrew-notifier 12 | Program 13 | /usr/local/bin/homebrew-notifier.sh 14 | RunAtLoad 15 | 16 | StartCalendarInterval 17 | 18 | 19 | Hour 20 | 10 21 | Minute 22 | 0 23 | 24 | 25 | Hour 26 | 22 27 | Minute 28 | 0 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Scripts/homebrew/homebrew-notifier.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Notify of Homebrew updates via Growl on Mac OS X 4 | # 5 | # Author: Chris Streeter http://www.chrisstreeter.com 6 | # Requires: Growl Notify Extra to be installed. Install with 7 | # brew install growlnotify 8 | # 9 | # Notify of Homebrew updates via Notification Center on Mac OS X 10 | # 11 | # Author: Richard Woeber 12 | # based on the work of Chris Streeter http://www.chrisstreeter.com 13 | #---------------------------------------------------------------------------- 14 | # Checks updates at 10am and 10pm. If any, updates. 15 | 16 | NAME="homebrew-notifier" 17 | export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 18 | 19 | BREW=$(which brew) 20 | TERM_NOTIF=$(which terminal-notifier) 21 | NOTIF_ARGS="-sender com.apple.Terminal" 22 | 23 | $BREW update 2>&1 > /dev/null 24 | outdated=$($BREW outdated --quiet) 25 | 26 | if [ -z "$outdated" ]; then 27 | if [ -e $TERM_NOTIF ]; then 28 | # No updates available 29 | $TERM_NOTIF $NOTIF_ARGS \ 30 | -title "No Homebrew Updates Available" \ 31 | -message "" -timeout 5 32 | fi 33 | else 34 | # We've got an outdated formula or more 35 | # Nofity 36 | if [ -n "$outdated" ] && [ -e $TERM_NOTIF ]; then 37 | lc=$((`echo "$outdated" | wc -l`)) 38 | updatable=`echo "$outdated" | tail -$lc` 39 | message=`echo "$outdated" | head -5` 40 | if [ "$outdated" != "$message" ]; then 41 | title=$(printf "$lc Homebrew Updates Available") 42 | message=$(printf "Some of the updatable formulae are:\n$message") 43 | else 44 | title=$(printf "$lc Homebrew Updates Available") 45 | message=$(printf "The following formulae are updatable:\n$message") 46 | fi 47 | # Send to terminal-notifier 48 | $TERM_NOTIF $NOTIF_ARGS \ 49 | -title "${title}" \ 50 | -message "${message}" -timeout 5 51 | # Update - This part is from: 52 | # http://www.engadget.com/2014/06/11/how-to-keep-homebrew-and-xquartz-updated-automatically/ 53 | ($BREW update && $BREW upgrade && $BREW doctor) 2>&1 | tee -a "$HOME/Library/Logs/$NAME.log" 54 | exit 0 55 | fi 56 | fi 57 | -------------------------------------------------------------------------------- /Scripts/homebrew/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASE_URL=https://raw.githubusercontent.com/emraher/workflow/master/Scripts/homebrew 4 | NOTIFIER_PATH=/usr/local/bin 5 | BREW_SCRIPT=$NOTIFIER_PATH/homebrew-notifier.sh 6 | CASK_SCRIPT=$NOTIFIER_PATH/cask-notifier.sh 7 | LAUNCHAGENTS_PATH=$HOME/Library/LaunchAgents 8 | BREW_PLIST=$LAUNCHAGENTS_PATH/homebrew-notifier.plist 9 | CASK_PLIST=$LAUNCHAGENTS_PATH/cask-notifier.plist 10 | 11 | brew list | grep -q "terminal-notifier" || brew install terminal-notifier 12 | mkdir -p "$NOTIFIER_PATH" 13 | curl -fsS $BASE_URL/homebrew-notifier.sh > "$BREW_SCRIPT" 14 | chmod +x "$BREW_SCRIPT" 15 | 16 | mkdir -p "$LAUNCHAGENTS_PATH" 17 | curl -fsS $BASE_URL/homebrew-notifier.plist > "$BREW_PLIST" 18 | chmod +x "$BREW_PLIST" # Not sure if needed. 19 | 20 | 21 | brew tap | grep -q "emraher/cask-upgrade" || brew tap emraher/cask-upgrade 22 | curl -fsS $BASE_URL/cask-notifier.sh > "$CASK_SCRIPT" 23 | chmod +x "$BREW_SCRIPT" 24 | curl -fsS $BASE_URL/cask-notifier.plist > "$CASK_PLIST" 25 | chmod +x "$CASK_PLIST" # Not sure if needed. 26 | 27 | echo 28 | echo "Notifier installed. You'll be notified of brew updates at 10am and 10pm every day." 29 | echo "Checking for updates right now..." 30 | $NOTIFIER_SCRIPT 31 | -------------------------------------------------------------------------------- /Scripts/journal_abbreviations/README.md: -------------------------------------------------------------------------------- 1 | ### Journal Abbreviations 2 | 3 | Combined [JabRef/reference-abbreviations](https://github.com/JabRef/reference-abbreviations) and [citation-style-language/abbreviations 4 | ](https://github.com/citation-style-language/abbreviations). 5 | 6 | ### Note 7 | Use with Jeremy Van Cleve's abbreviateJournalTitles.pl for Bibdesk [Applescript](http://haldane.uky.edu/wordpress/wp-content/software/Toggle%20Journal%20Abbreviation.scpt) 8 | 9 | -------------------------------------------------------------------------------- /Scripts/journal_abbreviations/combineJournalLists.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Python script for combining several journal abbreviation lists 4 | # and producing an alphabetically sorted list. If the same journal 5 | # names are repeated, only the version found last is retained. 6 | # 7 | # Usage: combineJournalLists.py outfile infile1 infile2 ... 8 | 9 | import sys 10 | import fnmatch 11 | import os 12 | 13 | outFile = sys.argv[1] 14 | dictionary = dict() 15 | 16 | for i in range(2,len(sys.argv)): 17 | count = 0 18 | f = open(sys.argv[i], "r") 19 | for line in f: 20 | if "=" in line: 21 | if line[0] != "#": 22 | count = count+1 23 | parts = line.partition("=") 24 | dictionary[parts[0].strip()] = line.strip() 25 | f.close() 26 | print sys.argv[i]+": "+str(count) 27 | 28 | print "Combined key count: "+str(len(dictionary)) 29 | 30 | f = open(outFile, "w") 31 | for key in sorted(dictionary.iterkeys()): 32 | f.write(dictionary[key]+"\n") 33 | f.close() 34 | -------------------------------------------------------------------------------- /VivaldiCustomizations/Vimium/vimium.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Many CSS class names in this file use the verbose "vimiumXYZ" as the class name. This is so we don't 3 | * use the same CSS class names that the page is using, so the page's CSS doesn't mess with the style of our 4 | * Vimium dialogs. 5 | * 6 | * The z-indexes of Vimium elements are very large, because we always want them to show on top. We know 7 | * that Chrome supports z-index values up to about 2^31. The values we use are large numbers approaching 8 | * that bound. However, we must leave headroom for link hints. Hint marker z-indexes start at 2140000001. 9 | */ 10 | 11 | /* 12 | * This vimiumReset class can be added to any of our UI elements to give it a clean slate. This is useful in 13 | * case the page has declared a broad rule like "a { padding: 50px; }" which will mess up our UI. These 14 | * declarations contain more specifiers than necessary to increase their specificity (precedence). 15 | */ 16 | .vimiumReset, 17 | div.vimiumReset, 18 | span.vimiumReset, 19 | table.vimiumReset, 20 | a.vimiumReset, 21 | a:visited.vimiumReset, 22 | a:link.vimiumReset, 23 | a:hover.vimiumReset, 24 | td.vimiumReset, 25 | tr.vimiumReset { 26 | background: none; 27 | border: none; 28 | bottom: auto; 29 | box-shadow: none; 30 | color: black; 31 | cursor: auto; 32 | display: inline; 33 | float: none; 34 | font-family : "PragmataPro", "Helvetica", "Arial", sans-serif; 35 | font-size: inherit; 36 | font-style: normal; 37 | font-variant: normal; 38 | font-weight: normal; 39 | height: auto; 40 | left: auto; 41 | letter-spacing: 0; 42 | line-height: 100%; 43 | margin: 0; 44 | max-height: none; 45 | max-width: none; 46 | min-height: 0; 47 | min-width: 0; 48 | opacity: 1; 49 | padding: 0; 50 | position: static; 51 | right: auto; 52 | text-align: left; 53 | text-decoration: none; 54 | text-indent: 0; 55 | text-shadow: none; 56 | text-transform: none; 57 | top: auto; 58 | vertical-align: baseline; 59 | white-space: normal; 60 | width: auto; 61 | z-index: 2140000000; /* Vimium's reference z-index value. */ 62 | } 63 | 64 | thead.vimiumReset, tbody.vimiumReset { 65 | display: table-header-group; 66 | } 67 | 68 | tbody.vimiumReset { 69 | display: table-row-group; 70 | } 71 | 72 | /* Linkhints CSS */ 73 | 74 | div.internalVimiumHintMarker { 75 | position: absolute; 76 | display: block; 77 | top: -1px; 78 | left: -1px; 79 | white-space: nowrap; 80 | overflow: hidden; 81 | font-size: 11px; 82 | padding: 1px 3px 0px 3px; 83 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFF785), color-stop(100%,#FFC542)); 84 | border: solid 1px #C38A22; 85 | border-radius: 3px; 86 | box-shadow: 0px 3px 7px 0px rgba(0, 0, 0, 0.3); 87 | } 88 | 89 | div.internalVimiumHintMarker span { 90 | color: #302505; 91 | font-family: Helvetica, Arial, sans-serif; 92 | font-weight: bold; 93 | font-size: 11px; 94 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); 95 | } 96 | 97 | div.internalVimiumHintMarker > .matchingCharacter { 98 | color: #D4AC3A; 99 | } 100 | 101 | div > .vimiumActiveHintMarker span { 102 | color: #A07555 !important; 103 | } 104 | 105 | /* Input hints CSS */ 106 | 107 | div.internalVimiumInputHint { 108 | position: absolute; 109 | display: block; 110 | background-color: rgba(255, 247, 133, 0.3); 111 | border: solid 1px #C38A22; 112 | pointer-events: none; 113 | } 114 | 115 | div.internalVimiumSelectedInputHint { 116 | background-color: rgba(255, 102, 102, 0.3); 117 | border: solid 1px #993333 !important; 118 | } 119 | 120 | div.internalVimiumSelectedInputHint span { 121 | color: white !important; 122 | } 123 | 124 | /* Frame Highlight Marker CSS*/ 125 | div.vimiumHighlightedFrame { 126 | position: fixed; 127 | top: 0px; 128 | left: 0px; 129 | width: 100%; 130 | height: 100%; 131 | padding: 0px; 132 | margin: 0px; 133 | border: 5px solid yellow; 134 | box-sizing: border-box; 135 | pointer-events: none; 136 | } 137 | 138 | /* Help Dialog CSS */ 139 | 140 | iframe.vimiumHelpDialogFrame { 141 | background-color: rgba(10,10,10,0.6); 142 | padding: 0px; 143 | top: 0px; 144 | left: 0px; 145 | width: 100%; 146 | height: 100%; 147 | display: block; 148 | position: fixed; 149 | border: none; 150 | z-index: 2139999997; /* Three less than the reference value. */ 151 | } 152 | 153 | div#vimiumHelpDialogContainer { 154 | opacity:1.0; 155 | background-color:white; 156 | border:2px solid #b3b3b3; 157 | border-radius:6px; 158 | width: 840px; 159 | max-width: calc(100% - 100px); 160 | max-height: calc(100% - 100px); 161 | margin: 50px auto; 162 | overflow-y: auto; 163 | overflow-x: auto; 164 | } 165 | 166 | div#vimiumHelpDialog { 167 | min-width: 600px; 168 | padding:8px 12px; 169 | } 170 | 171 | span#vimiumTitle, span#vimiumTitle span, span#vimiumTitle * { font-size:20px; } 172 | #vimiumTitle { 173 | display: block; 174 | line-height: 130%; 175 | white-space: nowrap; 176 | } 177 | td.vimiumHelpDialogTopButtons { 178 | width: 100%; 179 | text-align: right; 180 | } 181 | #helpDialogOptionsPage, #helpDialogWikiPage { 182 | font-size: 14px; 183 | padding-left: 5px; 184 | padding-right: 5px; 185 | } 186 | div.vimiumColumn { 187 | width:50%; 188 | float:left; 189 | font-size: 11px; 190 | line-height: 130%; 191 | } 192 | 193 | div.vimiumColumn tr { 194 | display: table-row; 195 | } 196 | 197 | div.vimiumColumn td { 198 | display: table-cell; 199 | font-size: 11px; 200 | line-height: 130%; 201 | } 202 | div.vimiumColumn table, div.vimiumColumn td, div.vimiumColumn tr { padding:0; margin:0; } 203 | div.vimiumColumn table { width:100%; table-layout:auto; } 204 | div.vimiumColumn td { vertical-align:top; padding:1px; } 205 | div#vimiumHelpDialog div.vimiumColumn tr > td:first-of-type { 206 | /* This is the "key" column, e.g. "j", "gg". */ 207 | font-family:"PragmataPro",Helvetica,Arial,sans-serif; 208 | font-size:14px; 209 | text-align:right; 210 | white-space:nowrap; 211 | } 212 | span.vimiumHelpDialogKey { 213 | background-color: rgb(243,243,243); 214 | color: rgb(33,33,33); 215 | margin-left: 2px; 216 | padding-top: 1px; 217 | padding-bottom: 1px; 218 | padding-left: 4px; 219 | padding-right: 4px; 220 | border-radius: 3px; 221 | border: solid 1px #ccc; 222 | border-bottom-color: #bbb; 223 | box-shadow: inset 0 -1px 0 #bbb; 224 | font-family: monospace; 225 | font-size: 11px; 226 | } 227 | /* Make the description column as wide as it can be. */ 228 | div#vimiumHelpDialog div.vimiumColumn tr > td:nth-of-type(3) { width:100%; } 229 | div#vimiumHelpDialog div.vimiumDivider { 230 | display: block; 231 | height:1px; 232 | width:100%; 233 | margin:10px auto; 234 | background-color:#9a9a9a; 235 | } 236 | div#vimiumHelpDialog td.vimiumHelpSectionTitle { 237 | padding-top:3px; 238 | font-family:"PragmataPro",Helvetica,Arial,sans-serif; 239 | font-size:16px; 240 | font-weight:bold; 241 | } 242 | div#vimiumHelpDialog td.vimiumHelpDescription { 243 | font-family:"PragmataPro",Helvetica,Arial,sans-serif; 244 | font-size:14px; 245 | } 246 | div#vimiumHelpDialog span.vimiumCopyCommandNameName { 247 | font-style: italic; 248 | cursor: pointer; 249 | font-size: 12px; 250 | } 251 | /* Advanced commands are hidden by default until you show them. */ 252 | div#vimiumHelpDialog tr.advanced { display: none; } 253 | div#vimiumHelpDialog.showAdvanced tr.advanced { display: table-row; } 254 | div#vimiumHelpDialog div.advanced td:nth-of-type(3) { color: #555; } 255 | div#vimiumHelpDialog a.closeButton { 256 | font-family:"courier new"; 257 | font-weight:bold; 258 | color:#555; 259 | text-decoration:none; 260 | font-size:24px; 261 | position: relative; 262 | top: 3px; 263 | padding-left: 5px; 264 | } 265 | div#vimiumHelpDialog a { 266 | text-decoration: underline; 267 | } 268 | 269 | div#vimiumHelpDialog a.closeButton:hover { 270 | color:black; 271 | -webkit-user-select:none; 272 | } 273 | div#vimiumHelpDialogFooter { 274 | display: block; 275 | position: relative; 276 | margin-bottom: 37px; 277 | } 278 | table.helpDialogBottom { 279 | width:100%; 280 | } 281 | td.helpDialogBottomRight { 282 | width:100%; 283 | float:right; 284 | text-align: right; 285 | } 286 | td.helpDialogBottomRight, td.helpDialogBottomLeft { 287 | padding: 0px; 288 | } 289 | div#vimiumHelpDialogFooter * { font-size:10px; } 290 | a#toggleAdvancedCommands, span#help-dialog-tip { 291 | position: relative; 292 | top: 19px; 293 | white-space: nowrap; 294 | font-size: 10px; 295 | } 296 | a:link.vimiumHelDialogLink, a:visited.vimiumHelDialogLink, 297 | a:hover.vimiumHelDialogLink, a:active.vimiumHelDialogLink, a#toggleAdvancedCommands { 298 | color:#2f508e; 299 | text-decoration: underline; 300 | } 301 | 302 | /* Vimium HUD CSS */ 303 | 304 | div.vimiumHUD { 305 | display: block; 306 | position: fixed; 307 | bottom: 0px; 308 | /* Keep this far enough to the right so that it doesn't collide with the "popups blocked" chrome HUD. */ 309 | right: 0px; 310 | color: black; 311 | height: auto; 312 | min-height: 13px; 313 | width: auto; 314 | max-width: 400px; 315 | min-width: 150px; 316 | text-align: left; 317 | background-color: #ebebeb; 318 | padding: 3px 3px 2px 3px; 319 | margin: 0; 320 | border: 1px solid #b3b3b3; 321 | border-radius: 4px 4px 0 0; 322 | font-family: "Lucida Grande", "Arial", "Sans"; 323 | font-size: 12px; 324 | text-shadow: 0px 1px 2px #FFF; 325 | line-height: 1.0; 326 | } 327 | 328 | iframe.vimiumHUDFrame { 329 | display: block; 330 | background: none; 331 | position: fixed; 332 | bottom: 0px; 333 | right: 150px; 334 | height: 20px; 335 | min-height: 20px; 336 | width: 450px; 337 | min-width: 150px; 338 | padding: 0px; 339 | margin: 0; 340 | border: none; 341 | z-index: 2149999998; /* Two less than the reference value. */ 342 | opacity: 0; 343 | } 344 | 345 | div.vimiumHUD span#hud-find-input, div.vimiumHUD span#hud-match-count { 346 | display: inline; 347 | outline: none; 348 | white-space: nowrap; 349 | overflow-y: hidden; 350 | } 351 | 352 | div.vimiumHUD span#hud-find-input br { 353 | display: none; 354 | } 355 | 356 | div.vimiumHUD span#hud-find-input * { 357 | display: inline; 358 | white-space: nowrap; 359 | } 360 | 361 | body.vimiumFindMode ::selection { 362 | background: #ff9632; 363 | } 364 | 365 | /* Vomnibar Frame CSS */ 366 | 367 | iframe.vomnibarFrame { 368 | background-color: transparent; 369 | padding: 0px; 370 | overflow: hidden; 371 | 372 | display: block; 373 | position: fixed; 374 | width: calc(80% + 20px); /* same adjustment as in pages/vomnibar.coffee */ 375 | min-width: 400px; 376 | height: calc(100% - 70px); 377 | top: 70px; 378 | left: 50%; 379 | margin: 0 0 0 -40%; 380 | border: none; 381 | font-family: sans-serif; 382 | z-index: 2149999998; /* Two less than the reference value. */ 383 | } 384 | 385 | div.vimiumFlash { 386 | box-shadow: 0px 0px 4px 2px #4183C4; 387 | padding: 1px; 388 | background-color: transparent; 389 | position: absolute; 390 | z-index: 2140000000; 391 | } 392 | 393 | /* UIComponent CSS */ 394 | iframe.vimiumUIComponentHidden { 395 | display: none; 396 | } 397 | 398 | iframe.vimiumUIComponentVisible { 399 | display: block; 400 | } 401 | 402 | iframe.vimiumUIComponentReactivated { 403 | border: 5px solid yellow; 404 | } 405 | -------------------------------------------------------------------------------- /VivaldiCustomizations/Vimium/vomnibar.css: -------------------------------------------------------------------------------- 1 | 2 | /* Vomnibar CSS */ 3 | 4 | #vomnibar ol, #vomnibar ul { 5 | list-style: none; 6 | display: none; 7 | } 8 | 9 | #vomnibar { 10 | display: block; 11 | position: fixed; 12 | width: calc(100% - 20px); /* adjusted to keep border radius and box-shadow visible*/ 13 | /*min-width: 400px; 14 | top: 70px; 15 | left: 50%;*/ 16 | top: 8px; 17 | left: 8px; 18 | /*margin: 0 0 0 -40%;*/ 19 | font-family: sans-serif; 20 | 21 | background: black; 22 | text-align: left; 23 | border-radius: 4px; 24 | box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.8); 25 | border: 1px solid black; 26 | z-index: 2139999999; /* One less than hint markers and the help dialog (see ../content_scripts/vimium.css). */ 27 | } 28 | 29 | #vomnibar input { 30 | color: white; 31 | font-family: 'PragmataPro', Helvetica, Arial, sans-serif; 32 | font-size: 20px; 33 | height: 34px; 34 | margin-bottom: 0; 35 | padding: 4px; 36 | background-color: black; 37 | border-radius: 3px; 38 | border: 1px solid black; 39 | box-shadow: black 0px 0px 1px; 40 | width: 100%; 41 | outline: none; 42 | box-sizing: border-box; 43 | } 44 | 45 | #vomnibar .vomnibarSearchArea { 46 | display: block; 47 | padding: 10px; 48 | background-color: black; 49 | border-radius: 4px 4px 0 0; 50 | border-bottom: 1px solid black; 51 | } 52 | 53 | #vomnibar ul { 54 | background-color: black; 55 | border-radius: 0 0 4px 4px; 56 | list-style: none; 57 | padding: 10px 0; 58 | padding-top: 0; 59 | } 60 | 61 | #vomnibar li { 62 | border-bottom: 1px solid black; 63 | line-height: 1.1em; 64 | padding: 7px 10px; 65 | font-size: 16px; 66 | color: black; 67 | position: relative; 68 | display: list-item; 69 | margin: auto; 70 | } 71 | 72 | #vomnibar li:last-of-type { 73 | border-bottom: none; 74 | } 75 | 76 | #vomnibar li .vomnibarTopHalf, #vomnibar li .vomnibarBottomHalf { 77 | display: block; 78 | overflow: hidden; 79 | } 80 | 81 | #vomnibar li .vomnibarBottomHalf { 82 | font-size: 15px; 83 | margin-top: 3px; 84 | padding: 2px 0; 85 | } 86 | 87 | #vomnibar li .vomnibarIcon { 88 | background-position-y: center; 89 | background-size: 16px; 90 | background-repeat: no-repeat; 91 | padding-left: 20px; 92 | } 93 | 94 | #vomnibar li .vomnibarSource { 95 | color: red; 96 | margin-right: 4px; 97 | } 98 | #vomnibar li .vomnibarRelevancy { 99 | position: absolute; 100 | right: 0; 101 | top: 0; 102 | padding: 5px; 103 | background-color: white; 104 | color: black; 105 | font-family: monospace; 106 | width: 100px; 107 | overflow: hidden; 108 | } 109 | 110 | #vomnibar li .vomnibarUrl { 111 | white-space: nowrap; 112 | color: red; 113 | font-size: 10; 114 | } 115 | 116 | #vomnibar li .vomnibarMatch { 117 | font-weight: bold; 118 | color: orangered; 119 | } 120 | 121 | #vomnibar li em, #vomnibar li .vomnibarTitle { 122 | color: whitesmoke; 123 | margin-left: 4px; 124 | font-weight: normal; 125 | font-size: 16; 126 | } 127 | #vomnibar li em { font-style: italic; } 128 | #vomnibar li em .vomnibarMatch, #vomnibar li .vomnibarTitle .vomnibarMatch { 129 | color: orangered; 130 | } 131 | 132 | #vomnibar li.vomnibarSelected { 133 | background-color: darkred; 134 | font-weight: normal; 135 | } 136 | 137 | #vomnibarInput::selection { 138 | /* This is the light grey color of the vomnibar border. */ 139 | /* background-color: black; */ 140 | 141 | /* This is the light blue color of the vomnibar selected item. */ 142 | /* background-color: #BBCEE9; */ 143 | 144 | /* This is a considerably lighter blue than Vimium blue, which seems softer 145 | * on the eye for this purpose. */ 146 | background-color: black; 147 | } 148 | 149 | .vomnibarInsertText { 150 | } 151 | 152 | .vomnibarNoInsertText { 153 | visibility: hidden; 154 | } 155 | -------------------------------------------------------------------------------- /VivaldiCustomizations/browser.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vivaldi 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /VivaldiCustomizations/custom.css: -------------------------------------------------------------------------------- 1 | /* extensions-wrapper configurations */ 2 | #footer .extensions-wrapper { 3 | -webkit-app-region: no-drag; 4 | } 5 | #footer .extensions-wrapper img { 6 | height: 12px; 7 | width: 12px; 8 | } 9 | #footer .extensions-wrapper .button-badge { 10 | max-height: 10px; 11 | max-width: 10px; 12 | min-width: 5px; 13 | } 14 | #footer .toggle-extensions-group svg { 15 | vertical-align: middle; 16 | } 17 | #footer .extensions-wrapper .dragging-cancelled, #footer .toggle-extensions-group { 18 | border-right: none; 19 | } 20 | 21 | /* background colors */ 22 | #footer .extensions-wrapper .dragging-cancelled, #footer .toggle-extensions-group { 23 | background-color: transparent; 24 | } 25 | #footer .extensions-wrapper span:hover, #footer .toggle-extensions-group:hover { 26 | background-color: var(--colorBgDark); 27 | } 28 | 29 | /* popup */ 30 | #footer .extensionaction .popup.top::before, #footer .extensionaction .popup.top::after { 31 | display: none !important; 32 | } 33 | #footer .extensionaction { 34 | position: absolute; 35 | top: unset !important; 36 | bottom: 35px; 37 | } 38 | 39 | /* footer button alignment */ 40 | /*#footer button.button-toolbar-small { 41 | height: 16px; 42 | } 43 | #footer input.button-toolbar-small:last-of-type { 44 | margin-right: 6px; 45 | } 46 | #footer button.button-toolbar-small svg { 47 | padding-top: 4px; 48 | } 49 | #footer .tilingtoggle { 50 | padding-top: 1px; 51 | }*/ 52 | 53 | 54 | #footer .zoom-control { 55 | display: none !important; 56 | } 57 | 58 | #footer { 59 | display: flex !important; 60 | justify-content: flex-end !important; 61 | height: 16px !important; 62 | line-height: 16px !important; 63 | font-size: 10px !important; 64 | font-family: PragmataPro !important; 65 | } 66 | 67 | #footer .button-toolbar-small { 68 | display: none !important; 69 | } 70 | 71 | #footer .status-toolbar { 72 | display: none !important; 73 | } 74 | 75 | #footer .status-toolbar { 76 | display: none !important; 77 | } 78 | 79 | #footer #status_info > span { 80 | font-size: 10px !important; 81 | color: orange !important; 82 | margin: auto 3px auto auto !important; 83 | flex: 1 !important; 84 | font-family: PragmataPro !important; 85 | justify-content: right !important; 86 | text-align: end !important; 87 | } 88 | 89 | #browser #main, #browser #footer { 90 | background: black !important; 91 | } 92 | 93 | 94 | 95 | .mac #header { 96 | min-height: 16px !important; 97 | } 98 | 99 | 100 | .mac #tabs-container.top { 101 | padding-left: 0 !important; 102 | padding-right: 0 !important; 103 | } 104 | 105 | .tabs-top:not(.mac).color-behind-tabs-on #tabs-container, 106 | .tabs-top.mac.hasfocus.color-behind-tabs-on #tabs-container { 107 | background-image: none !important; 108 | } 109 | 110 | #tabs-container { 111 | height:16px !important; 112 | background-color: #000000 !important; 113 | color: #000000 !important; 114 | fill: #000000 !important; 115 | border: 0 solid #000000 !important; 116 | z-index: 0; 117 | } 118 | 119 | .color-behind-tabs-on #tabs-container { 120 | background-color: #000000 !important; 121 | color: #000000 !important; 122 | fill: #000000 !important; 123 | } 124 | 125 | .tab { 126 | background-color: #000000 !important; 127 | color: #b3b3b3 !important; 128 | } 129 | 130 | .tab.active { 131 | background-color: #000000 !important; 132 | color: #FFFFFF !important; 133 | } 134 | 135 | .tab-header { 136 | margin-top: -6px !important; 137 | } 138 | 139 | .button-tabbar.newtab { 140 | display: none !important; 141 | } 142 | 143 | 144 | #tabs-container .trash { 145 | display: none !important; 146 | } 147 | 148 | #tabs-container.top { 149 | padding-top: 0 !important; 150 | border-color: #000000 !important; 151 | } 152 | 153 | /*Tabs span top bar*/ 154 | #tabs-container.top .tab-strip { 155 | display: flex !important; 156 | background-color: #000000 !important; 157 | } 158 | 159 | #tabs-container.top .tab-strip span { 160 | flex: 1 1 0 !important; 161 | display: flex !important; 162 | } 163 | 164 | #tabs-container.top .tab-position { 165 | flex: 1 1 0 !important; 166 | position: relative !important; 167 | left: auto !important; 168 | top: auto !important; 169 | height: 30px !important; 170 | } 171 | 172 | .tab-position .tab-header .title { 173 | font-family: 'PragmataPro' !important; 174 | font-size: 7pt !important; 175 | text-align: center !important; 176 | display: block !important; 177 | } 178 | 179 | .tab-position .tab.active .tab-header .favicon { 180 | background-color: transparent !important; 181 | } 182 | 183 | #tabs-container.top .tab-position .tab .favicon, 184 | #tabs-container.top .tab-position .tab .close { 185 | flex: 0 0 10px !important; 186 | margin-top: auto !important; 187 | margin-bottom: auto !important; 188 | border-radius: 0 !important; 189 | min-width: 10px !important; 190 | height: 10px !important; 191 | background-position: 50% 50% !important; 192 | background-repeat: no-repeat !important; 193 | background-size: 10px !important; 194 | } 195 | 196 | 197 | 198 | 199 | 200 | #switch button:first-of-type { 201 | display: none !important; 202 | } 203 | 204 | #switch button.webviewbtn img { 205 | display: none !important; 206 | } 207 | #switch button.preferences { 208 | display: none !important; 209 | } 210 | #switch button:first-of-type { 211 | display: none !important; 212 | } 213 | #switch button.preferences { 214 | display: none !important; 215 | } 216 | 217 | .addressfield { 218 | display: none !important; 219 | } 220 | 221 | .__web-inspector-hide-shortcut__, .__web-inspector-hide-shortcut__ *, .__web-inspector-hidebefore-shortcut__::before, .__web-inspector-hideafter-shortcut__::after { 222 | display: none !important; 223 | } 224 | 225 | .toolbar .button-toolbar { 226 | min-width: 14px !important; 227 | height: 14px !important; 228 | } 229 | 230 | .toolbar-addressbar .button-toolbar.browserAction-button img, .toolbar-mailbar .button-toolbar.browserAction-button img { 231 | width: 14px !important; 232 | } 233 | 234 | .button-badge { 235 | height: 7px !important; 236 | min-width: 7px !important; 237 | } 238 | 239 | .button-toolbar.home { display: none !important;} 240 | .button-toolbar.back { display: none !important;} 241 | .button-toolbar.reload { display: none !important;} 242 | .button-toolbar.forward { display: none !important;} 243 | 244 | #switch { 245 | display: unset !important; 246 | } -------------------------------------------------------------------------------- /VivaldiCustomizations/custom.js: -------------------------------------------------------------------------------- 1 | setTimeout(function wait() { 2 | var wrapper = document.querySelector(".toolbar-addressbar.toolbar > .extensions-wrapper"); 3 | var footer = document.getElementById('footer'); 4 | if (wrapper != null) { 5 | footer.style = "height: 27px"; 6 | footer.appendChild(wrapper); 7 | } 8 | else { 9 | setTimeout(wait, 300); 10 | } 11 | }, 300); -------------------------------------------------------------------------------- /VivaldiCustomizations/vivaldi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | APP_PATH="/Applications/Vivaldi.app/Contents/Versions/" 4 | VERSION_NAME=`ls ${APP_PATH}` 5 | VIVALDI_PATH="${APP_PATH}${VERSION_NAME}/Vivaldi Framework.framework/Versions/Current/Resources/vivaldi/" 6 | 7 | cp -f custom.css "$VIVALDI_PATH/style/custom.css" 8 | cp -f custom.js "$VIVALDI_PATH/custom.js" 9 | cp -f browser.html "$VIVALDI_PATH/browser.html" --------------------------------------------------------------------------------