Skip to content

Commit dd1d40f

Browse files
committed
getting ready for 0.9.3.11.1 (0.9.3.12-beta1)
1 parent 1ded84c commit dd1d40f

File tree

7 files changed

+89
-6
lines changed

7 files changed

+89
-6
lines changed

Changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2024-10-16 s-n-g
2+
* version 0.9.3.11.1 (BUG FIX) - 0.9.3.12-beta1
3+
* adding -sdd (--show_dirs) command line parameter
4+
* fixing a couple of bugs (some reported by pylint /ruff)
5+
* integrating suggestions by pylint / ruff
6+
* adding a Everforest based system theme
7+
* all keybindings are now customizable (interface not implemented yet)
8+
19
2024-08-30 s-n-g
210
* version 0.9.3.11 (BUG FIX)
311
* recovering from regression after addressing #249

docs/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
187187
<h2 id="changelog">Changelog <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
188188
<pre style="height: 200px;">
189189

190+
2024-10-16 s-n-g
191+
* version 0.9.3.11.1 (BUG FIX) - 0.9.3.12-beta1
192+
* adding -sdd (--show_dirs) command line parameter
193+
* fixing a couple of bugs (some reported by pylint /ruff)
194+
* integrating suggestions by pylint / ruff
195+
* adding a Everforest based system theme
196+
* all keybindings are now customizable (interface not implemented yet)
197+
190198
2024-08-30 s-n-g
191199
* version 0.9.3.11 (BUG FIX)
192200
* recovering from regression after addressing #249

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyradio"
3-
version = "0.9.3.11"
3+
version = "0.9.3.11.1"
44
authors = [
55
{ name="Ben Dowling", email="[email protected]" },
66
{ name="Spiros Georgaras", email="[email protected]" },

pyradio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
" pyradio -- Console radio player. "
33

4-
version_info = (0, 9, 3, 11)
4+
version_info = (0, 9, 3, 11, 1)
55

66
# Set it to True if new stations have been
77
# added to the package's stations.csv

pyradio/config_window.py

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
import locale
33
import logging
44
import curses
5+
from datetime import datetime
56
from copy import deepcopy
67
from textwrap import wrap
78
import glob
89
import csv
9-
from os import path, sep
10+
from os import path, sep, rename
1011
from sys import platform, version_info
1112

1213
from .common import *
@@ -3366,4 +3367,69 @@ def show(self):
33663367
def keypress(self, char):
33673368
pass
33683369

3370+
3371+
class PyRadioKeyboardConfig():
3372+
3373+
_focus = 0
3374+
3375+
def __init__(self):
3376+
pass
3377+
3378+
def _rename_keyboard_json_file(file_path):
3379+
# Check if the file path ends with "keyboard.json"
3380+
if not file_path.endswith("keyboard.json"):
3381+
raise ValueError("The file path must end with 'keyboard.json'")
3382+
3383+
# Get the current date and time
3384+
now = datetime.now()
3385+
formatted_time = now.strftime("%Y-%m-%d_%H-%M-%S")
3386+
3387+
# Create the new file name
3388+
new_file_name = f"{formatted_time}-keyboard.json"
3389+
3390+
# Get the directory of the original file
3391+
directory = path.dirname(file_path)
3392+
3393+
# Create the full new file path
3394+
new_file_path = path.join(directory, new_file_name)
3395+
3396+
# Rename the file
3397+
rename(file_path, new_file_path)
3398+
3399+
return new_file_name
3400+
3401+
def _focus_nect(self):
3402+
pass
3403+
3404+
def _focus_previous(self):
3405+
pass
3406+
3407+
def show(self):
3408+
pass
3409+
3410+
def keypress(self, char):
3411+
''' PyRadioKeyboardConfig keypress
3412+
Returns:
3413+
-1: Cancel
3414+
0: Done
3415+
1: Continue
3416+
2: Display help
3417+
3: Display line editor help
3418+
'''
3419+
if char == kbkey['?'] and self._focus > 0:
3420+
return 3
3421+
elif char == kbkey['?']:
3422+
return 2
3423+
elif char in (curses.KEY_EXIT, 27, kbkey['q']) and \
3424+
self._focus > 0:
3425+
self.edit_string = ''
3426+
return -1
3427+
elif char in (ord('\t'), 9, curses.KEY_DOWN, kbkey['tab']):
3428+
self._focus_next()
3429+
elif char in (curses.KEY_BTAB, curses.KEY_UP, kbkey['stab']):
3430+
self._focus_previous()
3431+
elif char in (curses.KEY_ENTER, ord('\n'), ord('\r')):
3432+
pass
3433+
return 1
3434+
33693435
# pymode:lint_ignore=W901

pyradio/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
''' This is PyRadio version this
1818
install.py was released for
1919
'''
20-
PyRadioInstallPyReleaseVersion = '0.9.3.11'
20+
PyRadioInstallPyReleaseVersion = '0.9.3.11.1'
2121

2222
locale.setlocale(locale.LC_ALL, "")
2323

pyradio/keyboard.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,11 @@
150150
'''
151151
def populate_dict():
152152
for key, value in kbkey_orig.items():
153-
kbkey[key] = value[0]
153+
if value[0]:
154+
kbkey[key] = value[0]
154155
return kbkey
155156

156-
kbkey = OrderedDict()
157+
kbkey = {}
157158
kbkey = populate_dict()
158159

159160
curses_function_keys_dict = {

0 commit comments

Comments
 (0)