stn.js
function () {
		var self = this,
			dates = Object.keys(this.parse_tree),
			lines = [];
		
		dates.sort();
		dates.forEach(function (dy, i) {
			var times = Object.keys(self.parse_tree[dy]);
			lines.push(dy);
			times.sort();
			times.forEach(function (tm) {
				var tags = "", maps = "", notes = "", rec;
				
				rec = self.parse_tree[dy][tm];
				if (typeof rec === "string") {
					notes = rec;
				} else {
					if (typeof rec.map !== "undefined" &&
							rec.map !== false) {
						maps = [
							rec.map.project_name,
							rec.map.task
						].join(", ") + "; ";
					}
					if (typeof rec.tags !== "undefined" &&
							rec.tags !== false) {
						tags = rec.tags.join(", ") + "; ";
					}
					if (typeof rec.notes !== "undefined") {
						notes = rec.notes;
					}
				}

				lines.push([
					tm,
					"; ",
					tags,
					maps,
					notes
				].join(""));
			});
		});
		
		return lines.join("\n\n");
	}
function () {
		var self = this,
			dates = Object.keys(this.parse_tree),
			lines = [];
		
		dates.sort();
		dates.forEach(function (dy, i) {
			var times = Object.keys(self.parse_tree[dy]);
			lines.push(dy);
			times.sort();
			times.forEach(function (tm) {
				var tags = "", maps = "", notes = "", rec;
				
				rec = self.parse_tree[dy][tm];
				if (typeof rec === "string") {
					notes = rec;
				} else {
					if (typeof rec.map !== "undefined" &&
							rec.map !== false) {
						maps = [
							rec.map.project_name,
							rec.map.task
						].join(", ") + "; ";
					}
					if (typeof rec.tags !== "undefined" &&
							rec.tags !== false) {
						tags = rec.tags.join(", ") + "; ";
					}
					if (typeof rec.notes !== "undefined") {
						notes = rec.notes;
					}
				}

				lines.push([
					tm,
					"; ",
					tags,
					maps,
					notes
				].join(""));
			});
		});
		
		return lines.join("\n\n");
	}
function ( ) { var self = this , dates = Object . keys ( this . parse_tree ) , lines = [ ] ; dates . sort ( ) ; dates . forEach ( function ( dy , i ) { var times = Object . keys ( self . parse_tree [ dy ] ) ; lines . push ( dy ) ; times . sort ( ) ; times . forEach ( function ( tm ) { var tags = "" , maps = "" , notes = "" , rec ; rec = self . parse_tree [ dy ] [ tm ] ; if ( typeof rec === "string" ) { notes = rec ; } else { if ( typeof rec . map !== "undefined" && rec . map !== false ) { maps = [ rec . map . project_name , rec . map . task ] . join ( ", " ) + "; " ; } if ( typeof rec . tags !== "undefined" && rec . tags !== false ) { tags = rec . tags . join ( ", " ) + "; " ; } if ( typeof rec . notes !== "undefined" ) { notes = rec . notes ; } } lines . push ( [ tm , "; " , tags , maps , notes ] . join ( "" ) ) ; } ) ; } ) ; return lines . join ( "\n\n" ) ; }
Render parse tree as string.
Render parse tree as string .