Skip to content

Commit 0589809

Browse files
authored
Merge pull request #822 from ivan-hc/dev
"AM" 7.5: Allow "-l" and "-q" to show only available AppImages
2 parents d385d2b + 730644a commit 0589809

File tree

9 files changed

+2007
-12
lines changed

9 files changed

+2007
-12
lines changed

APP-MANAGER

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
AMVERSION="7.4"
3+
AMVERSION="7.5"
44

55
# Determine main repository and branch
66
AMREPO="https://raw.githubusercontent.com/ivan-hc/AM/main"
@@ -468,6 +468,7 @@ function _generate_options_list() {
468468
unlock
469469
update
470470
web
471+
--appimages
471472
--apps
472473
--byname
473474
--config

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,9 @@ See also "[How to update or remove apps manually](#how-to-update-or-remove-apps-
514514

515515
`-l`
516516

517-
DESCRIPTION: Shows the list of all the apps available in the repository.
517+
`-l --appimages`
518+
519+
DESCRIPTION: Shows the list of all the apps available in the repository. Add the "--appimages" option to list only the AppImages.
518520
___________________________________________________________________________
519521

520522
`-o`, `overwrite`
@@ -532,9 +534,11 @@ See also "[How to update or remove apps manually](#how-to-update-or-remove-apps-
532534

533535
`-q {KEYWORD}`
534536

537+
`-q --appimages {KEYWORD}`
538+
535539
`-q --pkg {PROGRAM1} {PROGRAM2}`
536540

537-
DESCRIPTION: Can be used to search for keywords and terms in the list of available applications packages to display matches. This can be useful if you are looking for applications having a specific feature. Add the suboption "--pkg" to search only the names of one or more apps.
541+
DESCRIPTION: Can be used to search for keywords and terms in the list of available applications packages to display matches. This can be useful if you are looking for applications having a specific feature. Add the "--appimages" option to list only the AppImages. Add the suboption "--pkg" to search only the names of one or more apps.
538542
___________________________________________________________________________
539543

540544
`-r`, `remove`
@@ -893,6 +897,10 @@ Option `-q` or `query` shows search results from the list above.
893897

894898
https://github.com/ivan-hc/AM/assets/88724353/2ac875df-5210-4d77-91d7-24c45eceaa2b
895899

900+
From version 7.5 it is possibler to add the `--appimages` option to list only the AppImages.
901+
902+
https://github.com/user-attachments/assets/864e95dd-0f69-4b8b-b6b3-289af3610aac
903+
896904
------------------------------------------------------------------------
897905

898906
| [Back to "Guides and tutorials"](#guides-and-tutorials) | [Back to "Main Index"](#main-index) |

modules/database.am

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ _list() {
106106
else
107107
MESSAGE=$(echo " YOU HAVE INSTALLED $APPSNUMBER APPLICATIONS OUT OF $(grep -e "$" -c $AMPATH/$arch-apps) AVAILABLE")
108108
fi
109-
echo -e "\n$MESSAGE\n$MESSAGE2\n LIST OF THE $(grep -e "$" -c $AMPATH/$arch-apps) APPLICATIONS AVAILABLE IN THE 'AM' REPOSITORY:\n\n$(cat $AMPATH/$arch-apps | _clean_lists_and_queries)\n" | less -I
110-
echo -e "\n$MESSAGE\n$MESSAGE2"
111109
}
112110

113111
# Define functions
@@ -150,6 +148,20 @@ case "$1" in
150148

151149
'-l'|'list')
152150
_list
151+
if [ "$2" = --appimages ]; then
152+
if test -f "$AMCACHEDIR/$arch-appimages"; then
153+
echo -e "\n$MESSAGE\n$MESSAGE2\n LIST OF THE $(grep -e "$" -c "$AMCACHEDIR/$arch-appimages") APPIMAGES AVAILABLE IN THE 'AM' REPOSITORY:\n\n$(cat "$AMCACHEDIR/$arch-appimages" | _clean_lists_and_queries)\n" | less -I
154+
echo -e "\n$MESSAGE\n$MESSAGE2"
155+
else
156+
_online_check
157+
curl -Ls "$AMREPO/programs/$arch-appimages" > "$AMCACHEDIR/$arch-appimages"
158+
echo -e "\n$MESSAGE\n$MESSAGE2\n LIST OF THE $(grep -e "$" -c "$AMCACHEDIR/$arch-appimages") APPIMAGES AVAILABLE IN THE 'AM' REPOSITORY:\n\n$(cat "$AMCACHEDIR/$arch-appimages" | _clean_lists_and_queries)\n" | less -I
159+
echo -e "\n$MESSAGE\n$MESSAGE2"
160+
fi
161+
else
162+
echo -e "\n$MESSAGE\n$MESSAGE2\n LIST OF THE $(grep -e "$" -c "$AMPATH/$arch-apps") APPLICATIONS AVAILABLE IN THE 'AM' REPOSITORY:\n\n$(cat "$AMPATH/$arch-apps" | _clean_lists_and_queries)\n" | less -I
163+
echo -e "\n$MESSAGE\n$MESSAGE2"
164+
fi
153165
;;
154166

155167
'-q'|'query')
@@ -168,11 +180,22 @@ case "$1" in
168180
echo ""
169181
exit 0
170182
fi
171-
ARGS=$(echo "$@" | cut -f2- -d ' ')
172-
echo -e "\n Search results for \"$ARGS\":\n" | tr a-z A-Z
173-
PATTERN="$(echo "$@" | cut -f2- -d ' ' | sed 's/ /(?=.*/g; s/$/)/g; s/(/)(/g; s/^/(?=.*/g;')"
174-
grep -P -i "$PATTERN" "$AMPATH/$arch-apps" | _clean_lists_and_queries
175-
grep -P -i "$PATTERN" "$AMPATH/libs-list" | _clean_lists_and_queries
183+
if [ "$2" = --appimages ]; then
184+
ARGS=$(echo "$@" | cut -f3- -d ' ')
185+
echo -e "\n Search results for \"$ARGS\":\n" | tr a-z A-Z
186+
PATTERN="$(echo "$@" | cut -f3- -d ' ' | sed 's/ /(?=.*/g; s/$/)/g; s/(/)(/g; s/^/(?=.*/g;')"
187+
if ! test -f "$AMCACHEDIR/$arch-appimages"; then
188+
_online_check
189+
curl -Ls "$AMREPO/programs/$arch-appimages" > "$AMCACHEDIR/$arch-appimages"
190+
fi
191+
grep -P -i "$PATTERN" "$AMCACHEDIR/$arch-appimages" | _clean_lists_and_queries
192+
else
193+
ARGS=$(echo "$@" | cut -f2- -d ' ')
194+
echo -e "\n Search results for \"$ARGS\":\n" | tr a-z A-Z
195+
PATTERN="$(echo "$@" | cut -f2- -d ' ' | sed 's/ /(?=.*/g; s/$/)/g; s/(/)(/g; s/^/(?=.*/g;')"
196+
grep -P -i "$PATTERN" "$AMPATH/$arch-apps" | _clean_lists_and_queries
197+
grep -P -i "$PATTERN" "$AMPATH/libs-list" | _clean_lists_and_queries
198+
fi
176199
echo ""
177200
exit 0
178201
;;

modules/help.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,11 @@ function _help_body() {
156156
-l, list
157157
158158
SYNOPSIS: -l
159+
-l --appimages
159160
160161
DESCRIPTION: Shows the list of all the apps available in the repository.
162+
163+
Add the "--appimages" option to list only the AppImages.
161164
__________________________________________________________________________
162165
163166
-o, overwrite
@@ -170,10 +173,13 @@ function _help_body() {
170173
-q, query
171174
172175
SYNOPSIS: -q {KEYWORD}
176+
-q --appimages {KEYWORD}
173177
-q --pkg {PROGRAM1} {PROGRAM2}
174178
175179
DESCRIPTION: Search for keywords in the list of available applications.
176180
181+
Add the "--appimages" option to list only the AppImages.
182+
177183
Add the "--pkg" option to search only the names of one or more apps.
178184
__________________________________________________________________________
179185

programs/aarch64-appimages

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
◆ 86box : Emulator of x86-based machines based on PCem.
2+
◆ appimagetool : Tool to generate an AppImage from an existing AppDir.
3+
◆ crossmobile : Create native iOS/Android/Windows apps in Java.
4+
◆ nanosaur : Pangea Software’s game, adventure of a cybernetic dinosaur.
5+
◆ streamlink : Command-line which pipes video streams from various services.
6+
◆ zmninja : Ionic app for Home/Commerical Security Surveillance.

programs/aarch64-apps

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
◆ 86box : Emulator of x86-based machines based on PCem.
2-
◆ aih2am : Tool to convert apps from appimage.github.io to AM's installers.
32
◆ antares : An useful SQL client based on Electron.js and Vue.js.
43
◆ appimagetool : Tool to generate an AppImage from an existing AppDir.
54
◆ arch-deployer : Script to convert Arch Linux packages to AppDir/AppImage.
65
◆ btop : A command line utility to monitor system resources, like Htop.
76
◆ crossmobile : Create native iOS/Android/Windows apps in Java.
87
◆ figma-linux : First interface design tool based in the browser (graphics).
98
◆ freac : fre:ac, free audio converter and CD ripper for various encoders.
10-
◆ github2am : CLI to convert apps from any github repository to AM's installers.
119
◆ nanosaur : Pangea Software’s game, adventure of a cybernetic dinosaur.
1210
◆ streamlink : Command-line which pipes video streams from various services.
1311
◆ supertuxkart : Free kart racing game focused on fun.

programs/appimage-lister-uniq.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
DIRS=$(find . -type d | grep "/" | sed 's:.*/::')
4+
for arch in $DIRS; do
5+
rm -f "$arch-appimages"
6+
ARGS=$(awk -v FS="(◆ | : )" '{print $2}' <"$arch-apps")
7+
for arg in $ARGS; do
8+
if grep -qe "appimage\|mage\$" "./$arch/$arg" 1> /dev/null; then
9+
if ! grep "$arg :" "$arch-apps" | grep -ie "\"kdegames\"\|\"kdeutils\"" 1> /dev/null; then
10+
grep "$arg :" "$arch-apps" >> "$arch-appimages"
11+
fi
12+
fi
13+
done
14+
done

programs/i686-appimages

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
◆ appimagelauncher : CLI helper for running and integrating AppImages.
2+
◆ appimagetool : Tool to generate an AppImage from an existing AppDir.
3+
◆ appimageupdate : Tool to update an AppImage using embedded information.
4+
◆ appimageupdatetool : Tool to update an AppImage using embedded information.
5+
◆ armagetronad : Multiplayer game in 3d that emulates the movie "Tron".
6+
◆ chromium : Web Browser. Open source base of Google Chrome, Edge and Brave.
7+
◆ gimp : GNU Image Manipulation Program, cross-platform image and photo editor.
8+
◆ kdegames : Full & updatable KDE Games suite from Debian Stable (recommended).
9+
◆ pkg2appimage : Utility to convert .yml recipes to AppDir (see appimagetool).
10+
◆ python2.7 : Interactive high-level object-oriented language (version 2.7).
11+
◆ python3.10 : Interactive high-level object-oriented language (version 3.10).
12+
◆ python3.5 : Interactive high-level object-oriented language (version 3.5).
13+
◆ python3.6 : Interactive high-level object-oriented language (version 3.6).
14+
◆ python3.7 : Interactive high-level object-oriented language (version 3.7).
15+
◆ python3.8 : Interactive high-level object-oriented language (version 3.8).
16+
◆ python3.9 : Interactive high-level object-oriented language (version 3.9).
17+
◆ vlc : Free and Open Source Video & Media player for Audio, streaming and more.

0 commit comments

Comments
 (0)