read formats from json

This commit is contained in:
rlx 2011-01-06 06:11:02 +00:00
commit 6ce6c39774
2 changed files with 22 additions and 26 deletions

View file

@ -78,7 +78,7 @@
{"id": "country", "title": "Country", "width": 120, "type": "string"},
{"id": "year", "title": "Year", "width": 60, "type": "year"},
{"id": "language", "title": "Language", "width": 120, "type": "string"},
{"id": "runtime", "title": "Runtime", "width": 60, "type": "integer", "format": "duration"},
{"id": "runtime", "title": "Runtime", "width": 60, "type": "integer", "format": {"type": "duration", "args": [0, "medium"]}},
{"id": "writer", "title": "Writer", "width": 180, "type": "person"},
{"id": "producer", "title": "Producer", "width": 180, "type": "person"},
{"id": "cinematographer", "title": "Cinematographer", "width": 180, "type": "person"},
@ -88,12 +88,12 @@
{"id": "numberofkeywords", "title": "Number of Keywords", "width": 60, "key": "keyword", "type": "length"},
{"id": "wordsinsummary", "title": "Words in Summary", "width": 60, "key": "summary", "type": "words"},
{"id": "wordsintrivia", "title": "Words in Trivia", "width": 60, "key": "trivia", "type": "words"},
{"id": "releasedate", "title": "Release Date", "width": 120, "type": "date"},
{"id": "budget", "title": "Budget", "width": 90, "type": "integer", "format": "currency"},
{"id": "gross", "title": "Gross", "width": 90, "type": "integer", "format": "currency"},
{"id": "profit", "title": "Profit", "width": 90, "type": "integer", "format": "currency"},
{"id": "rating", "title": "Rating", "width": 60, "type": "float"},
{"id": "votes", "title": "Votes", "width": 60, "type": "integer"},
{"id": "releasedate", "title": "Release Date", "width": 120, "type": "date", "format": {"type": "date", "args": ["%a, %b %e, %Y"]}},
{"id": "budget", "title": "Budget", "width": 90, "type": "integer", "format": {"type": "currency", "args": ["$", 0]}},
{"id": "gross", "title": "Gross", "width": 90, "type": "integer", "format": {"type": "currency", "args": ["$", 0]}},
{"id": "profit", "title": "Profit", "width": 90, "type": "integer", "format": {"type": "currency", "args": ["$", 0]}},
{"id": "rating", "title": "Rating", "width": 60, "type": "float", "format": {"type": "percent", "args": [10, 2]}},
{"id": "votes", "title": "Votes", "width": 60, "type": "integer", "format": {"type": "percent", "args": [403824, 2]}},
{"id": "id", "title": "ID", "width": 90, "type": "string"},
{"id": "aspectratio", "title": "Aspect Ratio", "width": 90, "type": "float"},
{"id": "duration", "title": "Duration", "width": 90, "type": "float"},