-n flag no longer required for recursive mode
This commit is contained in:
@@ -25,6 +25,7 @@ n -> valid input check back for no arguments passed?
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
<2025-10-05> V0.3.6 - Recursive mode no longer requires the -n flag
|
||||||
<2025-10-04> V0.3.5 - Added a function which returns the length of a
|
<2025-10-04> V0.3.5 - Added a function which returns the length of a
|
||||||
number
|
number
|
||||||
<2025-10-04> V0.3.5 - Changed the recursive mode into an linear x*y
|
<2025-10-04> V0.3.5 - Changed the recursive mode into an linear x*y
|
||||||
|
|||||||
@@ -5,18 +5,13 @@ import sys
|
|||||||
from .refit_logger import logger
|
from .refit_logger import logger
|
||||||
from . import librefit
|
from . import librefit
|
||||||
|
|
||||||
# logger.debug("Initiated refit_create.py")
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
class Refit_Create:
|
class Refit_Create:
|
||||||
"""A class to create folders and files.
|
"""A class to create folders and files.
|
||||||
|
|
||||||
It first calls the decider which lets the create_input_valid() function
|
It first calls the decider which lets the create_input_valid() function
|
||||||
check if the input argument exists. If create_input_valid() returns
|
check if the input argument exists. If create_input_valid() returns
|
||||||
'True' it continues to execute the command as per the given arguments.
|
'True' it continues to execute the command as per the given arguments."""
|
||||||
|
|
||||||
default folder name: directory"""
|
|
||||||
|
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
"""Initiating variables for creation"""
|
"""Initiating variables for creation"""
|
||||||
@@ -122,16 +117,13 @@ class Refit_Create:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Exit the program if the -n argument is not passed
|
# Exit the program if the -n argument is not passed
|
||||||
if self.n is None:
|
if self.n is None and self.recursive is None:
|
||||||
logger.error(
|
logger.error(
|
||||||
f"FUNC create_dispatcher(n=None ?) MSG: the number value cannot be '{self.n}'"
|
f"FUNC create_dispatcher(n=None ?) MSG: the number value cannot be '{self.n}'"
|
||||||
)
|
)
|
||||||
print("Use the '-n' flag for the create command.")
|
print("Use the '-n' flag for the create command.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
logger.debug(
|
|
||||||
f"FUNC: input_validator() MSG: valid number entered n={self.n}"
|
|
||||||
)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def create_dispatcher(self):
|
def create_dispatcher(self):
|
||||||
|
|||||||
@@ -10,11 +10,6 @@ from modules.refit_create import Refit_Create
|
|||||||
CONFIG_FILE = "version.cfg"
|
CONFIG_FILE = "version.cfg"
|
||||||
|
|
||||||
|
|
||||||
# TODO: comment the actions done in read_version_config()
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: see the TODO in librefit: move the config file section into the
|
|
||||||
# libary
|
|
||||||
def read_version_config():
|
def read_version_config():
|
||||||
# logger.debug(f"Start read_version_config() with config file: {CONFIG_FILE}")
|
# logger.debug(f"Start read_version_config() with config file: {CONFIG_FILE}")
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[VERSION]
|
[VERSION]
|
||||||
major = 0
|
major = 0
|
||||||
minor = 3
|
minor = 3
|
||||||
patch = 5
|
patch = 6
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user