!7 static Web web; static Canvas canvas; static IVar thinkAheadDays = new Var(7); svoid initWeb { web.node("Today"); } p-subst { thinkAheadDays = persistentVar("Think ahead this many days", thinkAheadDays!); web = persistentObject("Web", Web); web.useCLParse = false; web.onNewLabel.add(voidfunc(WebNode node, O label) { processNode(node); change(); }); initWeb(); canvas = showCAL(webToCAL(web), 650, 450); calcOnConceptChanges(1000, r { canvas = showCAL(webToCAL(web), canvas) }, false); botWithCommandList("Current Day."); } answer { if "make days" { makeDays(); ret "OK"; } } svoid makeDays { WebNode day = web.node("Today"); Calendar now = Calendar.getInstance(); S date = englishMonthName(now.get(Calendar.MONTH)+1) + " " + now.get(Calendar.DAY_OF_MONTH); S origDate = get(day.labels, 1); if (notNullAndDifferent(origDate, date)) fail(); day.addLabel(date); /*for (int n = 1; n <= thinkAheadDays!; n++) { WebNode next = web_followForwardRelation(day, "Next day"); if (next == null) next = web.node(" }*/ } svoid processNode(WebNode node) { if (node.hasLabel("Day")) processDay(node); } svoid processDay(WebNode day) { web_copyForwardRelations(web, "Every day", day, "I should"); }