mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 12:42:25 +00:00
Entry point for parsing theme metadata
This commit is contained in:
parent
8ba7258db9
commit
3eb18a416a
3 changed files with 48 additions and 2 deletions
|
|
@ -54,6 +54,7 @@ func KittyToolEntryPoints(root *cli.Command) {
|
|||
diff.EntryPoint(root)
|
||||
// themes
|
||||
themes.EntryPoint(root)
|
||||
themes.ParseEntryPoint(root)
|
||||
// __pytest__
|
||||
pytest.EntryPoint(root)
|
||||
// __hold_till_enter__
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ type ThemeMetadata struct {
|
|||
Author string `json:"author"`
|
||||
}
|
||||
|
||||
func parse_theme_metadata(path string) (*ThemeMetadata, map[string]string, error) {
|
||||
func ParseThemeMetadata(path string) (*ThemeMetadata, map[string]string, error) {
|
||||
var in_metadata, in_blurb, finished_metadata bool
|
||||
ans := ThemeMetadata{}
|
||||
settings := map[string]string{}
|
||||
|
|
@ -816,7 +816,7 @@ func (self *Themes) Filtered(is_ok func(*Theme) bool) *Themes {
|
|||
}
|
||||
|
||||
func (self *Themes) AddFromFile(path string) (*Theme, error) {
|
||||
m, conf, err := parse_theme_metadata(path)
|
||||
m, conf, err := ParseThemeMetadata(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue