Skip to content

Commit

Permalink
getting ready for 0.9.3.11.1 (0.9.3.12-beta1)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-n-g committed Oct 16, 2024
1 parent 1ded84c commit dd1d40f
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2024-10-16 s-n-g
* version 0.9.3.11.1 (BUG FIX) - 0.9.3.12-beta1
* adding -sdd (--show_dirs) command line parameter
* fixing a couple of bugs (some reported by pylint /ruff)
* integrating suggestions by pylint / ruff
* adding a Everforest based system theme
* all keybindings are now customizable (interface not implemented yet)

2024-08-30 s-n-g
* version 0.9.3.11 (BUG FIX)
* recovering from regression after addressing #249
Expand Down
8 changes: 8 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
<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>
<pre style="height: 200px;">

2024-10-16 s-n-g
* version 0.9.3.11.1 (BUG FIX) - 0.9.3.12-beta1
* adding -sdd (--show_dirs) command line parameter
* fixing a couple of bugs (some reported by pylint /ruff)
* integrating suggestions by pylint / ruff
* adding a Everforest based system theme
* all keybindings are now customizable (interface not implemented yet)

2024-08-30 s-n-g
* version 0.9.3.11 (BUG FIX)
* recovering from regression after addressing #249
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyradio"
version = "0.9.3.11"
version = "0.9.3.11.1"
authors = [
{ name="Ben Dowling", email="ben.m.dowling@gmail.com" },
{ name="Spiros Georgaras", email="sng@hellug.gr" },
Expand Down
2 changes: 1 addition & 1 deletion pyradio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
" pyradio -- Console radio player. "

version_info = (0, 9, 3, 11)
version_info = (0, 9, 3, 11, 1)

# Set it to True if new stations have been
# added to the package's stations.csv
Expand Down
68 changes: 67 additions & 1 deletion pyradio/config_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
import locale
import logging
import curses
from datetime import datetime
from copy import deepcopy
from textwrap import wrap
import glob
import csv
from os import path, sep
from os import path, sep, rename
from sys import platform, version_info

from .common import *
Expand Down Expand Up @@ -3366,4 +3367,69 @@ def show(self):
def keypress(self, char):
pass


class PyRadioKeyboardConfig():

_focus = 0

def __init__(self):
pass

def _rename_keyboard_json_file(file_path):
# Check if the file path ends with "keyboard.json"
if not file_path.endswith("keyboard.json"):
raise ValueError("The file path must end with 'keyboard.json'")

# Get the current date and time
now = datetime.now()
formatted_time = now.strftime("%Y-%m-%d_%H-%M-%S")

# Create the new file name
new_file_name = f"{formatted_time}-keyboard.json"

# Get the directory of the original file
directory = path.dirname(file_path)

# Create the full new file path
new_file_path = path.join(directory, new_file_name)

# Rename the file
rename(file_path, new_file_path)

return new_file_name

def _focus_nect(self):
pass

def _focus_previous(self):
pass

def show(self):
pass

def keypress(self, char):
''' PyRadioKeyboardConfig keypress
Returns:
-1: Cancel
0: Done
1: Continue
2: Display help
3: Display line editor help
'''
if char == kbkey['?'] and self._focus > 0:
return 3
elif char == kbkey['?']:
return 2
elif char in (curses.KEY_EXIT, 27, kbkey['q']) and \
self._focus > 0:
self.edit_string = ''
return -1
elif char in (ord('\t'), 9, curses.KEY_DOWN, kbkey['tab']):
self._focus_next()
elif char in (curses.KEY_BTAB, curses.KEY_UP, kbkey['stab']):
self._focus_previous()
elif char in (curses.KEY_ENTER, ord('\n'), ord('\r')):
pass
return 1

# pymode:lint_ignore=W901
2 changes: 1 addition & 1 deletion pyradio/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
''' This is PyRadio version this
install.py was released for
'''
PyRadioInstallPyReleaseVersion = '0.9.3.11'
PyRadioInstallPyReleaseVersion = '0.9.3.11.1'

locale.setlocale(locale.LC_ALL, "")

Expand Down
5 changes: 3 additions & 2 deletions pyradio/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@
'''
def populate_dict():
for key, value in kbkey_orig.items():
kbkey[key] = value[0]
if value[0]:
kbkey[key] = value[0]
return kbkey

kbkey = OrderedDict()
kbkey = {}
kbkey = populate_dict()

curses_function_keys_dict = {
Expand Down

0 comments on commit dd1d40f

Please sign in to comment.