Browse Source

Remove _description key

pull/184/head
Oliverpool 9 years ago
parent
commit
33eded681f
  1. 1
      patacrep/build.py
  2. 7
      patacrep/data/templates/default.tex
  3. 2
      patacrep/data/templates/songbook_schema.yml
  4. 1
      patacrep/templates.py

1
patacrep/build.py

@ -57,7 +57,6 @@ class Songbook(object):
schema_path = pkg_datapath('templates', 'songbook_schema.yml')
with encoding.open_read(schema_path) as schema_file:
schema_struct = yaml.load(schema_file)
schema_struct = utils.remove_keys(schema_struct, ['_description'])
utils.validate_yaml_schema(raw_songbook, schema_struct)
def _set_datadir(self):

7
patacrep/data/templates/default.tex

@ -23,19 +23,20 @@ schema:
type: //rec
required:
title:
_description: _("Title")
type: //str
author:
_description: _("Author")
type: //str
optional:
classoptions:
_description: _("LaTeX class options")
type: //arr
contents: //str
default:
title: "Guitar songbook"
author: "The Patacrep Team"
description.en:
title: "Title"
author: "Author"
classoptions: "LaTeX class options"
(* endvariables -*)
(*- extends "songs.tex" -*)

2
patacrep/data/templates/songbook_schema.yml

@ -47,7 +47,6 @@ required:
- type: //str
value: "solfedge"
authors:
_description: "Comment sont analysés les auteurs"
type: //rec
required:
separators:
@ -69,7 +68,6 @@ required:
contents: //str
- type: //nil
titles:
_description: "Comment sont analysés les titres"
type: //rec
required:
prefix:

1
patacrep/templates.py

@ -148,7 +148,6 @@ class TexBookRenderer(Renderer):
'''Get the default value for the parameter, according to the language.
'''
schema = parameter.get('schema', {}).copy()
schema = utils.remove_keys(schema, ['_description'])
data = utils.DictOfDict(parameter.get('default', {}))
data.update(user_config)

Loading…
Cancel
Save