Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SebGen
spacedirectory
Commits
5197ab57
Commit
5197ab57
authored
Mar 16, 2018
by
SebGen
Browse files
Re-add the lost code for print contact infos of a space
parent
3c8f9a27
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
5197ab57
version 0.0.5:
- Re-add the lost code for print contact infos of a space
version 0.0.4:
- Define a better command line arguments, with subcommands
- Move error printing from CLI to views
...
...
spacedirectory/__init__.py
View file @
5197ab57
...
...
@@ -14,5 +14,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
version
=
"0.0.
4
"
version
=
"0.0.
5
"
description
=
"Get informations about (hacker)spaces from the Spacedirectory (or a Space API)"
spacedirectory/views.py
View file @
5197ab57
...
...
@@ -80,6 +80,39 @@ def print_space_infos(space_required='', print_json=False):
))
print
(
''
)
# Print contact
if
space_required
.
contact
:
contact
=
space_required
.
contact
print
(
color
(
'Contact'
,
style
=
'bold+underline'
))
if
contact
.
phone
:
print
(
color
(
'Phone:'
,
style
=
'bold'
),
contact
.
phone
)
if
contact
.
sip
:
print
(
color
(
'SIP:'
,
style
=
'bold'
),
contact
.
sip
)
if
contact
.
irc
:
print
(
color
(
'IRC:'
,
style
=
'bold'
),
contact
.
irc
)
if
contact
.
jabber
:
print
(
color
(
'Jabber MUC:'
,
style
=
'bold'
),
contact
.
jabber
)
if
contact
.
twitter
:
print
(
color
(
'Twitter:'
,
style
=
'bold'
),
contact
.
twitter
)
if
contact
.
identica
:
print
(
color
(
'Identica/StatusNet/Mastodon:'
,
style
=
'bold'
),
contact
.
identica
)
if
contact
.
mailing_list
:
print
(
color
(
'Mailing list:'
,
style
=
'bold'
),
contact
.
mailing_list
)
if
contact
.
email
:
print
(
color
(
'Email:'
,
style
=
'bold'
),
contact
.
email
)
if
contact
.
issue_email
:
print
(
color
(
'Issue email:'
,
style
=
'bold'
),
contact
.
issue_email
)
print
(
''
)
def
print_spaces_list_names
(
spaces_list
=
''
):
"""Print the list of spaces"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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