Skip to content

Commit f6f98ac

Browse files
📝 Add docstrings to web-browsers
Docstrings generation was requested by @Tearran. * #530 (comment) The following files were modified: * `tools/modules/software/module_aptwizard.sh`
1 parent 5306c0e commit f6f98ac

File tree

1 file changed

+73
-5
lines changed

1 file changed

+73
-5
lines changed

tools/modules/software/module_aptwizard.sh

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ module_options+=(
88
["_checklist_proftpd,group"]="Internet"
99
["_checklist_proftpd,arch"]="x86-64 arm64 armhf"
1010
)
11-
# Scaffold for an app that has multiple candidates, such as ProFTPD and modules.
11+
# Presents an interactive checklist for installing or removing ProFTPD-related packages.
12+
#
13+
# Dynamically retrieves all available ProFTPD packages, checks their installation status, and builds a checklist for user selection. Invokes the package selection handler to allow users to install or remove selected packages.
14+
#
15+
# Returns:
16+
#
17+
# * 0 if packages are found and the checklist is presented.
18+
# * 1 if no ProFTPD-related packages are found.
19+
#
20+
# Example:
21+
#
22+
# ```bash
23+
# _checklist_proftpd
24+
# ```
1225
function _checklist_proftpd() {
1326
local title="proftpd"
1427

@@ -50,7 +63,21 @@ module_options+=(
5063
["_checklist_browsers,group"]="Internet"
5164
["_checklist_browsers,arch"]="x86-64 arm64 armhf"
5265
)
53-
# Scaffold for app with specific single or dummy candidates.
66+
# Presents an interactive checklist for managing installation or removal of common browser packages.
67+
#
68+
# Fetches a predefined list of browser packages, retrieves their descriptions and installation status,
69+
# and builds a checklist for user selection. If no browser packages are found, prints a message and returns an error.
70+
#
71+
# Returns:
72+
#
73+
# * 0 if the checklist is presented successfully.
74+
# * 1 if no browser packages are found.
75+
#
76+
# Example:
77+
#
78+
# ```bash
79+
# _checklist_browsers
80+
# ```
5481
function _checklist_browsers() {
5582
local title="Browsers"
5683

@@ -105,7 +132,19 @@ module_options+=(
105132
["_checklist_editors,group"]="Internet"
106133
["_checklist_editors,arch"]="x86-64 arm64 armhf"
107134
)
108-
# Scaffold for app with specific single or dummy candidates.
135+
# Presents an interactive checklist for installing or removing editor packages such as nano, code, codium, and notepadqq.
136+
#
137+
# Fetches a predefined list of editor package names, retrieves their descriptions and installation status, and builds a checklist for user selection. If no matching packages are found, prints a message and returns an error.
138+
#
139+
# Returns:
140+
#
141+
# * 0 if at least one package is found and the checklist is displayed.
142+
# * 1 if no editor packages are found.
143+
#
144+
# Example:
145+
#
146+
# _checklist_editors
147+
# # Displays a checklist of available editor packages for installation or removal.
109148
function _checklist_editors() {
110149
local title="Editors"
111150
local self="${module_options["_checklist_editors,feature"]}"
@@ -154,7 +193,20 @@ module_options+=(
154193
["_checklist_imaging,group"]="Internet"
155194
["_checklist_imaging,arch"]="x86-64 arm64 armhf"
156195
)
157-
# Scaffold for app with specific single or dummy candidates.
196+
# Presents an interactive checklist for installing or removing imaging editor packages (e.g., Inkscape, GIMP).
197+
#
198+
# Fetches a predefined list of imaging editor package names from module metadata, retrieves their descriptions and installation status, and builds a checklist for user selection. If no relevant packages are found, prints a message and returns an error.
199+
#
200+
# Returns:
201+
#
202+
# * 0 if at least one package is found and the checklist is presented.
203+
# * 1 if no imaging editor packages are found.
204+
#
205+
# Example:
206+
#
207+
# ```bash
208+
# _checklist_imaging
209+
# ```
158210
function _checklist_imaging() {
159211
local title="Imaging"
160212
local self="${module_options["_checklist_imaging,feature"]}"
@@ -205,7 +257,23 @@ module_options+=(
205257
["module_aptwizard,port"]=""
206258
["module_aptwizard,arch"]="x86-64 arm64 armhf"
207259
)
208-
# Scafold for software module tites
260+
# Dispatches aptwizard module commands to manage software packages by category.
261+
#
262+
# Acts as the main entry point for the aptwizard module, routing user commands to interactive checklists for managing editors, browsers, ProFTPD, or imaging packages. Also provides usage information and available commands.
263+
#
264+
# Arguments:
265+
#
266+
# * The command to execute (e.g., help, Editors, Browsers, Proftpd, Imaging).
267+
#
268+
# Outputs:
269+
#
270+
# * Prints usage information, available commands, or error messages to STDOUT.
271+
#
272+
# Example:
273+
#
274+
# module_aptwizard help
275+
# module_aptwizard Editors
276+
# module_aptwizard Browsers
209277
function module_aptwizard() {
210278
local title="Packages"
211279
local self="${module_options["module_aptwizard,feature"]}"

0 commit comments

Comments
 (0)