diff --git a/.github/workflows/ftp-deploy.yml b/.github/workflows/ftp-deploy.yml index b3f0c322d..1a956dcdd 100644 --- a/.github/workflows/ftp-deploy.yml +++ b/.github/workflows/ftp-deploy.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v3 - name: Install ShellCheck - run: sudo apt-get install shellcheck + run: sudo apt-get install pandoc git shellcheck - name: Run ShellCheck run: | ret=0 diff --git a/.github/workflows/man-page-deploy.yml b/.github/workflows/man-page-deploy.yml deleted file mode 100644 index 8acdf1980..000000000 --- a/.github/workflows/man-page-deploy.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Generate Man Pages - -on: - push: - paths: - - 'share/doc/armbian-configng/*.1.md' - -jobs: - man-page-gen: - name: Generate Man Pages - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Pandoc - run: sudo apt-get install -y pandoc - - - name: Check Pandoc Version - run: pandoc --version - - - name: Convert Markdown to Man Pages - run: | - for file in share/doc/armbian-configng/*.1.md; do - pandoc -s -t man $file -o ${file%.md} - gzip ${file%.md} - done - - - name: Move Man Pages - run: | - mkdir -p share/man/man1 - mv share/doc/armbian-configng/*.1.gz share/man/man1/ - - - name: Commit and Push Changes - run: | - git config --global user.name 'GitHub Actions' - git config --global user.email 'github-actions@github.com' - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} - git add -A - git commit -m "Generated man pages" || echo "No changes to commit" - git push origin HEAD:${{ github.ref }} \ No newline at end of file diff --git a/bin/armbian-configng b/bin/armbian-configng index e75524625..e1ec4ceb1 100755 --- a/bin/armbian-configng +++ b/bin/armbian-configng @@ -20,8 +20,6 @@ libpath=$(cd "$directory/lib/$filename/" && pwd) [[ -f "/etc/os-release" ]] && source /etc/os-release [[ -f "$libpath/set_get_system.sh" ]] && source "$libpath/set_get_system.sh" - - # # Check if the script is dev version. [[ "$1" == "--dev" ]] && dev=1 && shift 1 @@ -58,10 +56,6 @@ if [[ "$(id -u)" != "0" ]] && [[ "$dev" != "1" ]]; then exit 1 fi -# get_config -# see_ping -is_apt_list_current - declare -A dialogue # @@ -121,95 +115,49 @@ for category in "${categories[@]}"; do done done -############################################################################################### -############################################################################################### +# This function is used to generate a whiptail/dialog text-based user interface (TUI) for navigating the menus. +generate_action() { + local function_name="$1" + ${function_name} +} -# This function is used to generate a text-based user interface (TUI) for navigating the menus. -generate_tui() { - local options=() - local i=0 - declare -A categories_array - local help_index=-1 - for category in "${categories[@]}"; do - local category_name="${category##*/}" - local category_description="" - local category_file="$category/category.conf" +generate_help(){ - if [[ -f "$category_file" ]]; then - category_description=$(grep -oP "(?<=# @description ).*" "$category_file") - fi +#Usage: ${filename%.*} [flag][option] - if [[ "$category_name" == "help" ]]; then - help_index=$i - else - categories_array["$i"]="$category_name" - description_array["$i"]="$category_description" - options+=("$i" "$(printf '%-7s - %-8s' "${categories_array[$i]}" "${description_array[$i]}")") - ((++i)) - fi - done + cat << EOF + +Usage: ${0##*/} [OPTION]... + options: + -h, --help Show this help message and exit + -d, --doc Generate documentation + -t, --menu Generate Text-based user interface (TUI) + --deps Check dependencies are installed and install if not + --web Generate debug web page + --json Generate JSON + --csv Generate CSV + --server Serve and open HTML + + example: + ${0##*/} --deps git + + + + options: + help Advanced no-interface options help message - # Add the help category if it exists - if [[ $help_index -ne -1 ]]; then - categories_array["$i"]="help" - description_array["$i"]="Documentation, support, sources" - options+=("$i" "$(printf '%-7s - %-8s' "${categories_array[$i]}" "${description_array[$i]}")") - ((++i)) - fi + $( generate_list_cli ) - [[ -f /sbin/armbian-config ]] && options+=("$i" "$(printf '%-7s - %-8s' "Legacy" "Run Legacy configuration")") ; ((++i)) ; - [[ ! -d "$libpath/help" ]] && options+=("$i" "$(printf '%-7s - %-8s' "Help" "Documentation, support, sources")") ; ((++i)) ; + This will parse the command to the Group function, and the function will be run. - local choice - choice=$($dialogue --menu "Select a category:" 0 0 9 "${options[@]}" 3>&1 1>&2 2>&3) - - if [[ -n $choice ]]; then - if ((choice == "$i - 1")); then - generate_help ; - echo "" ; - generate_list_cli ; - exit 0 ; - elif ((choice == "$i - 2")); then - armbian-config - exit ; - else - generate_sub_tui "${categories_array[$choice]}" - fi - fi -} + example: + ${0##*/} [group]=[function] -# This function is used to generate a text-based user interface (TUI) for navigating the menus. -generate_sub_tui() { - local category="$1" - local options=() - local i=0 - declare -A functions_array - for file in "$libpath/$category"/*.sh; do - mapfile -t functions_in_file < <(grep -oP '(?<=function\s)\w+::\w+' "$file") - for function in "${functions_in_file[@]}"; do - key="${category##*/}:${file##*/}:${function}" - functions_array["$i"]="$function" - options+=("$i" "${functions["$key,function_name"]} - ${functions["$key,description"]}") - ((++i)) - done - done - - local choice - - choice=$($dialogue --menu "Select a function:" 0 0 9 "${options[@]}" 3>&1 1>&2 2>&3) - - if [[ -n $choice ]]; then - generate_action "${functions_array[$choice]}" | "$directory/bin/armbian-interface" -o - fi +EOF } -# This function is used to generate a whiptail/dialog text-based user interface (TUI) for navigating the menus. -generate_action() { - local function_name="$1" - ${function_name} -} # This function is used to generate a bash text-based user interface (TUI) for navigating the menus. generate_read() { @@ -230,26 +178,23 @@ generate_read() { # Check if the category has changed and display it if so local category="${functions["${function_keys[i]},category"]}" # < editor" if [[ "$category" != "$current_category" ]]; then - echo " $category" + #echo " $category" current_category="$category" fi # Display the function and its description as an option in the menu - echo " $i. ${functions["${function_keys[i]},group_name"]} ${functions[$key]} - ${functions["${function_keys[i]},description"]}" #" < for my editor + echo "$i. ${functions["${function_keys[i]},group_name"]} ${functions[$key]} - ${functions["${function_keys[i]},description"]}" #" < for my editor ((i++)) fi done echo #echo "$i. Show help" - #((i++)) echo "$i. Exit" read -p "Enter your choice: " choice - if ((choice == i-1)); then - generate_help ; - elif ((choice == i)); then + if ((choice == i)); then exit 0 elif ((choice >= 1 && choice <= ${#function_keys[@]})); then # Call the selected function using variable indirection @@ -276,6 +221,7 @@ parse_action() { return 1 fi } + ############################################################################################### # WIP: Check arguments for no flag options # armbian-config --help @@ -294,30 +240,7 @@ handle_no_flag(){ # # Check arguments for long flag options # Help message related to the functions the back end -handle_long_flag(){ - if [[ "$1" == "--help" ]]; then - generate_help - exit 0 ; - elif [[ "$1" == "--menu" ]]; then - generate_read ; exit 0 ; - exit 0 ; - elif [[ "$1" == "--doc" ]]; then - generate_doc - exit 0 ; - elif [[ "$1" == "--server" ]]; then - serve_and_open_html - exit 0 ; - elif [[ "$1" == "--web" ]]; then - generate_web - exit 0 ; - elif [[ "$1" == "--json" ]]; then - generate_json - exit 0 ; - elif [[ "$1" == "--csv" ]]; then - generate_csv - exit 0 ; - fi - +run_long_flag(){ # WIP: if [ "$1" == "--run" ]; then shift # Shifts the arguments to the left, excluding the first argument ("-r") @@ -332,22 +255,43 @@ handle_long_flag(){ fi } + # # Check arguments for short flag options # THe interface help message handle_short_flag(){ -if [ "$1" == "-h" ]; then - generate_help - exit 0 ; -# Generate a text-based user interface -elif [ "$1" == "-t" ] ; then - generate_read ; exit 0 ; -# Generate all doc files -elif [ "$1" == "-d" ] ; then - generate_doc ; exit 0 ; -elif [ "$1" == "-j" ] ; then - generate_json ; exit 0 ; -fi + + if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then + generate_help + exit 0 ; + elif [[ "$1" == "--menu" ]] || [[ "$1" == "-t" ]]; then + see_ping + is_apt_list_current + generate_read ; exit 0 ; + exit 0 ; + elif [[ "$1" == "--doc" ]] || [[ "$1" == "-d" ]]; then + see_ping + is_apt_list_current + see_get_dependencies pandoc git || exit 1 + generate_doc + exit 0 ; + elif [[ "$1" == "--deps" ]] ; then + shift + check_dependencies "${@}" + exit 0 ; + elif [[ "$1" == "--server" ]]; then + serve_and_open_html + exit 0 ; + elif [[ "$1" == "--web" ]]; then + generate_web + exit 0 ; + elif [[ "$1" == "--json" ]]; then + generate_json + exit 0 ; + elif [[ "$1" == "--csv" ]]; then + generate_csv + exit 0 ; + fi } @@ -358,7 +302,7 @@ case "$1" in ;; *"--"*) # Handle the case where $1 starts with "--" - handle_long_flag "$@" + handle_short_flag "$@" ;; *"-"*) # Handle the case where $1 starts with "-" @@ -370,19 +314,3 @@ case "$1" in # You can add your code here ;; esac - -if [[ -z "$1" ]] ; then - -while true; do - if [[ "$dialogue" == "$file_name" ]]; then - generate_read - elif [[ "$dialogue" != "$file_name" ]]; then - generate_tui - fi - - if [[ "$?" == "0" ]]; then - break - fi -done - -fi \ No newline at end of file diff --git a/lib/armbian-configng/Help/see_help.sh b/lib/armbian-configng/Help/see_help.sh index a5e543d39..9cc9ac469 100644 --- a/lib/armbian-configng/Help/see_help.sh +++ b/lib/armbian-configng/Help/see_help.sh @@ -7,31 +7,7 @@ # @default none # @options none -generate_help(){ -#Usage: ${filename%.*} [flag][option] - - cat << EOF - -Usage: ${0##*/} [OPTION]... - options: - -h, --help Show this help message and exit - -d, --doc Generate documentation - --server Serve and open HTML - --web Generate web - -t Generate TUI - --json Generate JSON - --csv Generate CSV - help Advanced no-interface options help message - - $( generate_list_cli ) - - This will parse the command to the Group function, and the function will be run. - - example ${0##*/} [group]=[function] - -EOF -} function testing::Help(){ clear diff --git a/lib/armbian-configng/Locales/set_timezones.sh b/lib/armbian-configng/Locales/set_timezones.sh index 06758f45c..bed62f925 100644 --- a/lib/armbian-configng/Locales/set_timezones.sh +++ b/lib/armbian-configng/Locales/set_timezones.sh @@ -6,6 +6,12 @@ # @default none # @options user selection function locales::timezone(){ + echo "Time zone configuration" + set_timezone + + } + +set_timezone(){ echo "Please select a country:" countries=$(timedatectl list-timezones | cut -d'/' -f1 | uniq) select country in $countries; do diff --git a/lib/armbian-configng/documents.sh b/lib/armbian-configng/documents.sh index 701c7f001..8087aae1a 100644 --- a/lib/armbian-configng/documents.sh +++ b/lib/armbian-configng/documents.sh @@ -705,7 +705,9 @@ serve_web_open() { } generate_doc() { - + + + local dir="$(dirname "$(dirname "$(realpath "$0")")")/share" if [[ ! -d "$dir/doc/${filename%-dev}" ]]; then @@ -732,6 +734,12 @@ generate_doc() { generate_and_print generate_json "$dir/$conf/$filename" json "JSON" generate_and_print generate_csv "$dir/$conf/$filename" csv "CSV" generate_and_print generate_markdown "$dir/$doc/$filename" md "MAN page" - + + + check_dependencies pandoc git whiptail + [[ -f "$dir/$doc/$filename.md" ]] && pandoc --standalone -t man "$dir/$doc/$filename.md" -o "$dir/$man/$filename.1.gz" + [[ -f "$dir/$doc/armbianmonitor.md" ]] && pandoc --standalone -t man "$dir/$doc/armbianmonitor.md" -o "$dir/$man/armbianmonitor.1.gz" + return 0 + } \ No newline at end of file diff --git a/lib/armbian-configng/set_get_system.sh b/lib/armbian-configng/set_get_system.sh index c93e29dd2..6eb6cc42d 100644 --- a/lib/armbian-configng/set_get_system.sh +++ b/lib/armbian-configng/set_get_system.sh @@ -80,11 +80,42 @@ function is_apt_list_current() { echo -e "\e[5;33mINFORMATION:\e[0m" echo " Checking for apt-daily.service" echo " The package lists are up-to-date." + echo "" return 0 # The package lists are up-to-date else echo -e "\e[5;31mWARNING:\e[0m" echo " Checking for apt-daily.service" echo " The package lists are not up-to-date." + echo "" return 1 # The package lists are not up-to-date fi } + +# Function to check if dependencies are installed +see_get_dependencies() { + # Array to hold missing dependencies + local missing_dependencies=() + + # Check if dependencies are installed + for dep in "$@"; do + if ! command -v $dep &> /dev/null; then + echo "$dep could not be found." + missing_dependencies+=($dep) + fi + done + + # Check if any dependencies are missing + if [ ${#missing_dependencies[@]} -eq 0 ]; then + echo -e "\e[5;33mINFORMATION:\e[0m" + echo " Checking for dependencies ${dep[@]}" + echo " All dependencies are installed." + echo "" + return 0 + else + echo "Installing following dependencies: ${missing_dependencies[@]}" + for dep in "${missing_dependencies[@]}"; do + sudo apt-get install -y $dep + done + return 0 + fi +} \ No newline at end of file diff --git a/share/armbian-configng/armbian-configng.csv b/share/armbian-configng/armbian-configng.csv index a6e21463a..04b180bd7 100755 --- a/share/armbian-configng/armbian-configng.csv +++ b/share/armbian-configng/armbian-configng.csv @@ -1,8 +1,8 @@ Function Name,Group Name,Description,Options,Category,Category Description -Timezone,locales,Time zone configuration,user selection,Locales,Locale Language Region Time Keyboard +Help,testing,Help message.,none,Help,Locale Language Region Time Keyboard Kernel_hold,testing,Kernal U-boot update Hold/Unhold.,[frozen] [unfrozen],System,System and Security -Help,testing,Help message.,none,help,Locale Language Region Time Keyboard -Install,testing,Armbian installer,[sdcard] [emmc] [usb],System,System and Security -Timezone,locales,Time zone configuration,user selection,SoftWare,Third-party applications +dowloads,placeholder,Softy is a software manager for Armbian.,none,SoftWare,Third-party applications Bencharking,monitor,Monitor and Bencharking.,help message,System,System and Security NMTUI,network,Network Manager.,connect,Network,Ehternet Wierless Blutooth AccessPoint +Install,placeholder,Armbian installer,[sdcard] [emmc] [usb],System,System and Security +timezone,locales,Time zone configuration,user selection,Locales,Locale Language Region Time Keyboard diff --git a/share/armbian-configng/armbian-configng.json b/share/armbian-configng/armbian-configng.json index 0ba9e99cb..5d8b92b11 100755 --- a/share/armbian-configng/armbian-configng.json +++ b/share/armbian-configng/armbian-configng.json @@ -1,25 +1,7 @@ [ { "Category Description": "Locale Language Region Time Keyboard", - "Category": "Locales", - "Group": "locales", - "Function": "Timezone", - "Group Description": "Time zone configuration", - "Options": "user selection", - "Toggle": "none" - }, - { - "Category Description": "System and Security", - "Category": "System", - "Group": "testing", - "Function": "Kernel_hold", - "Group Description": "Kernal U-boot update Hold/Unhold.", - "Options": "[frozen] [unfrozen]", - "Toggle": "unfrozen" - }, - { - "Category Description": "Locale Language Region Time Keyboard", - "Category": "help", + "Category": "Help", "Group": "testing", "Function": "Help", "Group Description": "Help message.", @@ -30,18 +12,18 @@ "Category Description": "System and Security", "Category": "System", "Group": "testing", - "Function": "Install", - "Group Description": "Armbian installer", - "Options": "[sdcard] [emmc] [usb]", - "Toggle": "sdcard" + "Function": "Kernel_hold", + "Group Description": "Kernal U-boot update Hold/Unhold.", + "Options": "[frozen] [unfrozen]", + "Toggle": "unfrozen" }, { "Category Description": "Third-party applications", "Category": "SoftWare", - "Group": "locales", - "Function": "Timezone", - "Group Description": "Time zone configuration", - "Options": "user selection", + "Group": "placeholder", + "Function": "dowloads", + "Group Description": "Softy is a software manager for Armbian.", + "Options": "none", "Toggle": "none" }, { @@ -61,5 +43,23 @@ "Group Description": "Network Manager.", "Options": "connect", "Toggle": "connect" + }, + { + "Category Description": "System and Security", + "Category": "System", + "Group": "placeholder", + "Function": "Install", + "Group Description": "Armbian installer", + "Options": "[sdcard] [emmc] [usb]", + "Toggle": "sdcard" + }, + { + "Category Description": "Locale Language Region Time Keyboard", + "Category": "Locales", + "Group": "locales", + "Function": "timezone", + "Group Description": "Time zone configuration", + "Options": "user selection", + "Toggle": "none" } ] diff --git a/share/doc/armbian-configng/Desktops.md b/share/doc/armbian-configng/Desktops.md deleted file mode 100644 index 760bdc450..000000000 --- a/share/doc/armbian-configng/Desktops.md +++ /dev/null @@ -1,33 +0,0 @@ -You can install different desktop environments on a standard Armbian image. Here are the steps to do it: - -1. **Setting up Display Manager**: First, you need a Display Manager. NODM is installed by default. [If you have problems with NODM, you can try LXDM](https://forum.armbian.com/topic/10526-using-different-desktop-environments-on-armbian/)¹. - ``` - sudo apt install lxdm - sudo apt remove nodm - sudo dpkg-reconfigure lxdm - ``` -2. **Install LXDE Desktop**: Next, install the desktop environment you want. It's easiest to install LXDM first to be able to configure the others well¹. - ``` - sudo apt install lxde - sudo reboot - ``` -3. **Fixing Login Issues**: If you're having trouble logging in to some Desktop Environments with LXDM, you can fix this by modifying the file `/usr/share/xsessions/xfce.desktop`¹. - ``` - sudo geany /usr/share/xsessions/xfce.desktop - ``` - Replace `Name=Xfce Session` with `Name=Xfce-Session` and save the file¹. - -4. **Installing Different Desktop Environments**: You can install different desktop environments like Mate, KDE-Plasma, and Gnome¹. For example, to install Mate: - ``` - sudo apt install mate-desktop-environment mate-applets - ``` - -5. **Removing a Desktop Environment**: If you want to remove a desktop environment, you can do so by using the `remove` command¹. - ``` - sudo apt remove mate-desktop-environment - ``` - -Source: -- https://forum.armbian.com/topic/10526-using-different-desktop-environments-on-armbian/ -- https://raspberrytips.com/armbian-on-raspberry-pi/. -- https://docs.armbian.com/User-Guide_Getting-Started/ diff --git a/share/doc/armbian-configng/Home.md b/share/doc/armbian-configng/Home.md deleted file mode 100644 index e79e934c4..000000000 --- a/share/doc/armbian-configng/Home.md +++ /dev/null @@ -1,138 +0,0 @@ -

- Armbian logo -

-
- -[![CodeFactor](https://www.codefactor.io/repository/github/tearran/configng/badge)](https://www.codefactor.io/repository/github/tearran/configng) -[![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Tearran/configng/main)](https://github.com/Tearran/configng/commits) -[![Join the Discord](https://img.shields.io/discord/854735915313659944.svg?color=7289da&label=Discord%20&logo=discord)](https://discord.com/invite/gNJ2fPZKvc) - -
- -# Armbian configuration - -## Codename Configng -Under development - -## Overview -This document discusses establishing a `armbian-config` set of binary tools To configure Armbian build -## Design -A modular design is used, with a focus on making it easy to add new software titles or functionality. A combination of grouped functions in `/lib` and binary tools in `/bin` is used. - -## Tools -- [[armbian-lib]](https://github.com/Tearran/configng/wiki/library) armbian-config library of grouped functions -- [[armbian-config]](https://github.com/Tearran/configng/wiki/config) tool is used for the CLI. -- [[others]](#) coming soon - -## Help messages -Help messages for each command are accessible from the CLI `config -h` - - - -# User guide -## Quick start -### Installation Options -Our applications support two Run styles - -## Limitations - -- functionaly may or may not work when not useing administration privileges - - Lager sample size needed -- armbian-configng does not requier adnistation access. - - Fallbacks need to be set for admin and no admn access. -- Non admin is limited to --dev - - - -1. **Run from GitHub repository:** - - ` sudo apt update && sudo apt install git ` - - ```bash - - cd ~/ - git clone https://github.com/armbian/configng.git - cd configng - ./bin/armbian-configng --dev - ``` - - To uninstall: - - ```bash - cd ~/ - # rm -rf configng - ``` - -3. **Install from a .deb package:** - [Disclamer](#disclaimer): Not recomened - - - - ```bash - { - latest_release=$(curl -s https://api.github.com/repos/armbian/configng/releases/latest) - deb_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url') - curl -LO "$deb_url" - deb_file=$(echo "$deb_url" | awk -F"/" '{print $NF}') - sudo dpkg -i "$deb_file" - sudo dpkg --configure -a - sudo apt --fix-broken install - } - ``` - - To uninstall: - - ```bash - sudo dpkg -r armbian-configng - ``` - or - ```bash - sudo apt remove armbian-configng - ``` -4. **Install from the Armbian repository(Coming Soon):** - - ```bash - echo "deb [signed-by=/usr/share/keyrings/armbian.gpg] https://armbian.github.io/configng stable main" \ - | sudo tee /etc/apt/sources.list.d/armbian-development.list > /dev/null - sudo apt update - sudo apt install armbian-configng - ``` - - To uninstall: - - ```bash - { sudo apt remove armbian-configng - # sudo rm /etc/apt/sources.list.d/armbian-development.list - sudo apt update } - ``` - -### Using Options - -Our applications support two styles of options: - -1. **C-style commands:** The `help` command provides a message with examples of how of use. -2. These option bypass user interations -3. Limitations - a. small sample size - - Not much error handeling - - Two way communication layer placeholder need filling - - - ```bash - ./bin/armbian-configng help - ``` - -5. **Script-style options:** These are passed as `-option` or `--option`. For example, to request help, you would use `-h` or `--help`. - - ```bash - ./bin/armbian-configng -h - ./bin/armbian-configng --help - ``` - -## Disclaimer - -This guide includes the use of `curl` command to download files from the internet. While we strive to provide safe and reliable instructions, we cannot guarantee the safety of any files downloaded using `curl`. - -Please ensure that you trust the source of the files you are downloading. Be aware that downloading files from the internet always carries a risk, and you should only download files from trusted sources. - -Always review the scripts and commands you run in your terminal. If you don't understand what a command or script does, take the time to learn about it before running it. This can help prevent unexpected behavior or damage to your system. diff --git a/share/doc/armbian-configng/Invest.md b/share/doc/armbian-configng/Invest.md deleted file mode 100644 index dd69f8ff4..000000000 --- a/share/doc/armbian-configng/Invest.md +++ /dev/null @@ -1,43 +0,0 @@ -# Strategic Investment: Contributing Funds to Open Source Communities - -## Rethinking Investment: Beyond Development Costs - -In the world of open source, contributing funds to a project's community is often misperceived as a development cost. However, savvy businesses recognize that it's not an expense for development but a strategic marketing investment with broader implications in the realm of developments. - -### Shifting Perspectives: It's More Than Development - -1. **Community Recognition:** - - Contributing funds to an open-source project's community establishes your business as a recognized and invested participant in the project's ecosystem. - -2. **Brand Visibility:** - - Investment in community funds results in increased brand visibility. As community members acknowledge your contribution, your brand gains exposure among a tech-savvy audience. - -3. **Trust and Credibility:** - - Financial support demonstrates trust and commitment, building credibility within the open-source community and fostering a positive perception of your brand. - -## Marketing Impact: A Strategic Move - -Contributing funds to an open-source project's community isn't just an altruistic gesture; it's a strategic move with marketing benefits. - -### Building a Positive Brand Image - -#### Example: [GitHub Sponsors](https://github.com/sponsors) - - GitHub Sponsors allows businesses to financially support open-source developers. This not only aids development but also builds a positive brand image by showcasing commitment to the developer community. - -#### Best Practice: Transparent Communication - - Communicate openly about your financial contributions. Transparency reinforces your commitment to the community and strengthens the positive perception of your brand. - -### Leveraging Community Funds for Strategic Marketing - -1. **Sponsorship Opportunities:** - - Explore sponsorship opportunities within open-source events or community initiatives. This not only supports the community but also positions your brand prominently in front of a relevant audience. - -2. **Branded Content and Materials:** - - Allocate a portion of your funds to create branded content or materials that resonate with the open-source community, ensuring your brand remains top-of-mind among community members. - -3. **Strategic Partnerships:** - - Use community funds to initiate strategic partnerships. Collaborating with key players in the open-source ecosystem can amplify your brand reach and market influence. - -## Conclusion: Beyond Development, Toward Strategic Influence - -In summary, contributing funds to an open-source community is a marketing cost; it's a strategic investment with significant marketing implications. Businesses should recognize that it's not just about development expenses but about supporting the resources required to keep the community running. Additionally, for transparent developmental control, businesses can offer bounties to motivate coders and gain priority in the development process. diff --git a/share/doc/armbian-configng/Naming-Convention.md b/share/doc/armbian-configng/Naming-Convention.md deleted file mode 100644 index f222f1f61..000000000 --- a/share/doc/armbian-configng/Naming-Convention.md +++ /dev/null @@ -1,93 +0,0 @@ -# Naming Convention - -## deb packages -```bash -armbian-release-category-name - A simple description with tag such as (metapackage) (dev) (contrib) -A very long and detailed description in this line a really long description can go here really really long. -``` - -## User Levels - -- Basic: For basic users, who are non-admins and only have access to userland - - The conventions should be simple and straightforward. - - These users may not have a deep understanding of the system, so - - Defaults options should established and be easy to understand and use. -- Intermediate: For intermediate users, who are system admins or sudo users, - - The conventions can be more complex. - - These users have a deeper understanding or willingness to learn the system and may need more advanced options. - - Using the limitations of whiptail vs dialog can help define the conventions for this level and remaining compatible with dialog -- Advanced: For advanced users, who have access to all options and configurations, - - These users are expected to have a deep understanding of the system and its tools, - - Basic knowledge of help messages and documentation should be assumed for these users. - - Help conventions will offer more complex options and configurations. - -## Categories -- System: - - configuring system-wide settings such as hostname, password, and time zone - -- Network: - - Managing network connections and settings - -- Display: - - Configuring display settings such as resolution and overscan - -- Interfaces: - - Enabling or disabling hardware interfaces such as camera, SSH, and SPI - -- Performance: - - Configuring performance-related settings such as overclocking and memory split - -- Localization: for - - Configuring language, keyboard, and regional settings - - -## File Naming -### category_does_menuname. -* advance_install_desktops.sh -* advance_install_system.sh -* systems_config_boardled.sh -* network_config_wirerless.sh -* utiilty_config_storage.sh -* utility_test_benchmark.sh - - -## Function Naming - -### Admin sudo user -**System administration, configuration, and security** -- `see_`: used for retrieving or viewing values `apt-cashe grep something` `ls -h` `cat file.txt` `lsblk` -- `set_`: used for setting or updating values `echo "somevalue" > somefile.txt` -- `get_`: used for getting downloads or updates `apt-get install something` -- `rem_`: used for removing or uninstalling something `apt-get purge something` -### Non Admin non sudo -**user space, end-user Customization** -- `run_`: used for running apps in the user space `/usr/bin/chromium --kiosk https://forum.armbian.com/ https://github.com/armbian/configng &` -- `mod_`: used for modifying or getting something in user space `git clone` `wget` - -## Help message format -### Existing Example -- `ls --help` Shows advanced flag options -- `p7zip -h` Shows simple flag options -- `git --help` Shows advanced non flag options - -```bash - -Usage: armbina-monitor [options] [ path | device ] - -Options: - -c [path] Performs disk health/performance tests - -d [device] Monitors writes to $device - -D Tries to upload debug disk info to improve armbianmonitor - -m Provides simple CLI monitoring - scrolling output - -M Provides simple CLI monitoring - fixed-line output - -n Provides simple CLI network monitoring - scrolling output - -N Provides simple CLI network monitoring - fixed-line output - -p Tries to install cpuminer for performance measurements - -r Tries to install RPi-Monitor - -u Tries to upload armbian-hardware-monitor.log for support purposes - -v Tries to verify installed package integrity - -z Runs a quick 7-zip benchmark to estimate CPU performance -``` - - - diff --git a/share/doc/armbian-configng/Reference.md b/share/doc/armbian-configng/Reference.md deleted file mode 100644 index 19372e172..000000000 --- a/share/doc/armbian-configng/Reference.md +++ /dev/null @@ -1,15 +0,0 @@ -# Bash - -## Lectures - - [[link]](https://missing.csail.mit.edu/2020/shell-tools/) - - [[youtube]](https://www.youtube.com/watch?time_continue=226&v=kgII-YWo3Zw&embeds_referring_euri=https%3A%2F%2Fmissing.csail.mit.edu%2F&source_ve_path=MjM4NTE&feature=emb_title) - -## Commands -- [[bash]](https://devhints.io/bash) -- [[awk]](https://www.shortcutfoo.com/app/dojos/awk/cheatsheet) -- [[sed]](https://quickref.me/sed.html) - -# TUI - -## tput -Explore [[tput]](https://linuxcommand.org/lc3_adv_tput.php) As a TUI \ No newline at end of file diff --git a/share/doc/armbian-configng/Sponsors.md b/share/doc/armbian-configng/Sponsors.md deleted file mode 100644 index 1a16ae933..000000000 --- a/share/doc/armbian-configng/Sponsors.md +++ /dev/null @@ -1,18 +0,0 @@ -Contributing Funds to Open Source Communities - -Rethinking Investment: Beyond Development Costs In the world of open source, contributing funds to a project's community is often misperceived as a development cost. However, savvy businesses recognize that it's not an expense for development but a strategic marketing investment with broader implications in the realm of developments. - -Shifting Perspectives: It's More Than Development -Community Recognition: Contributing funds to an open-source project's community establishes your business as a recognized and invested participant in the project's ecosystem. Brand Visibility: Investment in community funds results in increased brand visibility. As community members acknowledge your contribution, your brand gains exposure among a tech-savvy audience. Trust and Credibility: Financial support demonstrates trust and commitment, building credibility within the open-source community and fostering a positive perception of your brand. - -Marketing Impact: A Strategic Move Contributing funds to an open-source project's community isn't just an altruistic gesture; it's a strategic move with marketing benefits. - -Building a Positive Brand Image - -Example: GitHub Sponsors GitHub Sponsors allows businesses to financially support open-source developers. This not only aids development but also builds a positive brand image by showcasing commitment to the developer community. - -Best Practice: Transparent Communication Communicate openly about your financial contributions. Transparency reinforces your commitment to the community and strengthens the positive perception of your brand. - -Leveraging Community Funds for Strategic Marketing Sponsorship Opportunities: Explore sponsorship opportunities within open-source events or community initiatives. This not only supports the community but also positions your brand prominently in front of a relevant audience. Branded Content and Materials: Allocate a portion of your funds to create branded content or materials that resonate with the open-source community, ensuring your brand remains top-of-mind among community members. Strategic Partnerships: Use community funds to initiate strategic partnerships. Collaborating with key players in the open-source ecosystem can amplify your brand reach and market influence. - -Conclusion: Beyond Development, Toward Strategic Influence In summary, contributing funds to an open-source community is a marketing cost; it's a strategic investment with significant marketing implications. Businesses should recognize that it's not just about development expenses but about supporting the resources required to keep the community running. Additionally, for transparent developmental control, businesses can offer bounties to motivate coders and gain priority in the development process. \ No newline at end of file diff --git a/share/doc/armbian-configng/armbian-configng.md b/share/doc/armbian-configng/armbian-configng.md index ef13e4d3c..090c8ec3a 100755 --- a/share/doc/armbian-configng/armbian-configng.md +++ b/share/doc/armbian-configng/armbian-configng.md @@ -43,7 +43,7 @@ function group::string() {s - [HTML](share/armbian-configng/armbian-configng-table.html) - [github.io](//tearran/github.io/armbian-configng/index.html) ## Functions list as of 2024-01-09 -## help +## Help ### see_help.sh @@ -59,7 +59,7 @@ Locale Language Region Time Keyboard ### set_timezones.sh - **Group Name:** locales - - **Action Name:** Timezone + - **Action Name:** timezone - **Options:** user selection - **Description:** Time zone configuration @@ -78,17 +78,17 @@ Ehternet Wierless Blutooth AccessPoint ### get_softy.sh - - **Group Name:** locales - - **Action Name:** Timezone - - **Options:** user selection - - **Description:** Time zone configuration + - **Group Name:** placeholder + - **Action Name:** dowloads + - **Options:** none + - **Description:** Softy is a software manager for Armbian. ## System Third-party applications ### get_system_clone.sh - - **Group Name:** testing + - **Group Name:** placeholder - **Action Name:** Install - **Options:** [sdcard] [emmc] [usb] - **Description:** Armbian installer diff --git a/share/doc/armbian-configng/armbianmonitor.1.md b/share/doc/armbian-configng/armbianmonitor.md similarity index 100% rename from share/doc/armbian-configng/armbianmonitor.1.md rename to share/doc/armbian-configng/armbianmonitor.md diff --git "a/share/doc/armbian-configng/armbian\342\200\220config.1.md" "b/share/doc/armbian-configng/armbian\342\200\220config.1.md" deleted file mode 100644 index 67cdb04dc..000000000 --- "a/share/doc/armbian-configng/armbian\342\200\220config.1.md" +++ /dev/null @@ -1,93 +0,0 @@ -## NAME - -config - A command line tool for system configuration - -## SYNOPSIS - -config [ -r | Group | option ] - -## DESCRIPTION - -The `config` command is a command line tool for system configuration. It provides a range of options for configuring various aspects of the system, including wireless, IO, installation, benchmarking, CPU core, and block device settings. - -## OPTIONS - -- `-r` Run a function group. - -- `Group` The name of the function group to run. - -- `option` The option to run within the specified function group. - - - `wireless [options]` - - `set_wifi_nmtui` Enable or Disable wifi text user interface. - - `set_wpa_connect` Enable or Disable wifi command line. - - - `iolocal [options]` - - `set_lirc` Enable or Disable Infrared Remote Control support. - - `see_sysled_opt` See a list of board led options. - - `set_sysled` See a list of board led options. - - - `install [options]` - - `see_desktops` Display a list of avalible desktops to install. - - - `benchymark [options]` - - `see_boot_times` armbian monitor help message and tools. - - `perform_task` system boot-up performance statistics. - - - `cpucore [options]` - - `see_policy` Return policy as int based on original armbian-config logic. - - `see_freqs` Return CPU frequencies as string delimited by space. - - `see_min_freq` Return CPU minimum frequency as string. - - `see_max_freq` Return CPU maximum frequency as string. - - `see_governor` Return CPU governor as string. - - `see_governors` Return CPU governors as string delimited by space. - - `set_freq` Set min, max and CPU governor. - - - `blockdevice [options]` - - `set_vflash` Set up a simulated MTD spi flash for testing. - - `rem_vflash` Remove tsting simulated MTD spi flash. - -## EXAMPLES - -To see a list of available desktops to install: - -``` -config install see_desktops -``` - -To enable Infrared Remote Control support: - -``` -config iolocal set_lirc -``` - -To see a list of board led options: - -``` -config iolocal see_sysled_opt -``` - -To set the minimum and maximum CPU frequencies and governor: - -``` -config cpucore set_freq -``` - -## SEE ALSO - -Additional documentation for the config command may be available on your system or online. - ---- -title: ARMBIAN-CONFIG - -section: 1 - -header: User Manual - -footer: armbian-config 1.0.0 - -author: Joey Turner, Tearran - -date: August 31, 2023 - ---- diff --git a/share/doc/armbian-configng/development.md b/share/doc/armbian-configng/development.md deleted file mode 100644 index e1e714afb..000000000 --- a/share/doc/armbian-configng/development.md +++ /dev/null @@ -1,147 +0,0 @@ -# Under construction -# Config Development Environment - -## Operating System -- Armbian GNU Linux - -## Shell -- GNU bash - -## Programming Languages -- GNU bash - -## Dev Directory Structure -see [Naming-Convention](https://github.com/Tearran/configng/wiki/Naming-Convention) for filenames - -## Minimum dev Requirements -- GNU Linux compatible text editor -- git -- Github account - -## Optional Tools -- equivs-build -- whiptail -- Visual Studio Code - -# deb -## Packages -### equivs-build - -equivs-build is often used when you want to create a simple package to satisfy dependencies or to register locally installed software with the package manager - -Install `equivs` package if you don't have it already installed: -``` -sudo apt-get install equivs -``` - -Change to the `~/.local/armbian-all-package-dumb` directory: -``` -mkdir -p ~/.local/src/armbian-all-package-dumb -cd ~/.local/src/armbian-all-package-dumb -``` - -Create a control file for your package using the `equivs-control` command. This command will create a template control file named `mypackage` that you can then edit to customize your package: -``` -equivs-control armbian-<$TBT>-catagory-name -``` - -4. Edit the `mypackage` control file using your preferred text editor. In this file, you can specify the package name, version, dependencies, and other information about your package. Here is an example of a simple control file for a package named `mypackage` with version `1.0` that depends on the `libc6` package: -``` -### Commented entries have reasonable defaults. -### Uncomment to edit them. -# Source: -Section: misc -Priority: optional -# Homepage: -Standards-Version: 3.9.2 - -Package: mypackage -Version: 1.0 -Depends: libc6 -# Recommends: -# Suggests: -# Provides: -# Replaces: -# Architecture: all -Description: short description of mypackage - long description of mypackage - . - second paragraph of long description -``` - -5. Build the package using the `equivs-build` command: -``` -equivs-build mypackage -``` - -This will create a `.deb` file in the current directory, which you can then install using the `dpkg` command. - - - - - -# Sources -From 8/8/2023 - -- https://manpages.debian.org/testing/equivs/equivs-build.1.en.html -- https://www.linuxbabe.com/linux-server/set-up-package-repository-debian-ubuntu-server. -- https://wiki.debian.org/DebianRepository/Setup. -- https://debian-handbook.info/browse/stable/sect.setup-apt-package-repository.html. -- https://debian-handbook.info/browse/stable/sect.building-first-package.html -- https://www.itzgeek.com/how-tos/linux/debian/setup-debian-11-official-repository-in-sources-list-etc-apt-sources-list.html. -- https://www.dynamsoft.com/codepool/linux-debian-reporisory-reprepro.html. -- http://example.org/debian. -- https://hub.docker.com/r/spotify/debify/. -- http://packages.falcot.com/. \ No newline at end of file diff --git a/share/doc/armbian-configng/installer.md b/share/doc/armbian-configng/installer.md deleted file mode 100644 index 18e10143b..000000000 --- a/share/doc/armbian-configng/installer.md +++ /dev/null @@ -1,2 +0,0 @@ -# Armbian Installer -TDOD \ No newline at end of file diff --git a/share/doc/armbian-configng/library.md b/share/doc/armbian-configng/library.md deleted file mode 100644 index 24266d1c1..000000000 --- a/share/doc/armbian-configng/library.md +++ /dev/null @@ -1,28 +0,0 @@ -# Armbian library - - - -### Library -#### Desktops -- [access_install_desktops.sh](https://github.com/Tearran/configng/blob/main/lib/config/access_install_desktops.sh) -- `config -r ` - -#### Wireless -- [network_configure_wireless.sh](https://github.com/Tearran/configng/blob/main/lib/config/network_configure_wireless.sh) -- `config -r ` - -#### CPU Core -- [system_configure_cpucore.sh](https://github.com/Tearran/configng/blob/main/lib/config/system_configure_cpucore.sh) -- `config -r ` - -#### Local IO -- [system_configure_localIO.sh](https://github.com/Tearran/configng/blob/main/lib/config/system_configure_localIO.sh) -- `config -r ` - -#### Block devices -- [system_simulate_blockdevice.sh](https://github.com/Tearran/configng/blob/main/lib/config/system_simulate_blockdevice.sh) -- `config -r ` - -#### Benchmark -- [utility_testing_benchmark.sh](https://github.com/Tearran/configng/blob/main/lib/config/utility_testing_benchmark.sh) -`config -r ` diff --git a/share/doc/armbian-configng/manual.md b/share/doc/armbian-configng/manual_generation.md similarity index 99% rename from share/doc/armbian-configng/manual.md rename to share/doc/armbian-configng/manual_generation.md index 708604393..ac5e07d3a 100644 --- a/share/doc/armbian-configng/manual.md +++ b/share/doc/armbian-configng/manual_generation.md @@ -22,4 +22,3 @@ man ./hello.1 [template](https://gist.githubusercontent.com/eddieantonio/55752dd76a003fefb562/raw/38f6eb9de250feef22ff80da124b0f439fba432d/hello.1.md) - diff --git a/share/doc/armbian-configng/monitor.md b/share/doc/armbian-configng/monitor.md deleted file mode 100644 index 7ee653aa3..000000000 --- a/share/doc/armbian-configng/monitor.md +++ /dev/null @@ -1,2 +0,0 @@ -# Armbian monitor -TODO \ No newline at end of file diff --git a/share/doc/armbian-configng/tui.md b/share/doc/armbian-configng/tui.md deleted file mode 100644 index 39b6813e6..000000000 --- a/share/doc/armbian-configng/tui.md +++ /dev/null @@ -1,67 +0,0 @@ -# Armbian tui - -[Text-based user interface](https://en.wikipedia.org/wiki/Text-based_user_interface) design to utilizes gnu bash modular system already in place - -Common example: - -- ` | grep ` -- `cat file` -- `<< EOF` -- ` | sed '..'` - -### Dependancy -- GNU bash shell -- awk -- dialog TUI - -#### Optional: -- newt whiptail - -```bash -sudo apt update && sudo apt install whiptail -``` - -## Help Message cli -`tui -h` -```bash -Usage: [command] | tui [ -h | -m | -o ] -Options: - -h, Print this help. - - -o, Opens an OK message Box - - -m, Opens an Menu select Box. - - -p, Opens Popup message box. - -``` -## Ok message box -`tui -o ` - -### Example: echo -```bash -echo "this is tui ok window" | tui -o -``` -image - - -### Example: system tool -```bash - systemd-analyze | tui -o -``` -image - -## Menu selection box -`tui -m ` - -### Example: Menu list followed by ok message. -```bash -apt-cache search desktop | grep -i -e "\-desktop-full " -e "\-desktop-environment " | awk -F "- " '{print $1, $2}' | tui -m | tui -o -``` - -https://github.com/Tearran/configng/assets/2831630/960d640f-a801-4e6e-90f0-39fb6d952b10 - - -- [bash manual](https://www.gnu.org/software/bash/manual/bash.html) -- [zsh conditional expressions](https://zsh.sourceforge.io/Doc/Release/Conditional-Expressions.html) -- [pretty dialog boxes](https://gijs-de-jong.nl/posts/pretty-dialog-boxes-for-your-shell-scripts-using-whiptail/) \ No newline at end of file diff --git a/share/doc/armbian-configng/user_manual_generation.md b/share/doc/armbian-configng/user_manual_generation.md deleted file mode 100644 index 73840718f..000000000 --- a/share/doc/armbian-configng/user_manual_generation.md +++ /dev/null @@ -1,106 +0,0 @@ -# User Manual generation -Steps To create a comprehensive man page with various sections and formatted content, including usage examples and tutorials, you can follow these steps: - -1. **Create Markdown Content:** - Write the content for your man page in Markdown format, including all the necessary sections, descriptions, usage examples, and tutorials. Make sure to structure the content properly using appropriate Markdown headers (`#`, `##`, `###`, etc.). - -```markdown -# ARMBIAN-CONFIG(1) User Manual - -## NAME - -config - A command line tool for system configuration - -## SYNOPSIS - -**config** [ -r | Group | option ] - -## DESCRIPTION - -The `config` command is a command-line tool for system configuration. It provides a range of options for configuring various aspects of the system... - -## OPTIONS - -- `-h`: Show the help message. -- `-l`: Show a list of available group options. -- ... - -## EXAMPLES - -To see a list of available desktops to install: - - -`config install see_desktops` - - -To enable Infrared Remote Control support: - - -`config iolocal set_lirc` - - -## SEE ALSO - -Additional documentation for the config command may be available on your system or online. -``` - -2. **Convert Markdown to Man Page:** - Use `pandoc` to convert the Markdown content into a formatted man page. You can include metadata and specify the output filename: - - - `sudo apt updated && sudo apt install pandoc` - - - - `pandoc --standalone -t man input.md -o output.1` - - -3. **Add Additional Sections:** - For more detailed sections like tutorials, additional usage examples, and tutorials, you can use the standard man page sections and headers. Here's an example of how you can add a "TUTORIALS" section: - -```md -## TUTORIALS - - -### Setting Up Wireless Network - -To configure a wireless network connection, follow these steps: - -1. Run the following command to open the wireless network configuration menu: - - `config -r wireless` - -2. Select the appropriate option to enable or disable wireless interfaces... - -### Advanced Configuration - -For advanced system configuration, you can use the following options... - -... -``` - -4. **Generate the Man Page:** - Run the `pandoc` command again to generate the man page with the additional sections and tutorials: - - ```bash - pandoc --standalone -t man input.md -o output.1 - ``` - -5. **Compress Man Page:** - If you want to create a compressed man page as `.gz` (common in Debian-based systems), use the `gzip` command: - - ```bash - gzip output.1 - ``` - ---- -title: ARMBIAN-CONFIG - -section: 1 - -header: User Manual - -footer: armbian-config 1.0.0 - -author: Joey Turner, Tearran - -date: August 31, 2023 -... \ No newline at end of file