Jump to content

sin

Member
  • Posts

    1
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    sin reacted to cdpath in Anki Search   
    ScreenShot
     

     
    GitHub
     
    -  https://github.com/cdpath/anki_search
     
    Why
     
    - Searching in Anki Desktop breaks for a long time, so I make this helper workflow as a workaround.
     
    Thanks
     
    @deanishe for great https://github.com/deanishe/alfred-workflow
  2. Like
    sin reacted to deanishe in Google Drive   
    https://console.developers.google.com/apis/dashboard
     
     
    https://github.com/azai91/alfred-drive-workflow/blob/master/src/google-drive.rb#L35
  3. Like
    sin reacted to deanishe in syntax to trigger workflow from Karabiner-Elements json file?   
    Just the quotation marks. This should be correct:
    "shell_command": "/usr/bin/osascript -e 'tell application \"Alfred 3\" to run trigger \"SafariTabs-ext\" in workflow \"com.my.SearchTabs\"'"  
  4. Haha
    sin reacted to katie in Skimmer: PDF actions for Skim   
    Thank you for the working script for exporting to markdown, @dfay.
     
    I'm wondering how difficult it would be to change this script for my own workflow. My goal is the following: 
    Export into separate markdown files for each annotation. Ideally, these would be named automatically, for e.g., using the first 5 words of the contents, and placed in a folder named by the pdf name.  Include the name of the colour of the highlight from Skim in each file (so it can be used to filter/process them). Edit: ✓ I couldn't figure out how to capture and name colours, but, I've managed the important part of indicating the colour of the highlight. As a plus, it should work with any used colour, not just set values.  Include the link back to the PDF in each file. I know it was mentioned that this could be done by adding back in that functionality, but I could not figure this out. This one is just a perk though. Edit: ✓ Essentially, I am in this situation because my original workflow relied on a script that did exactly this. It would take a Skim pdf, export all annotations as separate files to DevonThink (but to .rtf, not markdown). I cannot find it anywhere - all links to it are broken (e.g. https://wippp.com/home/writing-workflows-processing-annotations-all-roads-lead-to-skim). My workflow was based around the idea the zettelkasten information management - so preparing little chunks of information that can be further processed and filtered and summarized, etc. 
     
    From what I can tell, this could potentially be accomplished in two ways: (1) starting with this script for exporting to markdown, but instead parsing the clipboard to create different files and adding colour information (2) using a Skim export template, which can apparently identify colour (https://sourceforge.net/p/skim-app/feature-requests/1417/) and include a link to specific annotations in the pdf (https://sourceforge.net/p/skim-app/feature-requests/1520/). I found a template that exports to markdown (https://github.com/semicolonsnet/skim-templates), but I'm really new to this and couldn't get it to function. It's not clear to me whether separate files can be created.
     
    For those of you who are experts in coding - would you be familiar enough with this to know which approach (applescript or template) I should attempt? And how future-proof would it be? I'm kicking myself for getting used to this workflow. Once it broke, I procrastinated on trying to fix it and now I have a bunch of read pdf's that are just stuck. I'm not sure if I should give up on this entirely and just figure out a new academic workflow.
     
    I'm definitely not expecting or asking anyone to do this for me. I'm just hoping that someone might have an opinion on which approach would be more sustainable and a worthwhile use of my time to pursue. Or if there's another simpler approach that would work best. I've also found that it is surprisingly difficult to try to change my method of reading/highlighting, so I'm open to hearing about other people's academic workflows!
     
    Thank you for reading!
     
    Katie
     
    Edit: I forgot to mention that I found a similar script (https://github.com/achamess/skim_to_md_script) but it relies on the user having Papers3.app and I use BibDesk.  
     
    Update (2021-01-09): You can add a link back to the specific page in Skim, by adding the following in the appropriate sections of the script: 
    set tURL to "<$skimURL?><$skimURL/></$skimURL?>" -- not sure if only the middle tag is necessary but it works like this set skimURL to format n using template tURL -- convert template text to actual url -- Then add " [" & correctedPage & "](" & skimURL & ")" to format as a markdown link under each type of supported highlight  
    Update (2021-03-06 ): You can add the colour of the highlight, by adding the following in the appropriate sections of the script: 
    set tColour to "<$color.hexString?><$color.hexString/></$color.hexString?>" -- then add this to the export part: set noteString to noteString & "> " & "<mark style=\"background-color: " & noteColour & "\">" & formattedNote & "</mark>" & " (p. [" & correctedPage & "](" & skimURL & "))" & LF & LF  
  5. Thanks
    sin reacted to DrLulz in Skimmer: PDF actions for Skim   
    Sure thing.
     
    The default favorite colors in Skim, after a fresh install, are equal to the colors shown above (in smarg19's 2.0 update post), so if you like those colors then there is nothing that needs to be done to use this script. 
     
     
    However, some might find Skim's default highlight colors too strong, where the color distracts from the text. If the user chooses to change these colors (shown below), then the script I posted will use these colors instead (no Applescript changes needed unless you want to change a bullet style, or the orange and red text for favorite colors 5 and 6; see below).
     
    The leftmost color is the main bullet,
    The 2nd color is the first indented bullet,
    The 3rd color is the second indentation,
    The 4th color is text under said bullets
    The 5th color I use for Pharmacology, so I have a pill as a bullet, and have colored the text orange
    The 6th color I use for lecture tips, so there is a red exclamation point for a bullet, and red text after export. (see my earlier post)
     
     
    These are the favorite colors:
     

     
     
     
    If you don't see this color bar then:
     

     
     
    If you want to change these Favorite Colors then:
     

     
     
    If you want to change the exported text color seen in Evernote (Has nothing to do with Skim's favorite colors) then change this line in the script:
     
    (Note: This is what I use for Pharmacology)
     
    --Highlight Note HTML FAV5
    property highlight5_prefix : "<p>"
    property highlight5_title_wrap_front : "<strong>"
    property highlight5_title_wrap_back : "</strong>"
    property highlight5_body_wrap_front : "<font color=\""
    property highlight5_body_text_color : "#CC7A29" ---------------- CHANGE THIS
    property highlight5_end_quote : "\">"
    property highlight5_body_wrap_back : "</font> "
    property highlight5_page_wrap_front : ""
    property highlight5_page_abbr : ""
    property highlight5_page_wrap_back : ""
     
     
    If you want to change the bullets then change these in the script:
          hope that clarifies. I've said it before, and probably will again, but thank you x1000 smarg19 for this amazing utility.        EDIT: I just remembered that if a person is reading this then they're more than likely using Alfred (duh!), so if a person wishes to speed up the switching between favorite colors then set up a workflow with 6 hotkeys (I use ⌥+1, ⌥+2, ⌥+3, ⌥+Q, ⌥+W, ⌥+E; ⌥ = Option) linked to 6 run scripts (osascript). The Applescript is below.       Applescript:   tell application "Skim"
    activate
     
    set rgba to favorite colors
    set theColor to item 1 of rgba ------ CHANGE THE 1 TO 2 FOR THE SECOND FAVORITE COLOR, ETC, ETC
     
    if (count of documents) is 0 then
    return
    end if
     
    set theTool to the tool of the front document
     
    if theTool is highlight note tool then
    set default note colors to {highlight note color:theColor}
    else
    beep
    end if
    end tell
     
  6. Like
    sin reacted to vitor in Sequential Paste — Paste previous clipboard entries in order   
    Usage

    Paste clipboard entries sequentially via the Hotkey or Snippet Trigger. Each call pastes the preceding clipboard entry.

    Copying from the most recent item restarts if the last paste is older than the timeout minutes defined in the Workflow’s Configuration. A force reset can be triggered with the paste keyword by pressing ⌘⌥⌃↩.



    ⤓ Install on the Alfred Gallery | Source
     
  7. Like
    sin reacted to gingerbeardman in Can Alfred search the Mac Keychain   
    So I finally put together a workaround for this using UI scripting.
     
    https://www.gingerbeardman.com/alfred/Search Keychain.alfredworkflow
     
    Accept keyword and argument Launch Keychain Access via Alfred Workflow AppleScript focus search box, enter argument, copy password prompt, quit Keychain Access (user enter password and confirm) The core of it is the AppleScript:
    on alfred_script(q) activate application "Keychain Access" tell application "System Events" tell process "Keychain Access" set value of text field 1 of group 2 of toolbar 1 of window "Keychain Access" to q click button 1 of text field 1 of group 2 of toolbar 1 of window "Keychain Access" click menu item "Copy Password to Clipboard" of menu 1 of menu bar item "Edit" of menu bar 1 end tell end tell quit application "Keychain Access" end alfred_script  
×
×
  • Create New...