-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d72b4e1
commit d72e069
Showing
229 changed files
with
18,208 additions
and
2,701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
*.pyc | ||
vendor/ | ||
test.py | ||
_old/ | ||
test-* | ||
__pycache__ | ||
tool* | ||
_import.py | ||
_scripts | ||
_res/ | ||
poetry.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"python.analysis.extraPaths": [ | ||
"./vendor/cherryadmin", | ||
"./vendor/conti", | ||
"./vendor/nebula-core", | ||
"./vendor/nebula-hub", | ||
"./vendor/nxtools", | ||
"./vendor/python-osc", | ||
"./vendor/themis2", | ||
"./vendor/unidecode" | ||
], | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.pydocstyleEnabled": false, | ||
"python.linting.pylintEnabled": false, | ||
"python.linting.enabled": true, | ||
"files.exclude": { | ||
"nx/api/__pycache__": true, | ||
"nx/__pycache__": true, | ||
"cli/__pycache__": true, | ||
"hub/__pycache__": true, | ||
"services/play/__pycache__": true, | ||
"services/worker/__pycache__": true, | ||
"services/watch/__pycache__": true, | ||
"services/psm/__pycache__": true, | ||
"services/meta/__pycache__": true, | ||
"services/mesg/__pycache__": true, | ||
"services/import/__pycache__": true, | ||
"services/conv/__pycache__": true, | ||
"services/__pycache__": true, | ||
"services/broker/__pycache__": true, | ||
"services/play/conti/__pycache__": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import cli.run | ||
import cli.adduser | ||
import cli.passwd | ||
import cli.a | ||
import cli.s | ||
import cli.j | ||
import cli.t | ||
import cli.l | ||
|
||
__all__ = ["modules"] | ||
|
||
import cli.run as run | ||
import cli.adduser as adduser | ||
import cli.passwd as passwd | ||
import cli.a as a | ||
import cli.s as s | ||
import cli.j as j | ||
import cli.t as t | ||
import cli.l as l | ||
|
||
|
||
modules = { | ||
"run" : run.run, | ||
"adduser" : adduser.adduser, | ||
"passwd" : passwd.passwd, | ||
"a" : a.a, | ||
"s" : s.s, | ||
"j" : j.j, | ||
"t" : t.t, | ||
"l" : l.l | ||
} | ||
"run": run.run, | ||
"adduser": adduser.adduser, | ||
"passwd": passwd.passwd, | ||
"a": a.a, | ||
"s": s.s, | ||
"j": j.j, | ||
"t": t.t, | ||
"l": l.l, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
from .common import * | ||
import sys | ||
|
||
from nxtools import logging | ||
from nx.objects import User | ||
|
||
|
||
def adduser(*args): | ||
print () | ||
print() | ||
try: | ||
login = input("Login: ").strip() | ||
password = input("Password (will be echoed): ").strip() | ||
is_admin = input("Admin (yes/no): ").strip() | ||
full_name = input("Full name (default: {}): ".format(login)).strip() or login | ||
full_name = input(f"Full name (default: {login}): ").strip() or login | ||
email = input("Email: ").strip() | ||
except KeyboardInterrupt: | ||
print () | ||
print() | ||
logging.warning("Interrupted by user") | ||
sys.exit(0) | ||
u = User() | ||
u["login"] = login | ||
u["full_name"] = full_name | ||
u["email"] = email | ||
u["is_admin"] = 1 if is_admin == "yes" else 0 | ||
u.set_password(password) | ||
u.save() | ||
print () | ||
user = User() | ||
user["login"] = login | ||
user["full_name"] = full_name | ||
user["email"] = email | ||
user["is_admin"] = 1 if is_admin == "yes" else 0 | ||
user.set_password(password) | ||
user.save() | ||
print() | ||
logging.goodnews("User created") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
from nebula import * | ||
|
||
colored = "\033[{}m{:<8}\033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.