Created
June 9, 2017 18:25
-
-
Save weynhamz/9772fde19abc65e4ce08e6c73f3f27db to your computer and use it in GitHub Desktop.
A snippet of javascript runs in the console that exports the workflowy content to todo.txt format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_name(h) { | |
if (h.getParent().getProjectId() != 'None') { | |
var p = get_name(h.getParent()); | |
return p + ' > ' + h.getName(); | |
} else { | |
return h.getName(); | |
} | |
} | |
jQuery('.bullet').each(function () { | |
var h = project_tree.getProjectReferenceFromDomProject($(this).getProject()); | |
var n = ''; | |
if (h.isCompleted()) { | |
n = 'x'; | |
var v = new Date(h.getCompletedDateString()); | |
n = n + ' ' + v.toISOString().slice(0, 10) + ' '; | |
} | |
var y = new Date(h.getLastModifiedDateString()); | |
n = n + y.toISOString().slice(0, 10) + ' ' + get_name(h); | |
console.log(n); | |
if (h.getNote()) { | |
console.log('# ' + get_name(h)); | |
console.log(h.getNote()); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment