-
-
Save Mikulas/b17c3e9cc963394818c0 to your computer and use it in GitHub Desktop.
Revisions
-
Mikulas revised this gist
Sep 21, 2015 . 2 changed files with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,3 +10,4 @@ fi wkwp cp "$DIR/live/wp.png" "$DAILY" killall Dock # force wallpaper reload This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,7 @@ require 'wanikani' Wanikani.api_key = 'YOUR_WANIKANI_API_KEY' wanikani_kanji_data = Wanikani::Level.kanji(*(1..60)) def color_for(item) @@ -23,10 +24,10 @@ end kanji = wanikani_kanji_data.sort_by{|x| x['character']}.rotate.map{|x| "<span font_family=\"meiryo\" foreground=\"#{color_for(x)}\">#{x['character']}</span>"} %x{convert -background white \ -border 90 \ -bordercolor white \ -size 2700x1620 \ -font meiryo \ -pointsize 37 \ pango:'#{kanji.join}' \ ~/Dropbox/Images/Wallpapers/wanikani/live/wp.png} -
Mikulas revised this gist
Sep 21, 2015 . 3 changed files with 34 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/usr/bin/env bash DIR="/Users/mikulas/Dropbox/Images/Wallpapers/wanikani" DAILY="$DIR/daily/$(date '+%Y%m%d').png" if [[ -e "$DAILY" ]]; then echo "Already generated today" exit 1 fi wkwp cp "$DIR/live/wp.png" "$DAILY" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>mikulas.wanikani.wallpaper</string> <key>ProgramArguments</key> <array> <string>/Users/mikulas/bin/wkwp-daily</string> </array> <key>StartInterval</key> <integer>3600</integer> </dict> </plist> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,19 +15,18 @@ def color_for(item) when 'guru' then '#882d9e' when 'master' then '#294ddb' when 'enlighten' then '#0093dd' when 'burned' then '#000000' else '#c5c5c5' end end kanji = wanikani_kanji_data.sort_by{|x| x['character']}.rotate.map{|x| "<span font_family=\"meiryo\" foreground=\"#{color_for(x)}\">#{x['character']}</span>"} %x{convert -background white \ -border 80 \ -bordercolor white \ -size 2720x1640 \ -font meiryo \ -pointsize 40 \ pango:'#{kanji.join}' \ ~/Dropbox/Images/Wallpapers/wanikani/live/wp.png} -
Mikulas revised this gist
Sep 21, 2015 . No changes.There are no files selected for viewing
-
Mikulas renamed this gist
Sep 21, 2015 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,8 @@ #!/usr/bin/env ruby # brew install imagemagick --with-pango # gem install wanikani require 'wanikani' Wanikani.api_key = 'YOUR_WANIKANI_API_KEY' -
zosiu created this gist
Jul 25, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/usr/bin/env ruby require 'wanikani' Wanikani.api_key = 'YOUR_WANIKANI_API_KEY' wanikani_kanji_data = Wanikani::Level.kanji(*(1..60)) def color_for(item) case (item['user_specific'] || {})['srs'] when 'apprentice' then '#dd0093' when 'guru' then '#882d9e' when 'master' then '#294ddb' when 'enlighten' then '#0093dd' when 'burned' then '#ffffff' else '#303030' end end kanji = wanikani_kanji_data.sort_by{|x| x['character']}.rotate.map{|x| "<span font_family=\"meiryo\" foreground=\"#{color_for(x)}\">#{x['character']}</span>"} %x{convert -background black \ -border 10 \ -bordercolor black \ -size 1920x1080 \ -font meiryo \ -pointsize 30.6 \ -gravity Center \ pango:'#{kanji.join}' \ ~/Pictures/wanikani_kanji_wallpaper.png}