create dist
This commit is contained in:
22
src/python/python_fmpi/src/MANIFEST.in
Normal file
22
src/python/python_fmpi/src/MANIFEST.in
Normal file
@@ -0,0 +1,22 @@
|
||||
# file GENERATED by distutils, do NOT edit
|
||||
setup.py
|
||||
fmpi/__init__.py
|
||||
fmpi/config/__init__.py
|
||||
fmpi/config/commands.py
|
||||
fmpi/config/stream_list.py
|
||||
fmpi/config/ui_config.py
|
||||
fmpi/ui/__init__.py
|
||||
fmpi/ui/console/__init__.py
|
||||
fmpi/ui/console/console.py
|
||||
fmpi/ui/console/button/__init__.py
|
||||
fmpi/ui/console/button/click_button.py
|
||||
fmpi/ui/console/button/console_button.py
|
||||
fmpi/ui/console/button/exit_button.py
|
||||
fmpi/ui/console/button/play_stream_button.py
|
||||
fmpi/ui/console/menu/__init__.py
|
||||
fmpi/ui/console/menu/console_menu.py
|
||||
fmpi/ui/console/menu/stream_list_menu.py
|
||||
fmpi/utility/__init__.py
|
||||
fmpi/utility/subprocess_dict.py
|
||||
fmpi/web_streams/__init__.py
|
||||
fmpi/web_streams/web_stream_player.py
|
||||
@@ -1,4 +1,6 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
KEY_WEB_STREAM_PLAYER_COMMAND = "web_stream_player_command"
|
||||
VALUE_WEB_STREAM_PLAYER_COMMAND_MPLAYER = "mplayer"
|
||||
|
||||
web_stream_commands = {"web_stream_player_command": "mplayer"}
|
||||
web_stream_commands = {KEY_WEB_STREAM_PLAYER_COMMAND: VALUE_WEB_STREAM_PLAYER_COMMAND_MPLAYER}
|
||||
9
src/python/python_fmpi/src/config/ui_config.py
Normal file
9
src/python/python_fmpi/src/config/ui_config.py
Normal file
@@ -0,0 +1,9 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
KEY_UI_TYPE = "ui_type"
|
||||
VALUE_UI_TYPE_CONSOLE = "CONSOLE"
|
||||
|
||||
|
||||
ui_settings = {
|
||||
KEY_UI_TYPE: VALUE_UI_TYPE_CONSOLE
|
||||
}
|
||||
6
src/python/python_fmpi/src/fmpi/config/commands.py
Normal file
6
src/python/python_fmpi/src/fmpi/config/commands.py
Normal file
@@ -0,0 +1,6 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
KEY_WEB_STREAM_PLAYER_COMMAND = "web_stream_player_command"
|
||||
VALUE_WEB_STREAM_PLAYER_COMMAND_MPLAYER = "mplayer"
|
||||
|
||||
web_stream_commands = {KEY_WEB_STREAM_PLAYER_COMMAND: VALUE_WEB_STREAM_PLAYER_COMMAND_MPLAYER}
|
||||
6
src/python/python_fmpi/src/fmpi/config/stream_list.py
Normal file
6
src/python/python_fmpi/src/fmpi/config/stream_list.py
Normal file
@@ -0,0 +1,6 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
web_stream_list= {
|
||||
"skaworld": "http://stream.laut.fm/skaworld",
|
||||
"skafari ": "http://stream.laut.fm/skafari"
|
||||
}
|
||||
9
src/python/python_fmpi/src/fmpi/config/ui_config.py
Normal file
9
src/python/python_fmpi/src/fmpi/config/ui_config.py
Normal file
@@ -0,0 +1,9 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
KEY_UI_TYPE = "ui_type"
|
||||
VALUE_UI_TYPE_CONSOLE = "CONSOLE"
|
||||
|
||||
|
||||
ui_settings = {
|
||||
KEY_UI_TYPE: VALUE_UI_TYPE_CONSOLE
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
__author__ = 'dev'
|
||||
from ui.console.button.console_button import ConsoleButton
|
||||
from fmpi.ui.console.button.console_button import ConsoleButton
|
||||
|
||||
SIGNAL_NAME = "click"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
__author__ = 'dev'
|
||||
import urwid
|
||||
|
||||
from ui.console.button.click_button import ClickButton
|
||||
from fmpi.ui.console.button.click_button import ClickButton
|
||||
|
||||
|
||||
class ExitButton(ClickButton):
|
||||
@@ -1,5 +1,5 @@
|
||||
__author__ = 'dev'
|
||||
from ui.console.button.click_button import ClickButton
|
||||
from fmpi.ui.console.button.click_button import ClickButton
|
||||
|
||||
|
||||
class PlayStreamButton(ClickButton):
|
||||
10
src/python/python_fmpi/src/fmpi/ui/console/console.py
Normal file
10
src/python/python_fmpi/src/fmpi/ui/console/console.py
Normal file
@@ -0,0 +1,10 @@
|
||||
__author__ = 'dev'
|
||||
from fmpi.ui.console.menu.stream_list_menu import StreamListMenu
|
||||
|
||||
|
||||
def show_ui():
|
||||
StreamListMenu().show(palette=[('reversed', 'standout', '')])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
show_ui()
|
||||
@@ -1,11 +1,13 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
import urwid
|
||||
|
||||
from ui.console.button.exit_button import ExitButton
|
||||
from ui.console.button.play_stream_button import PlayStreamButton
|
||||
from config.stream_list import web_stream_list as wsl
|
||||
from fmpi.config.stream_list import web_stream_list as wsl
|
||||
from web_streams.web_stream_player import WebStreamPlayer
|
||||
from ui.console.menu.console_menu import ConsoleMenu, FOCUS_MAP_REVERSED
|
||||
from fmpi.ui.console.menu.console_menu import ConsoleMenu, FOCUS_MAP_REVERSED
|
||||
|
||||
|
||||
LISTBOX_TITLE = "Streamlist"
|
||||
|
||||
@@ -22,11 +24,7 @@ class StreamListMenu(ConsoleMenu):
|
||||
body.append(urwid.AttrMap(ExitButton(), None, focus_map=FOCUS_MAP_REVERSED))
|
||||
listbox = urwid.ListBox(urwid.SimpleFocusListWalker(body))
|
||||
|
||||
txt = urwid.AttrMap(urwid.Text(u"Hello World"),None)
|
||||
txtBox = urwid.Pile([txt])
|
||||
txtBox.widget_list.append(txt)
|
||||
|
||||
return urwid.Pile([listbox, txtBox])
|
||||
return listbox
|
||||
|
||||
def _clean_menu(self):
|
||||
if self.__player is not None:
|
||||
1
src/python/python_fmpi/src/fmpi/utility/__init__.py
Normal file
1
src/python/python_fmpi/src/fmpi/utility/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__author__ = 'dev'
|
||||
1
src/python/python_fmpi/src/fmpi/web_streams/__init__.py
Normal file
1
src/python/python_fmpi/src/fmpi/web_streams/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__author__ = 'dev'
|
||||
@@ -1,15 +1,18 @@
|
||||
__author__ = 'dev'
|
||||
import subprocess
|
||||
from config.stream_list import web_stream_list as wsl
|
||||
from config.commands import web_stream_commands as wcmd
|
||||
from utility.subprocess_dict import SubprocessDict
|
||||
|
||||
from config.commands import web_stream_commands as wcmd, KEY_WEB_STREAM_PLAYER_COMMAND
|
||||
|
||||
from fmpi.config.stream_list import web_stream_list as wsl
|
||||
from fmpi.utility.subprocess_dict import SubprocessDict
|
||||
|
||||
|
||||
SDT_OUT_DST = open('/dev/null', 'w')
|
||||
SDT_ERR_DST = open('/dev/null', 'w')
|
||||
|
||||
|
||||
class WebStreamPlayer:
|
||||
|
||||
def __init__(self, player_command=wcmd["web_stream_player_command"], stream_list=wsl):
|
||||
def __init__(self, player_command=wcmd[KEY_WEB_STREAM_PLAYER_COMMAND], stream_list=wsl):
|
||||
self.__player_command = player_command
|
||||
self.__stream_list = stream_list
|
||||
self.__process_list = SubprocessDict()
|
||||
8
src/python/python_fmpi/src/main.py
Normal file
8
src/python/python_fmpi/src/main.py
Normal file
@@ -0,0 +1,8 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
from config.ui_config import ui_settings as ui_setting, KEY_UI_TYPE, VALUE_UI_TYPE_CONSOLE
|
||||
import ui.console.console as console
|
||||
|
||||
if __name__ == '__main__':
|
||||
if ui_setting[KEY_UI_TYPE] == VALUE_UI_TYPE_CONSOLE:
|
||||
console.show_ui()
|
||||
14
src/python/python_fmpi/src/setup.py
Normal file
14
src/python/python_fmpi/src/setup.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from distutils.core import setup
|
||||
|
||||
setup(
|
||||
name='python_fmpi',
|
||||
version='0.0.1',
|
||||
packages=['fmpi', 'fmpi.ui', 'fmpi.ui.console', 'fmpi.ui.console.menu', 'fmpi.ui.console.button', 'fmpi.config',
|
||||
'fmpi.utility', 'fmpi.web_streams'],
|
||||
package_dir={'': 'src'},
|
||||
url='none',
|
||||
license='none',
|
||||
author='dev',
|
||||
author_email='none',
|
||||
description='none'
|
||||
)
|
||||
@@ -1,7 +0,0 @@
|
||||
__author__ = 'dev'
|
||||
import sys
|
||||
sys.path.append("/home/dev/projects/fmpi/src/python/python_fmpi/src")
|
||||
from ui.console.menu.stream_list_menu import StreamListMenu
|
||||
|
||||
if __name__ == '__main__':
|
||||
StreamListMenu().show(palette=[('reversed', 'standout', '')])
|
||||
Reference in New Issue
Block a user