Jump to content

DrLulz

Member
  • Posts

    62
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Thanks
    DrLulz got a reaction from sin 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
     
  2. Like
    DrLulz got a reaction from arsenty in Anki Workflow   
    My initial attempt at an Anki workflow. More to come after boards (have to put away addicting things such as Alfred ). 
    I welcome any and all suggestions.
     
    Download, GitHub, Packal.
     

     
    Requirements:
    Alfred Anki  
    Commands:
    :anki :aset :apath  
    Anki Terminology:
    Collection = Group of Decks Notes = Collection of Facts Cards = Representation of Facts A note has a one to many relationship with cards, while a card can have only one associated note.  
    Custom Dark Theme:
    Cards (notes) created from the workflow use this theme. Once the first card is created (from within workflow) the theme is available within Anki. The theme comes loaded with jQuery v1.11.2 and plugins Zoom, Magnific Popup, Panzoom (mobile only), and Noty. You can find it in Anki under Tools > Manage Note Types > Alfred Dark. If creating cards from inside Anki the theme has optional fields. Front, F NoteFront side, and optional note Back, B NoteBack side and optional note classThe theme default is to center all text. To adjust text to the left enter left in the class field. NotyShow an optional note on the back-side of the card. Good for reinforcement. httpEntering a URL in this field displays a link in the bottom right on the back-side. Accepts www.site.com without http video - Accepts youtube and vimeo urls. Link to the video is displayed in the upper left on the back-side.  
    Workflow Progression:
     
    1. :aset
    As of now contains two actionable items.Update collection (manual collection refresh) Set Anki collection path (redirects to :apath) :apathThe workflow looks for the Anki collection in the most typical locations. If the path is not found the user will be prompted to enter the path manually.The default directory is /Users/OSX_NAME/Documents/ANKI_USER/collection.anki2 The default ANKI_USER created when Anki is first run is User 1. If you have changed this, enter your Anki user name. If the path is found :apath is only useful if needing to switch between collections. 2. :anki
    Search the collection for a deckSearch by name, or deck id If the deck doesn’t exist you can create a new deck with the query as the title. Select deck Search for notes within selected deckSearch by facts, or tags If the card is not found you can create a basic, two-sided card (cloze additions on the to-do list). The theme is the custom dark theme described above. Select cardCurrently the only option after selecting a card is to modify its tags. tags are entered as #tag1 #tag2 #tag3  
    Credits:
    This workflow uses the python workflow library Alfred-Workflow (by deanishe). The internal structure borrows *heavily* from the FuzzyFolders and Reddit workflows (also by deanishe). The new_card.py was written by (guess who) deanishe, as a demo for my edification.  
    TO-DO:
    Anki Sync File Action to import csv’s Sort decks by new, reviewing, missed More robust display of deck/card statistics Open Anki to a specific deck Choose model (theme) when adding cards Allow for cloze cards Rename decks
×
×
  • Create New...