#!/usr/bin/env bash #shellcheck disable=SC2155,SC2034 #shellcheck source=/dev/null # /usr/share/bigbashview/bcc/apps/big-store/index.sh.htm # Description: Big Store installing programs for BigLinux # # Created: 2020/01/11 # Altered: 2024/08/15 # # Copyright (c) 2023-2024, Vilmar Catafesta # 2022-2024, Bruno Gonçalves # 2022-2024, Rafael Ruscher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. APP="${0##*/}" _DATE_ALTERED_='15-08-2024 - 14:16' VERSION_="1.0.0-20240815" _HTML_VERSION_="${_VERSION_} - ${_DATE_ALTERED_}" _UPDATED_="${_DATE_ALTERED_}" LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'} [[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh" [[ -f "${LIBRARY}/bstrlib.sh" ]] && source "${LIBRARY}/bstrlib.sh" function sh_index_sh_htm_config { export ACTION export WINDOW_ID export PACKAGE_NAME declare -g cAudio=$"Audio" declare -g cImagem=$"Imagem" declare -g cVideo=$"Video" declare -g cInternet=$"Internet" declare -g cEscritorio=$"Escritório" declare -g cGraficos=$"Gráficos" declare -g cMultimidia=$"Multimidia" declare -g cJogos=$"Jogos" declare -g cRetroarch=$"Emulador Retroarch" declare -g cEmuladores=$"Emuladores" declare -g cCartas=$"Cartas" declare -g cSistema=$"Sistema" declare -g cXSistema=$"X-Sistema" declare -g cDesenvolvimento=$"Desenvolvimento" declare -g cSobre=$"Sobre" #variáveis públicas export appstream_search_category=0 export aur_search_category=0 export flatpak_search_category=0 export snap_search_category=0 } function APPSTREAM_CATEGORY() { local param_search="$*" local count if [[ "$appstream_checkbox" = "checked" ]]; then [[ -e "${TMP_FOLDER}/appstream_number.html" ]] && rm -f "${TMP_FOLDER}/appstream_number.html" [[ -e "${TMP_FOLDER}/appstream.html" ]] && rm -f "${TMP_FOLDER}/appstream.html" [[ -e "${TMP_FOLDER}/appstream_build.html" ]] && rm -f "${TMP_FOLDER}/appstream_build.html" pacman -Qu | awk '{print $1}' >$TMP_FOLDER/upgradeable.txt if ((appstream_search_category)); then # python search_category_appstream_pamac.py "${param_search,,}" > "${TMP_FOLDER}/appstream.html" & wait sh_search_appstream "${param_search,,}" & wait appstream_search_category=0 else # python search_appstream_pamac.py "${param_search,,}" > "${TMP_FOLDER}/appstream.html" & wait sh_search_appstream "${param_search,,}" & wait fi if count=$(sh_read_number_var "${TMP_FOLDER}/appstream_number.html") && [[ $count -ge 1 ]]; then cat <<-EOF
$Programas_Nativos
EOF else cat <<-EOF EOF fi fi } export -f APPSTREAM_CATEGORY function AUR_CATEGORY { local param_search="$*" local count if [[ "$aur_checkbox" = "checked" ]]; then [[ -e "${TMP_FOLDER}/aur_number.html" ]] && rm -f "${TMP_FOLDER}/aur_number.html" [[ -e "${TMP_FOLDER}/aur.html" ]] && rm -f "${TMP_FOLDER}/aur.html" [[ -e "${TMP_FOLDER}/aur_build.html" ]] && rm -f "${TMP_FOLDER}/aur_build.html" if ((aur_search_category)); then # ./category_aur.sh $(<"$TMP_FOLDER/category_aur.txt") >/dev/null 2>&1 & # sh_search_aur_category $(<"$TMP_FOLDER/category_aur.txt") & wait # resultFilter_checkbox="$resultFilter_checkbox" sh_search_aurRegex "${param_search,,}" & resultFilter_checkbox="$resultFilter_checkbox" sh_search_aur "${param_search,,}" & wait aur_search_category=0 else # resultFilter_checkbox="$resultFilter_checkbox" source search_aur.sh ${param_search,,} >/dev/null 2>&1 & # resultFilter_checkbox="$resultFilter_checkbox" sh_search_aurRegex "${param_search,,}" & resultFilter_checkbox="$resultFilter_checkbox" sh_search_aur "${param_search,,}" & wait fi if count=$(sh_read_number_var "${TMP_FOLDER}/aur_number.html") && [[ $count -ge 1 ]]; then cat <<-EOF
$Programas_AUR
EOF else cat <<-EOF EOF fi fi } export -f AUR_CATEGORY function FLATPAK_CATEGORY { local param_search="$*" local i local count if [[ "$flatpak_checkbox" = "checked" ]]; then [[ -e "$TMP_FOLDER/flatpak_number.html" ]] && rm -f "$TMP_FOLDER/flatpak_number.html" [[ -e "$TMP_FOLDER/flatpak.html" ]] && rm -f "$TMP_FOLDER/flatpak.html" [[ -e "$TMP_FOLDER/flatpak_build.html" ]] && rm -f "$TMP_FOLDER/flatpak_build.html" if ((flatpak_search_category)); then sh_search_flatpak "${param_search,,}" & wait flatpak_search_category=0 else resultFilter_checkbox="$resultFilter_checkbox" sh_search_flatpak "${param_search,,}" & wait fi if count="$(sh_read_number_var "${TMP_FOLDER}/flatpak_number.html")" && [[ "$count" -ge 1 ]]; then cat <<-EOF
$Programas_Flatpak
EOF else cat <<-EOF EOF fi fi } export -f FLATPAK_CATEGORY function SNAP_CATEGORY { local param_search="$*" local i local count if [[ "$snap_checkbox" = "checked" ]]; then [[ -e "$TMP_FOLDER/snap.html" ]] && rm -f "$TMP_FOLDER/snap.html" [[ -e "$TMP_FOLDER/snap_number.html" ]] && rm -f "$TMP_FOLDER/snap_number.html" [[ -e "$TMP_FOLDER/snap_build.html" ]] && rm -f "$TMP_FOLDER/snap_build.html" if ((snap_search_category)); then sh_search_snap "${param_search,,}" & wait snap_search_category=0 else resultFilter_checkbox="$resultFilter_checkbox" sh_search_snap "${param_search,,}" & wait fi if count=$(sh_read_number_var "${TMP_FOLDER}/snap_number.html") && [[ $count -ge 1 ]]; then cat <<-EOF
$Programas_Snap
EOF else cat <<-EOF EOF fi fi } export -f SNAP_CATEGORY function ICON_CATEGORY() { local category="$1" local classe="$2" local cname="$3" local main_category="$4" cat <<-EOF
$cname
EOF } export -f ICON_CATEGORY #Show category in first page ############################ function sh_index_sh_htm_main { source header.sh.htm if [[ -z "$category" ]] && [[ "${#search}" -le "2" ]]; then cat <<-EOF
EOF # if sh_get_XIVAStudio; then if TIni.Exist "$INI_FILE_BIG_STORE" "XIVA" "xiva_active" '1'; then cat <<-EOF
$cXSistema
EOF ICON_CATEGORY storage "fas fa-chart-pie" $"Armazenamento e partições" $cXSistema ICON_CATEGORY javajar "fab fa-java" $"Java JRE" $cXSistema ICON_CATEGORY virtualization "fas fa-laptop-code" $"Virtualização" $cXSistema cat <<-EOF
$cImagem
EOF ICON_CATEGORY vetorial "fas fa-bezier-curve" $"Editores Vetorial" $cImagem ICON_CATEGORY imageditor "fas fa-paint-brush" $"Editores de imagem, fotografia e desenho" $cImagem ICON_CATEGORY editortexto "fas fa-paint-brush" $"Editores de texto linha de comando" $cImagem # ICON_CATEGORY screenshot "fas fa-expand" $"Captura de tela (Screenshot)" $cImagem ICON_CATEGORY imagemconvert "fas fa-file-image" $"Converter, redimensionar ou compactar imagens" $cImagem # ICON_CATEGORY image-plugins "fas fa-plug" $"Imagem Plugins" $cImagem ICON_CATEGORY 3dcad "fas fa-cube" $"Edição 3D e CAD" $cImagem ICON_CATEGORY fontes "fas fa-font" $"Fontes (Tipografia)" $cImagem ICON_CATEGORY diagramacao "fas fa-file-invoice" $"Diagramação e organização de páginas" $cImagem ICON_CATEGORY colorizacao "fas fa-palette" $"Colorização e palheta de cores" $cImagem cat <<-EOF
$cVideo
EOF ICON_CATEGORY videoeditors "fas fa-photo-video" $"Editores de video" $cVideo ICON_CATEGORY videoplay "fas fa-film" $"Reprodutores de vídeo" $cVideo ICON_CATEGORY 2deditor "fas fa-film" $"Animação e 2D" $cVideo ICON_CATEGORY captura "fas fa-video" $"Captura de tela e video download" $cVideo ICON_CATEGORY videotream "fas fa-tv" $"Stream/transmissão online" $cVideo ICON_CATEGORY dvdvideoconverter "fas fa-compact-disc" $"Conversores de vídeo e gravadores CD/DVD" $cVideo cat <<-EOF
$cAudio
EOF ICON_CATEGORY audioplayer "fas fa-headphones" $"Reprodutores de áudio" $cAudio ICON_CATEGORY radio "fas fa-broadcast-tower" $"Rádio online" $cAudio ICON_CATEGORY audioconvert "fas fa-microphone" $"Gravadores e conversores de áudio" $cAudio ICON_CATEGORY audioeditor "fas fa-music" $"Editores de áudio (DAW)" $cAudio ICON_CATEGORY audio-plugins "fas fa-plug" $"Audio Plugins" $cAudio cat <<-EOF
EOF fi ## Big category ## #echo '' cat <<-EOF
$cInternet
EOF ICON_CATEGORY browser "fas fa-globe" $"Navegadores" $cInternet ICON_CATEGORY mail "fas fa-envelope" $"E-mail" $cInternet ICON_CATEGORY cloud "fas fa-cloud-upload-alt" $"Armazenamento nas nuvens" $cInternet ICON_CATEGORY download "fas fa-file-download" $"Download" $cInternet ICON_CATEGORY torrent "fas fa-magnet" $"Compartilhadores e Torrent" $cInternet ICON_CATEGORY messages "fas fa-comments" $"Mensageiros e Conferências" $cInternet ICON_CATEGORY remote "fas fa-laptop-house" $"Acesso Remoto, FTP, SSH, VNC, RDP..." $cInternet ICON_CATEGORY network "fas fa-network-wired" $"Ferramentas de rede" $cInternet ICON_CATEGORY news "fas fa-newspaper" $"Notícias, Feeds e RSS" $cInternet cat <<-EOF
$cEscritorio
EOF ICON_CATEGORY office "fas fa-briefcase" $"Suíte Office" $cEscritorio ICON_CATEGORY book "fas fa-book" $"Visualizadores de PDF, Epub, e-books e mais" $cEscritorio ICON_CATEGORY pdf "fas fa-file-pdf" $"Editores de PDF" $cEscritorio ICON_CATEGORY calendar "fas fa-calendar-alt" $"Agenda de tarefas e contatos" $cEscritorio # ICON_CATEGORY calc "fas fa-calculator" $"Cálculos" $cEscritorio # ICON_CATEGORY other "fas fa-random" $"Outros" $cEscritorio cat <<-EOF
$cGraficos
EOF ICON_CATEGORY imageplayer "fas fa-image" $"Visualizadores de imagem" $cGraficos ICON_CATEGORY imageeditor "fas fa-paint-brush" $"Editores de imagem e ferramentas de desenho" $cGraficos ICON_CATEGORY screenshot "fas fa-expand" $"Captura de tela (Screenshot)" $cGraficos ICON_CATEGORY imageconvert "fas fa-file-image" $"Converter, redimensionar ou compactar imagens" $cGraficos ICON_CATEGORY 3d "fas fa-cube" $"Edição 3D e CAD" $cGraficos cat <<-EOF
$cMultimidia
EOF ICON_CATEGORY audioplayer "fas fa-headphones" $"Reprodutores de áudio" $cMultimidia ICON_CATEGORY radio "fas fa-broadcast-tower" $"Rádio online" $cMultimidia ICON_CATEGORY audioconvert "fas fa-microphone" $"Gravadores e conversores de áudio" $cMultimidia ICON_CATEGORY audioeditor "fas fa-music" $"Editores de áudio" $cMultimidia ICON_CATEGORY videoplayer "fas fa-film" $"Reprodutores de vídeo" $cMultimidia ICON_CATEGORY videostream "fas fa-tv" $"Vídeo online, IPTV, Youtube..." $cMultimidia ICON_CATEGORY videoeditor "fas fa-photo-video" $"Editores e compactadores de vídeo" $cMultimidia ICON_CATEGORY dvd "fas fa-compact-disc" $"Gravadores e copiadores de CD e DVD" $cMultimidia ICON_CATEGORY webcam "fas fa-video" $"Webcam, gravação de tela e transmissão de vídeo" $cMultimidia cat <<-EOF
$cJogos
EOF ICON_CATEGORY gamemanager "fas fa-gamepad" $"Gerenciadores de jogos" $cJogos ICON_CATEGORY gameutility "fas fa-toolbox" $"Utilitários para jogos" $cJogos #ICON_CATEGORY gameretroarch "fas fa-cog" $"Emulador Retroarch" $cJogos cat <<-EOF
$cRetroarch
EOF #ICON_CATEGORY gameemulator "fas fa-cogs" $"Emuladores" cat <<-EOF
$cEmuladores
EOF ICON_CATEGORY devgames "fas fa-code" $"Criadores de jogos" $cEmuladores ICON_CATEGORY gamearcade "fas fa-rocket" $"Ação/Arcade" $cEmuladores #ICON_CATEGORY gamecard "fas fa-crown" $"Cartas" $cEmuladores cat <<-EOF
$cCartas
EOF ICON_CATEGORY gameeducational "fas fa-graduation-cap" $"Educacional" $cCartas ICON_CATEGORY gamestrategy "fas fa-user-secret" $"Estratégia" $cCartas ICON_CATEGORY gamepuzzle "fas fa-puzzle-piece" $"Puzzles" $cCartas ICON_CATEGORY gameboard "fas fa-chess-board" $"Tabuleiro" $cCartas ICON_CATEGORY gamerpg "fas fa-dice-d20" $"RPG" $cCartas ICON_CATEGORY gameother "fas fa-dice" $"Outros" $cCartas cat <<-EOF
$cSistema
EOF ICON_CATEGORY storage "fas fa-chart-pie" $"Armazenamento e partições" $cSistema ICON_CATEGORY fonts "fas fa-font" $"Fontes (Tipografia)" $cSistema ICON_CATEGORY javajar "fab fa-java" $"Java JRE" $cSistema ICON_CATEGORY virtualization "fas fa-laptop-code" $"Virtualização" $cSistema cat <<-EOF
$cDesenvolvimento
EOF ICON_CATEGORY deveditor "fas fa-file-code" $"Editores de código e IDE" $cDesenvolvimento ICON_CATEGORY devbd "fas fa-database" $"Banco de dados" $cDesenvolvimento ICON_CATEGORY devwebserver "fas fa-server" $"Servidores WEB" $cDesenvolvimento #sex 05 jan 2024 12:19:03 -04 cat <<-EOF
$cSobre
EOF cat <<-EOF
  • $(gettext "Ambiente"):
  •     $(gettext "Desktop") : $XDG_CURRENT_DESKTOP
        $(gettext "Sessão") : $XDG_SESSION_TYPE
EOF cat <<-EOF
  • $(gettext "Aplicativo"):
  •     $(gettext "Nome") : $TEXTDOMAIN
        $(gettext "Htm versão") : $_HTML_VERSION_
        $(gettext "Lib versão") : $_BSTRLIB_VERSION_
EOF cat <<-EOF
  • $(gettext "Desenvolvedores"):
  •     2023-2024 Vilmar, vcatafesta@gmail.com
        2020-2022 Bruno, biglinux.com.br
        2020-2022 Rafael, rruscher@gmail.com
        2020-2022 eltonff, biglinux.com.br
EOF cat <<-EOF
  • $(gettext "Colaboradores/testers"):
  •     Marcelo, @elppans
        Lucas, @luskaedivinsky
EOF #sex 05 jan 2024 12:19:03 -04 cat <<-EOF
EOF fi source biglinux-category # if sh_get_XIVAStudio; then if TIni.Exist "$INI_FILE_BIG_STORE" "XIVA" "xiva_active" '1'; then source xiva-category cat <<-EOF
EOF else cat <<-EOF
EOF fi } #sh_debug sh_index_sh_htm_config sh_index_sh_htm_main