-
Notifications
You must be signed in to change notification settings - Fork 0
/
MindManager.psm1
31 lines (27 loc) · 957 Bytes
/
MindManager.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function Get-MMTopic {
begin {
}
process {
$ret = @(osascript "./osaBridge/Get-MMTopic.scpt")
if ($ret[0].startsWith("ERROR:")) {
Write-Error $ret[0] -ErrorAction Stop
}
else {
$ret | ForEach-Object {
if ($_.Length -ne 0) {
$line = $_.Remove($_.Length - 1).Remove(0, 1)
$topicProps = $line -split "`",`""
[PSCustomObject][ordered]@{
PSTypeName = "MMTopic"
Index = $topicProps[0]
ID = $topicProps[1]
ParentID = $topicProps[2]
FillColor = $topicProps[3]
TextColor = $topicProps[4]
Name = [System.Web.HttpUtility]::UrlDecode($topicProps[5])
}
}
}
}
}
}