import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler())); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen('http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
実行結果
132375 reloading plugin Package Control.Package Control found 2 files for base name Main.sublime-menu Package Control: No updated packages
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
実行結果
132375
mkdir "%USERPROFILE%\AppData\Roaming\Sublime Text 3\Packages\Default" cd "%USERPROFILE%\AppData\Roaming\Sublime Text 3\Packages" copy "Japanize\Context.sublime-menu.jp" "Default\Context.sublime-menu" /Y copy "Japanize\Indentation.sublime-menu.jp" "Default\Indentation.sublime-menu" /Y copy "Japanize\Main.sublime-menu.jp" "Default\Main.sublime-menu" /Y copy "Japanize\Side Bar Mount Point.sublime-menu.jp" "Default\Side Bar Mount Point.sublime-menu" /Y copy "Japanize\Side Bar.sublime-menu.jp" "Default\Side Bar.sublime-menu" /Y copy "Japanize\Tab Context.sublime-menu.jp" "Default\Tab Context.sublime-menu" /Y copy "Japanize\Main.sublime-menu" "User\Main.sublime-menu" /Y
> mkdir D:\Sample
> d: > cd Sample > mkdir sass
#main { width: 600px; p { margin: 0 0 1em; em { color: #f00; } } small { font-size: small; } }
http_path = "/" css_dir = "css" sass_dir = "sass" images_dir = "image" javascripts_dir = "js" output_style = :nested line_comments = false