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') schema_path = pkg_datapath('templates', 'songbook_schema.yml')
with encoding.open_read(schema_path) as schema_file: with encoding.open_read(schema_path) as schema_file:
schema_struct = yaml.load(schema_file) schema_struct = yaml.load(schema_file)
schema_struct = utils.remove_keys(schema_struct, ['_description'])
utils.validate_yaml_schema(raw_songbook, schema_struct) utils.validate_yaml_schema(raw_songbook, schema_struct)
def _set_datadir(self): def _set_datadir(self):

7
patacrep/data/templates/default.tex

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

2
patacrep/data/templates/songbook_schema.yml

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

1
patacrep/templates.py

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

Loading…
Cancel
Save