Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
matograine
silkaj
Commits
b32eda0e
Commit
b32eda0e
authored
Jan 31, 2019
by
Moul
Committed by
Mael
Mar 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mod] #183: display license via pager from Click
parent
347c43df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
silkaj/license.py
silkaj/license.py
+3
-4
No files found.
silkaj/license.py
View file @
b32eda0e
...
...
@@ -16,9 +16,8 @@ along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
"""
import
webbrowser
from
pydoc
import
pager
from
sys
import
exit
from
click
import
command
from
click
import
command
,
echo_via_pager
def
license_approval
(
currency
):
...
...
@@ -38,7 +37,7 @@ def display_license():
language
=
input
(
"In which language would you like to display Ğ1 license [en/fr]? "
)
if
language
==
"en"
:
if
not
webbrowser
.
open
(
"https://duniter.org/en/wiki/g1-license/"
):
pager
(
open
(
"licence-G1/license/license_g1-en.rst"
).
read
())
echo_via_
pager
(
open
(
"licence-G1/license/license_g1-en.rst"
).
read
())
else
:
if
not
webbrowser
.
open
(
"https://duniter.org/fr/wiki/licence-g1/"
):
pager
(
open
(
"licence-G1/license/license_g1-fr-FR.rst"
).
read
())
echo_via_
pager
(
open
(
"licence-G1/license/license_g1-fr-FR.rst"
).
read
())
Write
Preview
Markdown
is supported
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