template: Add initial putty template.

This commit is contained in:
Dylan Araps 2017-06-29 18:12:41 +10:00
parent 35920c7164
commit e92bce4fe9
2 changed files with 26 additions and 5 deletions

View File

@ -5,6 +5,7 @@ import os
import pathlib
from pywal.settings import CACHE_DIR, TEMPLATE_DIR
from pywal import util
def template(colors, input_file):
@ -17,11 +18,8 @@ def template(colors, input_file):
with open(template_file) as file:
template_data = file.readlines()
# Merge both dicts.
colors["colors"].update(colors["special"])
# Format the markers.
template_data = "".join(template_data).format(**colors["colors"])
template_data = "".join(template_data).format(**colors)
# Export the template.
with open(export_file, "w") as file:
@ -30,5 +28,9 @@ def template(colors, input_file):
def export_all_templates(colors):
"""Export all template files."""
# Merge both dicts.
colors["colors"].update(colors["special"])
# pylint: disable=W0106
[template(colors, file.name) for file in os.scandir(TEMPLATE_DIR)]
[template(colors["colors"], file.name)
for file in os.scandir(TEMPLATE_DIR)]

View File

@ -0,0 +1,19 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]]
"colour0"="{color0}"
"colour1"="{color1}"
"colour2"="{color2}"
"colour3"="{color3}"
"colour4"="{color4}"
"colour5"="{color5}"
"colour6"="{color6}"
"colour7"="{color7}"
"colour8"="{color8}"
"colour9"="{color9}"
"colour10"="{color10}"
"colour11"="{color11}"
"colour12"="{color12}"
"colour13"="{color13}"
"colour14"="{color14}"
"colour15"="{color15}"