-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathImportList.tid
116 lines (111 loc) · 2.69 KB
/
ImportList.tid
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
caption: Import List
title: $:/plugins/OokTech/Bob/ImportList
These are the tiddlers from the most recent import:
<$list
filter='[list[$:/status/Bob/importlist]]'
>
</$list>
These are tiddlers that currently are waiting to be imported:
<$list
filter='[prefix[$:/state/Bob/Import/]limit[1]]'
variable='dummy'
emptyMessage="''There are no tiddlers waiting for import, you can close this tiddler''"
>
<$button>
Accept all
<$list
filter='[prefix[$:/state/Bob/Import/]]'
>
<$list
filter='[<currentTiddler>removeprefix[$:/state/Bob/Import/]]'
variable=NewTitle
>
<$action-setfield
$tiddler=<<currentTiddler>>
$field='title'
$value=<<NewTitle>>
$timestamp='no'
/>
<$action-deletetiddler
$tiddler=<<currentTiddler>>
/>
</$list>
</$list>
</$button>
<$button>
Discard import
<$action-deletetiddler
$filter='[prefix[$:/state/Bob/Import/]]'
/>
</$button>
<table
style='width:100%'
>
<$list
filter='[prefix[$:/state/Bob/Import/]]'
>
<tr>
<td>
<$list
filter='[<currentTiddler>removeprefix[$:/state/Bob/Import/]]'
>
<$view
field='title'
/>
</$list>
</td>
<td>
<$list
filter='[<currentTiddler>removeprefix[$:/state/Bob/Import/]has[title]]'
emptyMessage='No Local Version'
>
<$link>
<$link
to=<<currentTiddler>>
>
Local Version
</$link>
</$link>
</$list>
</td>
<td>
<$link
to=<<currentTiddler>>
>
Import Version
</$link>
</td>
<td>
<$button>
<$list
filter='[<currentTiddler>removeprefix[$:/state/Bob/Import/]has[title]]'
emptyMessage='Discard'
>
Keep original
</$list>
<$action-deletetiddler
$tiddler=<<currentTiddler>>
/>
</$button>
<$button>
Use imported
<$list
filter='[<currentTiddler>removeprefix[$:/state/Bob/Import/]]'
variable=NewTitle
>
<$action-setfield
$tiddler=<<currentTiddler>>
$field='title'
$value=<<NewTitle>>
$timestamp='no'
/>
<$action-deletetiddler
$tiddler=<<currentTiddler>>
/>
</$list>
</$button>
</td>
</tr>
</$list>
</table>
</$list>