weft-qda 0.9.6 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. data/lib/weft.rb +16 -1
  2. data/lib/weft/WEFT-VERSION-STRING.rb +1 -1
  3. data/lib/weft/application.rb +17 -74
  4. data/lib/weft/backend.rb +6 -32
  5. data/lib/weft/backend/sqlite.rb +222 -164
  6. data/lib/weft/backend/sqlite/category_tree.rb +52 -48
  7. data/lib/weft/backend/sqlite/database.rb +57 -0
  8. data/lib/weft/backend/sqlite/upgradeable.rb +7 -0
  9. data/lib/weft/broadcaster.rb +90 -0
  10. data/lib/weft/category.rb +139 -47
  11. data/lib/weft/codereview.rb +160 -0
  12. data/lib/weft/coding.rb +74 -23
  13. data/lib/weft/document.rb +23 -10
  14. data/lib/weft/exceptions.rb +10 -0
  15. data/lib/weft/filters.rb +47 -224
  16. data/lib/weft/filters/indexers.rb +137 -0
  17. data/lib/weft/filters/input.rb +118 -0
  18. data/lib/weft/filters/output.rb +101 -0
  19. data/lib/weft/filters/templates.rb +80 -0
  20. data/lib/weft/filters/win32backtick.rb +246 -0
  21. data/lib/weft/query.rb +169 -0
  22. data/lib/weft/wxgui.rb +349 -294
  23. data/lib/weft/wxgui/constants.rb +43 -0
  24. data/lib/weft/wxgui/controls.rb +6 -0
  25. data/lib/weft/wxgui/controls/category_dropdown.rb +192 -0
  26. data/lib/weft/wxgui/controls/category_tree.rb +314 -0
  27. data/lib/weft/wxgui/controls/document_list.rb +97 -0
  28. data/lib/weft/wxgui/controls/multitype_control.rb +37 -0
  29. data/lib/weft/wxgui/{inspectors → controls}/textcontrols.rb +235 -64
  30. data/lib/weft/wxgui/dialogs.rb +144 -41
  31. data/lib/weft/wxgui/error_handler.rb +116 -36
  32. data/lib/weft/wxgui/exceptions.rb +7 -0
  33. data/lib/weft/wxgui/inspectors.rb +61 -208
  34. data/lib/weft/wxgui/inspectors/category.rb +19 -16
  35. data/lib/weft/wxgui/inspectors/codereview.rb +90 -132
  36. data/lib/weft/wxgui/inspectors/document.rb +12 -8
  37. data/lib/weft/wxgui/inspectors/imagedocument.rb +56 -56
  38. data/lib/weft/wxgui/inspectors/query.rb +284 -0
  39. data/lib/weft/wxgui/inspectors/script.rb +147 -23
  40. data/lib/weft/wxgui/lang/en.rb +69 -0
  41. data/lib/weft/wxgui/sidebar.rb +90 -432
  42. data/lib/weft/wxgui/utilities.rb +70 -91
  43. data/lib/weft/wxgui/workarea.rb +150 -43
  44. data/share/icons/category.ico +0 -0
  45. data/share/icons/category.xpm +109 -0
  46. data/share/icons/codereview.ico +0 -0
  47. data/share/icons/codereview.xpm +54 -0
  48. data/share/icons/d_and_c.xpm +126 -0
  49. data/share/icons/document.ico +0 -0
  50. data/share/icons/document.xpm +70 -0
  51. data/share/icons/project.ico +0 -0
  52. data/share/icons/query.ico +0 -0
  53. data/share/icons/query.xpm +56 -0
  54. data/{lib/weft/wxgui → share/icons}/search.xpm +0 -0
  55. data/share/icons/weft.ico +0 -0
  56. data/share/icons/weft.xpm +62 -0
  57. data/share/icons/weft16.ico +0 -0
  58. data/share/icons/weft32.ico +0 -0
  59. data/share/templates/category_plain.html +18 -0
  60. data/share/templates/codereview_plain.html +18 -0
  61. data/share/templates/document_plain.html +13 -0
  62. data/share/templates/document_plain.txt +7 -0
  63. data/test/001-document.rb +55 -36
  64. data/test/002-category.rb +81 -6
  65. data/test/003-code.rb +8 -4
  66. data/test/004-application.rb +13 -34
  67. data/test/005-query_review.rb +139 -0
  68. data/test/006-filters.rb +54 -42
  69. data/test/007-output_filters.rb +113 -0
  70. data/test/009a-backend_sqlite_basic.rb +95 -24
  71. data/test/009b-backend_sqlite_complex.rb +43 -62
  72. data/test/009c_backend_sqlite_bench.rb +5 -10
  73. data/test/053-doc_inspector.rb +46 -0
  74. data/test/055-query_window.rb +50 -0
  75. data/test/all-tests.rb +1 -0
  76. data/test/test-common.rb +19 -0
  77. data/test/testdata/empty.qdp +0 -0
  78. data/test/testdata/simple with space.pdf +0 -0
  79. data/test/testdata/simple.pdf +0 -0
  80. data/weft-qda.rb +40 -7
  81. metadata +74 -14
  82. data/lib/weft/wxgui/category.xpm +0 -26
  83. data/lib/weft/wxgui/document.xpm +0 -25
  84. data/lib/weft/wxgui/inspectors/search.rb +0 -265
  85. data/lib/weft/wxgui/mondrian.xpm +0 -44
  86. data/lib/weft/wxgui/weft16.xpm +0 -31
Binary file
@@ -0,0 +1,109 @@
1
+ /* XPM */
2
+ static char *category[] = {
3
+ /* columns rows colors chars-per-pixel */
4
+ "16 16 87 1",
5
+ " c black",
6
+ ". c #261E13",
7
+ "X c #322B20",
8
+ "o c #342D22",
9
+ "O c #3A332A",
10
+ "+ c #413A2F",
11
+ "@ c #433C32",
12
+ "# c #524B42",
13
+ "$ c #585247",
14
+ "% c #58534B",
15
+ "& c #5B554D",
16
+ "* c #645D53",
17
+ "= c #666056",
18
+ "- c #676158",
19
+ "; c #68645E",
20
+ ": c #6D6963",
21
+ "> c #726C63",
22
+ ", c #746F66",
23
+ "< c #817C74",
24
+ "1 c #8B857B",
25
+ "2 c #8C867E",
26
+ "3 c #8D8880",
27
+ "4 c #8F8E8B",
28
+ "5 c #948E84",
29
+ "6 c #969086",
30
+ "7 c #AEA9A1",
31
+ "8 c #B4B0A9",
32
+ "9 c #B9B4AA",
33
+ "0 c #C2BFB8",
34
+ "q c #CAC6BE",
35
+ "w c #C0C1C2",
36
+ "e c #C3C2C0",
37
+ "r c #C6C4C0",
38
+ "t c #CBCBCA",
39
+ "y c #D4D0C5",
40
+ "u c #D3D2CE",
41
+ "i c #D5D4D1",
42
+ "p c #D9D7D4",
43
+ "a c #DBD9D3",
44
+ "s c #DFDDD7",
45
+ "d c #E2E0DB",
46
+ "f c #E3E0DB",
47
+ "g c #E3E1DB",
48
+ "h c #E6E2DC",
49
+ "j c #E7E3DD",
50
+ "k c #E9E6DF",
51
+ "l c #EAE6DD",
52
+ "z c #EAE7E1",
53
+ "x c #ECE8E0",
54
+ "c c #EDE8E0",
55
+ "v c #EDE9E2",
56
+ "b c #EDEAE2",
57
+ "n c #EEEAE2",
58
+ "m c #EFEBE2",
59
+ "M c #F0ECE3",
60
+ "N c #F0ECE4",
61
+ "B c #F0ECE5",
62
+ "V c #F0EDE5",
63
+ "C c #F0EDE6",
64
+ "Z c #F1EDE6",
65
+ "A c #F1EEE7",
66
+ "S c #F2EEE7",
67
+ "D c #F2EFE7",
68
+ "F c #F2EEE8",
69
+ "G c #F3F0E9",
70
+ "H c #F3F0EA",
71
+ "J c #F3F1EA",
72
+ "K c #F4F1EB",
73
+ "L c #F4F1EC",
74
+ "P c #F6F3EF",
75
+ "I c #F6F4EF",
76
+ "U c #F7F5F1",
77
+ "Y c #F8F6F2",
78
+ "T c #F8F6F3",
79
+ "R c #F9F7F4",
80
+ "E c #F9F8F4",
81
+ "W c #F9F8F6",
82
+ "Q c #FAF9F7",
83
+ "! c #FBFAF8",
84
+ "~ c #FBFBF9",
85
+ "^ c #FCFBFA",
86
+ "/ c #FCFCFB",
87
+ "( c #FDFCFB",
88
+ ") c #FDFCFC",
89
+ "_ c #FDFDFC",
90
+ "` c gray100",
91
+ "' c None",
92
+ /* pixels */
93
+ "''''''''''''''''",
94
+ "''''''''''''''''",
95
+ "''''''''''''''''",
96
+ "''''''...'''''''",
97
+ "'''''.$2>....'''",
98
+ "''''.-UWR0=1*..'",
99
+ "'..@Xq^!EUKDM6.'",
100
+ "'.8T/`!PKVVVmy.'",
101
+ ".<!)!!TKVVmzl5.'",
102
+ ".3RRTKKVmmkhau,.",
103
+ ".@jKKDVVmfpitw%.",
104
+ "'.o>DVzdzse4;O.'",
105
+ "'''.7di:9q#...''",
106
+ "'''.X<&....'''''",
107
+ "''''...'''''''''",
108
+ "''''''''''''''''"
109
+ };
@@ -0,0 +1,54 @@
1
+ /* XPM */
2
+ static char *codereview[] = {
3
+ /* columns rows colors chars-per-pixel */
4
+ "16 16 32 1",
5
+ " c #6C5635",
6
+ ". c #7E6B4E",
7
+ "X c #8A754F",
8
+ "o c #9A7D40",
9
+ "O c #B3903F",
10
+ "+ c #B9953F",
11
+ "@ c #9F854E",
12
+ "# c #9A855C",
13
+ "$ c #9C855A",
14
+ "% c #908067",
15
+ "& c #A78B4C",
16
+ "* c #A48D5B",
17
+ "= c #AE955B",
18
+ "- c #BC9B4C",
19
+ "; c #A99569",
20
+ ": c #C39C3E",
21
+ "> c #C19D46",
22
+ ", c #C7A34B",
23
+ "< c #C3A55A",
24
+ "1 c #CBA958",
25
+ "2 c #C5AC6E",
26
+ "3 c #CFB065",
27
+ "4 c #D7BD7E",
28
+ "5 c #B7A580",
29
+ "6 c #B5AA9A",
30
+ "7 c #C8B483",
31
+ "8 c #DBC38B",
32
+ "9 c #DFCA98",
33
+ "0 c #E3D1A5",
34
+ "q c #EFE4CB",
35
+ "w c #F3EBD8",
36
+ "e c gray100",
37
+ /* pixels */
38
+ " ",
39
+ " #77777772>77777",
40
+ " X;;;;;;;=+;;;;;",
41
+ " X#.666665-66666",
42
+ " ;7%eeeeeq3eeeee",
43
+ " ;7%eeeeeq3eeeee",
44
+ " @<&999994,99999",
45
+ " @<&999994,99999",
46
+ " ;7%eeeeeq3eeeee",
47
+ " ;7%eeeeeq3eeeee",
48
+ " ;7%eeeeeq3eeeee",
49
+ " *2$qqqqq01qqqqq",
50
+ " o>O333331:33333",
51
+ " ;7%eeeeeq3eeeee",
52
+ " ;7%eeeeeq3eeeee",
53
+ " ;7%eeeeew8eeeee"
54
+ };
@@ -0,0 +1,126 @@
1
+ /* XPM */
2
+ static char *d_and_c[] = {
3
+ /* columns rows colors chars-per-pixel */
4
+ "16 16 104 2",
5
+ " c black",
6
+ ". c #261E13",
7
+ "X c #332C21",
8
+ "o c #342D22",
9
+ "O c #40392E",
10
+ "+ c #40392F",
11
+ "@ c #41392E",
12
+ "# c #41392F",
13
+ "$ c #413A30",
14
+ "% c #453F35",
15
+ "& c #4B4439",
16
+ "* c #4C443A",
17
+ "= c #4C453B",
18
+ "- c #4D463C",
19
+ "; c #4C463E",
20
+ ": c #4E473E",
21
+ "> c #504838",
22
+ ", c #585147",
23
+ "< c #5B544C",
24
+ "1 c #5B554C",
25
+ "2 c #5B554D",
26
+ "3 c #5C564D",
27
+ "4 c #5C564E",
28
+ "5 c #5F5B54",
29
+ "6 c #665F56",
30
+ "7 c #736C63",
31
+ "8 c #7E7971",
32
+ "9 c #90876F",
33
+ "0 c #B8A878",
34
+ "q c #B9A979",
35
+ "w c #B9A97A",
36
+ "e c #B9AA7A",
37
+ "r c #BAAA7B",
38
+ "t c #8E8880",
39
+ "y c #8E8981",
40
+ "u c #8F8A82",
41
+ "i c #8F8A83",
42
+ "p c #8F8B83",
43
+ "a c #908B84",
44
+ "s c #928E89",
45
+ "d c #9A958C",
46
+ "f c #A29C92",
47
+ "g c #A19F9C",
48
+ "h c #AFA99F",
49
+ "j c #ABA8A2",
50
+ "k c #ADAAA5",
51
+ "l c #ADAAA6",
52
+ "z c #AAABAB",
53
+ "x c #B1ADA6",
54
+ "c c #C0BCB5",
55
+ "v c #C1BDB6",
56
+ "b c #C2BFB9",
57
+ "n c #CFC4A3",
58
+ "m c #CFC4A4",
59
+ "M c #CFC5A4",
60
+ "N c #C3C0BA",
61
+ "B c #C3C0BB",
62
+ "V c #C4C0BB",
63
+ "C c #D0C5A5",
64
+ "Z c #D0C5A6",
65
+ "A c #D0C6A6",
66
+ "S c #D1C6A6",
67
+ "D c #D1C6A7",
68
+ "F c #D9D1B8",
69
+ "G c #DBD3BB",
70
+ "H c #DBD4BC",
71
+ "J c #DCD4BD",
72
+ "K c #C4C4C5",
73
+ "L c #CCCCC9",
74
+ "P c #D5D1C7",
75
+ "I c #D4D3CF",
76
+ "U c #DDD9D1",
77
+ "Y c #E3DFD7",
78
+ "T c #E6E0CF",
79
+ "R c #E7E1D2",
80
+ "E c #E7E2D1",
81
+ "W c #E4E1D9",
82
+ "Q c #E7E4DD",
83
+ "! c #E8E2D2",
84
+ "~ c #E8E2D3",
85
+ "^ c #EAE6D8",
86
+ "/ c #EBE6D9",
87
+ "( c #EEEADF",
88
+ ") c #E8E5E0",
89
+ "_ c #E9E6E1",
90
+ "` c #E9E7E2",
91
+ "' c #EEEAE0",
92
+ "] c #EFEBE2",
93
+ "[ c #ECEBE7",
94
+ "{ c #F0EDE3",
95
+ "} c #F1EDE5",
96
+ "| c #F1EEE5",
97
+ " . c #F1EEE6",
98
+ ".. c #F2EFE8",
99
+ "X. c #F3F0E9",
100
+ "o. c #F1F0EF",
101
+ "O. c #F5F3ED",
102
+ "+. c #F9F8F5",
103
+ "@. c #FAF9F6",
104
+ "#. c #FBFAF7",
105
+ "$. c #FDFDFC",
106
+ "%. c #FFFFFE",
107
+ "&. c gray100",
108
+ "*. c None",
109
+ /* pixels */
110
+ "*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
111
+ "*.*.*.*.*.. # , . . *.*.*.*.*.*.",
112
+ "*.*.. . . 6 c _ _ = . # . . *.*.",
113
+ "*.. $ s s s # : [ _ X.| P & . *.",
114
+ ". o 4 &.&.&.4 k : Q ..| ] h . *.",
115
+ ". N 4 &.&.&.4 &.k & Y ] ] f . *.",
116
+ "= +.4 ~ D D > o.&.j & U W d X . ",
117
+ "# O.4 J r r 9 4 < < # x I L 8 . ",
118
+ ". 7 3 ! S S D D n ] p g K z % . ",
119
+ "*.. 3 H e e 0 0 r ^ i 5 : . . *.",
120
+ "*.*.1 E S S D S | #.p . . *.*.*.",
121
+ "*.*.1 F r r 0 0 ^ +.i . *.*.*.*.",
122
+ "*.*.1 T S S S n n ( i . *.*.*.*.",
123
+ "*.*.1 F 0 q 0 0 0 Y i . *.*.*.*.",
124
+ "*.*.# N N N N N c c 7 . *.*.*.*.",
125
+ "*.*.. . . . . . . . . . *.*.*.*."
126
+ };
Binary file
@@ -0,0 +1,70 @@
1
+ /* XPM */
2
+ static char *document[] = {
3
+ /* columns rows colors chars-per-pixel */
4
+ "16 16 48 1",
5
+ " c black",
6
+ ". c #261E13",
7
+ "X c #4D463C",
8
+ "o c #4D473D",
9
+ "O c #4E483F",
10
+ "+ c #595248",
11
+ "@ c #5A5349",
12
+ "# c #5A534A",
13
+ "$ c #5A544A",
14
+ "% c #8B7943",
15
+ "& c #A38E4F",
16
+ "* c #B8A878",
17
+ "= c #B9A979",
18
+ "- c #918C86",
19
+ "; c #918D88",
20
+ ": c #928E88",
21
+ "> c #928E89",
22
+ ", c #ACA9A4",
23
+ "< c #ADAAA6",
24
+ "1 c #C5C1BC",
25
+ "2 c #C5C2BE",
26
+ "3 c #C6C3BF",
27
+ "4 c #C7C4C1",
28
+ "5 c #C8C5C2",
29
+ "6 c #C8C6C2",
30
+ "7 c #C8C6C3",
31
+ "8 c #C8C6C4",
32
+ "9 c #D6D4D2",
33
+ "0 c #E3DCCA",
34
+ "q c #E3DDCA",
35
+ "w c #E4DDCB",
36
+ "e c #E6E0CF",
37
+ "r c #E6E0D0",
38
+ "t c #E7E1D1",
39
+ "y c #E7E2D2",
40
+ "u c #E8E2D3",
41
+ "i c #EBE6D9",
42
+ "p c #EBE7DA",
43
+ "a c #F5F2ED",
44
+ "s c #F7F5F1",
45
+ "d c #F9F7F3",
46
+ "f c #FAF8F4",
47
+ "g c #FAF9F6",
48
+ "h c #FBFAF7",
49
+ "j c #FCFBF9",
50
+ "k c #FEFEFE",
51
+ "l c gray100",
52
+ "z c None",
53
+ /* pixels */
54
+ "zzzzzzzzzzzzzzzz",
55
+ "zz.......zzzzzzz",
56
+ "zz.8ll8O..zzzzzz",
57
+ "zz.8ll8:<..zzzzz",
58
+ "zz.8ll8:l<..zzzz",
59
+ "zz.8&&%O--o.zzzz",
60
+ "zz.8uuu9442.zzzz",
61
+ "zz.7&&&&&=g.zzzz",
62
+ "zz.4yttutpg.zzzz",
63
+ "zz.4&&&&=jg.zzzz",
64
+ "zz.4tttwigd.zzzz",
65
+ "zz.4&&&&&=s.zzzz",
66
+ "zz.2wwwqqta.zzzz",
67
+ "zz.X$$$$+++.zzzz",
68
+ "zzzzzzzzzzzzzzzz",
69
+ "zzzzzzzzzzzzzzzz"
70
+ };
Binary file
Binary file
@@ -0,0 +1,56 @@
1
+ /* XPM */
2
+ static char *query[] = {
3
+ /* columns rows colors chars-per-pixel */
4
+ "16 16 34 1",
5
+ " c black",
6
+ ". c #261E13",
7
+ "X c #322A1C",
8
+ "o c #352C1A",
9
+ "O c #362C1B",
10
+ "+ c #3D331E",
11
+ "@ c #413A30",
12
+ "# c #423C32",
13
+ "$ c #4D4125",
14
+ "% c #4E483F",
15
+ "& c #544829",
16
+ "* c #5C4F2D",
17
+ "= c #564B35",
18
+ "- c #645631",
19
+ "; c #62563E",
20
+ ": c #746438",
21
+ "> c #7B6B3C",
22
+ ", c #69645C",
23
+ "< c #77726B",
24
+ "1 c #837240",
25
+ "2 c #867958",
26
+ "3 c #938047",
27
+ "4 c #84807A",
28
+ "5 c #A38E4F",
29
+ "6 c #928E89",
30
+ "7 c #ADAAA6",
31
+ "8 c #BBB8B5",
32
+ "9 c #DAC894",
33
+ "0 c #E7D49D",
34
+ "q c #C8C6C4",
35
+ "w c #EDE8DD",
36
+ "e c #E3E2E1",
37
+ "r c gray100",
38
+ "t c None",
39
+ /* pixels */
40
+ "ttttttt.....tttt",
41
+ "tttttt.O*--+..tt",
42
+ "ttttt.-55555:..t",
43
+ "tttt.$1355555:.t",
44
+ "ttt.X;2=O>5555+.",
45
+ "tt.,;0009;&555-.",
46
+ "t.6q200000;>55-.",
47
+ ".#re;000009O55*.",
48
+ ".4rr@900000;35O.",
49
+ ".6rr8;0000021-.t",
50
+ ".6rrr<;9000;$.tt",
51
+ ".%rrrr8@=2;X.ttt",
52
+ "t.7rrrrreq,.tttt",
53
+ "t..7rrrrr6.ttttt",
54
+ "tt..%664#.tttttt",
55
+ "tttt.....ttttttt"
56
+ };
Binary file
@@ -0,0 +1,62 @@
1
+ /* XPM */
2
+ static char *weft[] = {
3
+ /* columns rows colors chars-per-pixel */
4
+ "16 16 40 1",
5
+ " c black",
6
+ ". c #231F20",
7
+ "X c #302922",
8
+ "o c #302923",
9
+ "O c #332B22",
10
+ "+ c #322B26",
11
+ "@ c #332C23",
12
+ "# c #352E27",
13
+ "$ c #5B503B",
14
+ "% c #5D523E",
15
+ "& c #61512F",
16
+ "* c #615130",
17
+ "= c #625333",
18
+ "- c #65583C",
19
+ "; c #6E5D3A",
20
+ ": c #685C43",
21
+ "> c #695E47",
22
+ ", c #726243",
23
+ "< c #726445",
24
+ "1 c #8A7139",
25
+ "2 c #8B723A",
26
+ "3 c #907B4A",
27
+ "4 c #927E50",
28
+ "5 c #938053",
29
+ "6 c #948155",
30
+ "7 c #96845A",
31
+ "8 c #97865E",
32
+ "9 c #998963",
33
+ "0 c #AB8D46",
34
+ "q c #AB8E46",
35
+ "w c #B9A36D",
36
+ "e c #D0B060",
37
+ "r c #D2B264",
38
+ "t c #D4B569",
39
+ "y c #D5B76D",
40
+ "u c #D7BA72",
41
+ "i c #D8BC75",
42
+ "p c #D9BE77",
43
+ "a c #DABE79",
44
+ "s c None",
45
+ /* pixels */
46
+ "ssssss.ss.ssssss",
47
+ "sssss.=..>.sssss",
48
+ "ssss.4t1>a3.ssss",
49
+ "ssss#wit13qOssss",
50
+ "ss.Os+wit1Os..ss",
51
+ "s.4qO9<wit1.85.s",
52
+ ".:a49pr=wi-8ue=.",
53
+ "s.:9prqO#%8ue1.s",
54
+ "s.9prq&O.8ue1=.s",
55
+ ".>pr0,yq$ue16t&.",
56
+ "s.3qo7ayq;1+w6.s",
57
+ "ss.Os.7pyqos#.ss",
58
+ "ssss.857ayqOssss",
59
+ "ssss.5e=7a4.ssss",
60
+ "sssss.=..:.sssss",
61
+ "ssssss.ss.ssssss"
62
+ };