Commit bee213c2 authored by Robert Czechowski's avatar Robert Czechowski
Browse files

cleanup config

parent d4d11615
//#![feature(extern_prelude)]
#[macro_use] #[macro_use]
extern crate iron; extern crate iron;
#[macro_use] #[macro_use]
...@@ -113,22 +111,7 @@ fn read_contest(p: &path::PathBuf) -> Option<Contest> { ...@@ -113,22 +111,7 @@ fn read_contest(p: &path::PathBuf) -> Option<Contest> {
let mut contents = String::new(); let mut contents = String::new();
file.read_to_string(&mut contents).unwrap(); file.read_to_string(&mut contents).unwrap();
configreader_yaml::parse_yaml(&contents, p.file_name().to_owned()?.to_str()?, &format!("{}/", p.parent().unwrap().to_str()?)) // unwrap_or("./")? configreader_yaml::parse_yaml(&contents, p.file_name().to_owned()?.to_str()?, &format!("{}/", p.parent().unwrap().to_str()?))
/*let mut contest = Contest::new("./".to_string(), "blub.json".to_string(), "Wettbewerb IX".to_string(), 45, true, None, None);
let mut taskgroup = Taskgroup::new("Lustige Aufgabe".to_string());
let mut task = Task::new("blub".to_string(), 1);
taskgroup.tasks.push(task);
let mut task = Task::new("blub2".to_string(), 4);
taskgroup.tasks.push(task);
contest.taskgroups.push(taskgroup);
let mut taskgroup = Taskgroup::new("Lustige Aufgabe3".to_string());
let mut task = Task::new("blub3".to_string(), 2);
taskgroup.tasks.push(task);
let mut task = Task::new("blub4".to_string(), 3);
taskgroup.tasks.push(task);
contest.taskgroups.push(taskgroup);
Some(contest)*/
} }
fn get_all_contest_info(task_dir: &str) -> Vec<Contest> { fn get_all_contest_info(task_dir: &str) -> Vec<Contest> {
......
...@@ -6,10 +6,10 @@ public_listing: true ...@@ -6,10 +6,10 @@ public_listing: true
tasks: tasks:
"Aufgabe 1": "blub" "Aufgabe 1": "blub"
"Aufgabe 2": ["tasks/task2a", "tasks/task2b", "tasks/task3"] "Aufgabe 2": ["task2a", "task2b", "task3"]
"Aufgabe 3": "Aufgabe 3":
"blub/": {stars: 1} "blub/": {stars: 1}
"blub/index.html": {stars: 3} "blub/index.html": {stars: 3}
"tasks/task3": {stars: 5} "task3": {stars: 5}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment