# Path: kano_world/functions.py
# def login_using_token():
#     if is_registered():
#         return True, None
#     return False, _("User is not logged in")
# 
# Path: kano_world/share.py
# def upload_share(file_path, title, app_name):
#     glob_session = get_glob_session()
#     if not glob_session:
#         return False, _("You are not logged in!")
# 
#     return glob_session.upload_share(file_path, title, app_name)


import sys
import os
from pprint import pprint
from kano.utils import run_cmd
from kano_world.functions import login_using_token
from kano_world.share import upload_share
#!/usr/bin/env python

# upload-share.py
#
# Copyright (C) 2014, 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
#
#


if __name__ == '__main__' and __package__ is None:
    dir_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    if dir_path != '/usr':
        sys.path.insert(1, dir_path)



# Path: kano_world/functions.py
# def login_using_token():
#     if is_registered():
#         return True, None
#     return False, _("User is not logged in")
# 
# Path: kano_world/share.py
# def upload_share(file_path, title, app_name):
#     glob_session = get_glob_session()
#     if not glob_session:
#         return False, _("You are not logged in!")
# 
#     return glob_session.upload_share(file_path, title, app_name)


# Path: tools/upload-share.py
import sys
import os
from pprint import pprint
from kano.utils import run_cmd
from kano_world.functions import login_using_token
from kano_world.share import upload_share

#!/usr/bin/env python

# upload-share.py
#
# Copyright (C) 2014, 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
#
#


if __name__ == '__main__' and __package__ is None:
    dir_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    if dir_path != '/usr':
        sys.path.insert(1, dir_path)



success, value = login_using_token()