Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Syncleus
apex-aprs
Commits
57ff1f75
Commit
57ff1f75
authored
Oct 02, 2016
by
Jeffrey Phillips Freeman
💥
Browse files
Colorized the output of the frames.
parent
1546cae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/apex.rb
View file @
57ff1f75
...
...
@@ -10,17 +10,20 @@ module Apex
frame
[
:path
].
each
do
|
path
|
paths
<<
path
.
colorize
(
:cyan
)
end
paths
=
','
.
join
(
paths
)
if
frame
[
'path'
]
formatted_aprs
=
','
.
join
(
[
formatted_aprs
,
paths
])
paths
=
paths
.
join
(
','
)
if
frame
[
:path
]
and
frame
[
:path
].
length
>
0
formatted_aprs
=
[
formatted_aprs
,
paths
]
.
join
(
','
)
end
formatted_aprs
+=
':'
formatted_aprs
+=
frame
[
'
text
'
]
formatted_aprs
+=
frame
[
:
text
]
if
direction_in
click
.
echo
(
click
.
style
(
port_name
+
' << '
,
fg
=
'
magenta
'
)
+
formatted_aprs
)
puts
(
port_name
+
' << '
).
colorize
(
:
magenta
)
+
formatted_aprs
else
click
.
echo
(
click
.
style
(
port_name
+
' >> '
,
fg
=
'magenta'
,
bold
=
True
,
blink
=
True
)
+
formatted_aprs
)
# TODO : make this bold and/or blink
puts
(
port_name
+
' >> '
).
colorize
(
:magenta
)
+
formatted_aprs
end
puts
String
.
modes
puts
String
.
colors
end
def
self
.
main
...
...
@@ -31,7 +34,7 @@ module Apex
while
true
frame
=
aprs_kiss
.
read
if
frame
echo_color_frame
(
frame
)
echo_color_frame
(
frame
,
true
)
else
sleep
(
1
)
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment