mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-10 18:48:54 +02:00
Entry point for parsing theme metadata
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user