Bläddra i källkod

Use qualified function names

Alois Mahdal 9 år sedan
förälder
incheckning
949fabac52
1 ändrade filer med 16 tillägg och 15 borttagningar
  1. 16
    15
      src/ffoo/saturnin_urimagic.sh

+ 16
- 15
src/ffoo/saturnin_urimagic.sh Visa fil

4
 ffoo import pretty
4
 ffoo import pretty
5
 
5
 
6
 
6
 
7
-filter_exprs() {
7
+__saturnin_urimagic__filter_exprs() {
8
     #
8
     #
9
     # Hack expressions like bug = 123 out of the text
9
     # Hack expressions like bug = 123 out of the text
10
     #
10
     #
16
 }
16
 }
17
 
17
 
18
 
18
 
19
-filter_ids() {
19
+__saturnin_urimagic__filter_ids() {
20
     #
20
     #
21
     # Hack doer-like id's (ID#123) out of the text
21
     # Hack doer-like id's (ID#123) out of the text
22
     #
22
     #
28
 }
28
 }
29
 
29
 
30
 
30
 
31
-filter_tags() {
31
+__saturnin_urimagic__filter_tags() {
32
     #
32
     #
33
     # Hack "tags" like bug123 out of the text
33
     # Hack "tags" like bug123 out of the text
34
     #
34
     #
37
 }
37
 }
38
 
38
 
39
 
39
 
40
-filter_kws() {
40
+__saturnin_urimagic__filter_kws() {
41
     #
41
     #
42
     # Hack out lines that look like kw expressions
42
     # Hack out lines that look like kw expressions
43
     #
43
     #
45
 }
45
 }
46
 
46
 
47
 
47
 
48
-filter_uris() {
48
+__saturnin_urimagic__filter_uris() {
49
     #
49
     #
50
     # Hack URIs out of the text.
50
     # Hack URIs out of the text.
51
     #
51
     #
57
 }
57
 }
58
 
58
 
59
 
59
 
60
-find_uri() {
60
+saturnin_urimagic__scan() {
61
     #
61
     #
62
     # Scan stdin for what looks like URI, ID or keyword
62
     # Scan stdin for what looks like URI, ID or keyword
63
     #
63
     #
73
     # if you are brave, open all URIs.
73
     # if you are brave, open all URIs.
74
     #
74
     #
75
     local d=$(mktemp -d -t saturnin_urimagic.XXXXXXXX)
75
     local d=$(mktemp -d -t saturnin_urimagic.XXXXXXXX)
76
+    local p=__saturnin_urimagic__
76
     pushd $d >&/dev/null
77
     pushd $d >&/dev/null
77
         ##
78
         ##
78
         # heat up and fill pipes
79
         # heat up and fill pipes
83
         ##
84
         ##
84
         # process each pipe *async* by different filter
85
         # process each pipe *async* by different filter
85
         #
86
         #
86
-        < maybe_uris  filter_uris                     > uris &
87
-        < maybe_ids   filter_ids   | id2kw   | kw2uri > uris_from_ids &
88
-        < maybe_exprs filter_exprs | expr2kw | kw2uri > uris_from_exprs &
89
-        < maybe_tags  filter_tags  | tag2kw  | kw2uri > uris_from_tags &
90
-        < maybe_kws   filter_kws   |           kw2uri > uris_from_kws &
87
+        < maybe_uris  ${p}filter_uris                     > uris &
88
+        < maybe_ids   ${p}filter_ids   | ${p}id2kw   | ${p}kw2uri > uris_from_ids &
89
+        < maybe_exprs ${p}filter_exprs | ${p}expr2kw | ${p}kw2uri > uris_from_exprs &
90
+        < maybe_tags  ${p}filter_tags  | ${p}tag2kw  | ${p}kw2uri > uris_from_tags &
91
+        < maybe_kws   ${p}filter_kws   |               ${p}kw2uri > uris_from_kws &
91
         ##
92
         ##
92
         # print result *sync* in correct order
93
         # print result *sync* in correct order
93
         #
94
         #
103
 }
104
 }
104
 
105
 
105
 
106
 
106
-id2kw() {
107
+__saturnin_urimagic__id2kw() {
107
     #
108
     #
108
     # Convert doer-like ID to kw expression
109
     # Convert doer-like ID to kw expression
109
     #
110
     #
111
 }
112
 }
112
 
113
 
113
 
114
 
114
-tag2kw() {
115
+__saturnin_urimagic__tag2kw() {
115
     #
116
     #
116
     # Convert tag to kw expression
117
     # Convert tag to kw expression
117
     #
118
     #
119
 }
120
 }
120
 
121
 
121
 
122
 
122
-expr2kw() {
123
+__saturnin_urimagic__expr2kw() {
123
     #
124
     #
124
     # Convert equal sign expression to kw expression
125
     # Convert equal sign expression to kw expression
125
     #
126
     #
127
 }
128
 }
128
 
129
 
129
 
130
 
130
-kw2uri() {
131
+__saturnin_urimagic__kw2uri() {
131
     #
132
     #
132
     # Turn keyword or query (like "g hello" for google) to URI
133
     # Turn keyword or query (like "g hello" for google) to URI
133
     #
134
     #