Skip to content

Commit

Permalink
Add support for Toolpacks (#1096)
Browse files Browse the repository at this point in the history
* Add support for Toolpacks

* Update APP-MANAGER

* Assign a number for the toolpack metadata

* Option -a, add support for Toolpack

...fix #1079 (comment)

* Option -i, fix missing argument in Toolpacks

...fix #1079 (comment)

* Add Toolpack support for -q and -l

#1079

* Add --toolpack to the help message

* Update README.md

* Update README.md, add partner projects (Toolpacks)

* Update README.md

* Update APP-MANAGER

* Option -i, allow installing Toolpacks without flag but with extension...

...the extension must be .toolpack

* Update README.md

* Update APP-MANAGER

* Option -f, add a new column to check the source database (DB)

* Option -f, check if the installed app come from an unknown database

...or if it come not from a database, maybe it was installed with the option -e

* Option -f, check if the app is installed using the "-e" option

* Option -f, mark "extra" apps as "none" in DB

* Option -l, "wait" before release lists of toolpacks and appimages...

...also sort the toolpacks list and show only unique items (remove duplicates).

* Add completion terms from an existing toolpacks list

* Options -l and -q, add flag "--all" to show lists all together

* Update APP-MANAGER

* Update README.md

* With the --toolpack flag you can also install apps from AM...

...if they are not present in Toolpacks

* Do not include metapackages in the total programs count

* Update database.am

...replace final spaces with a dot in Toolpacks description (option -l).

* Option -l, show the total programs number of the just closed list

* Update APP-MANAGER
  • Loading branch information
ivan-hc authored Nov 10, 2024
1 parent b00093c commit 322a545
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 39 deletions.
29 changes: 24 additions & 5 deletions APP-MANAGER
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

AMVERSION="9.0.2"
AMVERSION="9.1"

# Determine main repository and branch
AMREPO="https://raw.githubusercontent.com/ivan-hc/AM/main"
Expand Down Expand Up @@ -360,6 +360,11 @@ function _am_newrepo_check() {

_am_newrepo_check "$@"

# 3RD PARTY SOURCES -- TOOLPACK
toolpack_repo="https://github.com/Azathothas/Toolpacks"
export toolpack_readme="https://bin.pkgforge.dev/${ARCH}/AM.txt"
export toolpack_name="1" toolpack_description="2" toolpack_site="3" toolpack_dl="4" toolpack_ver="5"

################################################################################
# UTILITIES
################################################################################
Expand All @@ -369,12 +374,13 @@ available_options="about add apikey backup clean config disable downgrade downlo
install install-appimage launcher list lock neodb newrepo nolibfuse off on overwrite purge query remove sandbox \
select sync template test unlock update --all --appimages --apps --byname --config --convert --debug \
--devmode-disable --devmode-enable --disable-notifications --enable-notifications --force-latest --home --icons \
--launcher --less --pkg --rollback --disable-sandbox --sandbox --system --user"
--launcher --less --pkg --rollback --disable-sandbox --sandbox --system --toolpack --user"

function _completion_lists() {
# Remove existing lists and download new ones
curl -Ls "$APPSLISTDB" > "$AMDATADIR/$arch-apps"
awk -v FS="(◆ | : )" '{print $2}' <"$AMDATADIR"/"$arch"-apps > "$AMDATADIR"/list
[ -f "$AMCACHEDIR/$ARCH-toolpack" ] && awk -v FS="(◆ | : )" '{print $2}' <"$AMCACHEDIR/$ARCH-toolpack" >> "$AMDATADIR"/list
# Append options to the list
for o in $available_options; do
echo "$o" >> "$AMDATADIR"/list
Expand Down Expand Up @@ -1104,7 +1110,7 @@ case "$1" in
${LightBlue}$AMCLI -i --force-latest {PROGRAM}
${LightBlue}$AMCLI -i --icons {PROGRAM}\033[0m
Description: Install one or more programs or libraries from the list. With the \"--debug\" option you can see log messages to debug the script. For more details on \"--force-latest\", see the dedicated option, below. Use the \"--icons\" flag to allow the program to use icon themes.
Description: Install one or more programs or libraries from the list. With the \"--debug\" option you can see log messages to debug the script. For more details on \"--force-latest\", see the dedicated option, below. Use the \"--icons\" flag to allow the program to use icon themes. It can also be extended with additional flags (see \"--toolpack\").
${Gold}install-appimage, -ia\033[0m
Expand All @@ -1124,9 +1130,10 @@ case "$1" in
${Gold}list, -l\033[0m
${LightBlue}$AMCLI -l
${LightBlue}$AMCLI -l --all
${LightBlue}$AMCLI -l --appimages\033[0m
Description: Shows the list of all the apps available, or just the AppImages.
Description: Shows the list of all the apps available, or just the AppImages. It can also be extended with additional flags, the \"--all\" flag allows you to consult the set of all supported databases (see \"--toolpack\").
${Gold}newrepo, neodb\033[0m
Expand All @@ -1153,10 +1160,11 @@ case "$1" in
${Gold}query, -q\033[0m
${LightBlue}$AMCLI -q {KEYWORD}
${LightBlue}$AMCLI -q --all {KEYWORD}
${LightBlue}$AMCLI -q --appimages {KEYWORD}
${LightBlue}$AMCLI -q --pkg {PROGRAM1} {PROGRAM2}\033[0m
Description: Search for keywords in the list of available applications, add the \"--appimages\" option to list only the AppImages or add \"--pkg\" to list multiple programs at once.
Description: Search for keywords in the list of available applications, add the \"--appimages\" option to list only the AppImages or add \"--pkg\" to list multiple programs at once. It can also be extended with additional flags, the \"--all\" flag allows you to consult the set of all supported databases (see \"--toolpack\").
${Gold}remove, -r\033[0m
Expand Down Expand Up @@ -1256,6 +1264,17 @@ case "$1" in
Description: Switch \"AM\" back to \"AM\" from \"AppMan Mode\" (see \"--user\").
${Gold}--toolpack\033[0m
${LightBlue}$AMCLI -i --toolpack {PROGRAM}\033[0m
${LightBlue}am -i --toolpack --user {PROGRAM}
${LightBlue}$AMCLI -l --toolpack
${LightBlue}$AMCLI -q --toolpack {KEYWORD}\033[0m
Description: This is a flag to use in \"-i\" to install Toolpack programs, in \"-l\" to list all available Toolpacks, and \"-q\" to search the Toolpack list. Toolpack is a collection of programs external to the \"AM\" database. Visit $toolpack_repo to learn more.
NOTE, for installations you can use \".toolpack\" as the package extension instead of using the flag.
${Gold}--user\033[0m
${LightBlue}am --user\033[0m
Expand Down
51 changes: 43 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ You can use the command `am -a {PROGRAM}` to view the description and get the so
- [How are apps installed](#how-are-apps-installed)
- [How to set the path to local apps](#how-to-set-the-path-to-local-apps)
- [What programs can be installed](#what-programs-can-be-installed)
- [Supported third-party databases](#supported-third-party-databases)

[How to update all programs, for real!](#how-to-update-all-programs-for-real)
- [How to update all installed apps](#how-to-update-all-installed-apps)
Expand Down Expand Up @@ -211,6 +212,21 @@ The database aims to be a reference point where you can download all the AppImag

You can view basic information, site links and sources using the related command `am -a {PROGRAM}`, or visit [**portable-linux-apps.github.io/apps**](https://portable-linux-apps.github.io/apps).

#### Supported third-party databases
Another feature of "AM" is extensibility, thanks to the management of applications from external databases through the use of dedicated "flags" to be used during the installation process (option `-i` or `install`), the creation of lists (`-l` or `list`) and searches (`-q` or `query`)
```
am -i --{FLAG} {PROGRAM}
am -i --{FLAG} --user {PROGRAM}
am -l --{FLAG}
am -q --{FLAG} {KEYWORD}
```
These databases have the task of supporting and enriching the list of applications that can be installed via "AM". Here are the ones currently supported:
- "[Toolpacks](https://github.com/Azathothas/Toolpacks)", the flag to use is `--toolpack`

Third-party databases can show basic information normally with the option `-a` or `about`, no flag is needed here. However, the name of the package will be shown with an extension equivalent to the flag used to install it. For example `{PROGRAM}` will be `{PROGRAM}.toolpack` if coming from the "Toolpacks" database.

Same thing, you can use `am -i {PROGRAM}.toolpack` or `am -i --user {PROGRAM}.toolpack` to install the program without using the flag.

------------------------------------------------------------------------

| [Back to "Main Index"](#main-index) |
Expand Down Expand Up @@ -387,7 +403,7 @@ Allow installed apps to use system icon themes. You can specify the name of the

**Description**:

Install one or more programs or libraries from the list. With the "`--debug`" option you can see log messages to debug the script. For more details on "`--force-latest`", see the dedicated option, below. Use the "`--icons`" flag to allow the program to use icon themes.
Install one or more programs or libraries from the list. With the "`--debug`" option you can see log messages to debug the script. For more details on "`--force-latest`", see the dedicated option, below. Use the "`--icons`" flag to allow the program to use icon themes. It can also be extended with additional flags (see "`--toolpack`").

NOTE: Since this is an "install" option, you can add the "`--user`" flag to install apps locally. See "`--user`" at the bottom to learn more.

Expand Down Expand Up @@ -415,12 +431,13 @@ Prevent an application being updated, if it has an"AM-updater" script.
------------------------------------------------------------------------
### `list`, `-l`

am -l
am -l --appimages
am -l
am -l --all
am -l --appimages

**Description**:

Shows the list of all the apps available, or just the AppImages.
Shows the list of all the apps available, or just the AppImages. It can also be extended with additional flags, the "`--all`" flag allows you to consult the set of all supported databases (see "`--toolpack`").

------------------------------------------------------------------------
### `newrepo`, `neodb`
Expand Down Expand Up @@ -456,13 +473,14 @@ Overwrite apps with snapshots saved previously (see "-b").
------------------------------------------------------------------------
### `query`, `-q`

am -q {KEYWORD}
am -q --appimages {KEYWORD}
am -q --pkg {PROGRAM1} {PROGRAM2}
am -q {KEYWORD}
am -q --all {KEYWORD}
am -q --appimages {KEYWORD}
am -q --pkg {PROGRAM1} {PROGRAM2}

**Description**:

Search for keywords in the list of available applications, add the "`--appimages`" option to list only the AppImages or add "`--pkg`" to list multiple programs at once.
Search for keywords in the list of available applications, add the "`--appimages`" option to list only the AppImages or add "`--pkg`" to list multiple programs at once. It can also be extended with additional flags, the "`--all`" flag allows you to consult the set of all supported databases (see "`--toolpack`").

------------------------------------------------------------------------
### `remove`, `-r`
Expand Down Expand Up @@ -610,6 +628,20 @@ Drag/drop one or more AppImages in the terminal and embed them in the apps menu

Switch "AM" back to "AM" from "AppMan Mode" (see "`--user`").

------------------------------------------------------------------------
### `--toolpack`

am -i --toolpack {PROGRAM}
am -i --toolpack --user {PROGRAM}
am -l --toolpack
am -q --toolpack {KEYWORD}

**Description**:

This is a flag to use in "`-i`" to install Toolpack programs, in "`-l`" to list all available Toolpacks, and "`-q`" to search the Toolpack list. Toolpack is a collection of programs external to the "AM" database. Visit https://github.com/Azathothas/Toolpacks to learn more.

NOTE, for installations you can use "`.toolpack`" as the package extension instead of using the flag.

------------------------------------------------------------------------
### `--user`, `appman`

Expand Down Expand Up @@ -742,6 +774,9 @@ Below you can access documentation pages for common issues and frequently asked
- *[pkg2appimage](https://github.com/AppImage/pkg2appimage), create AppImages on the fly from existing .deb packages*
- *[repology](https://github.com/repology), the encyclopedia of all software versions*

#### Partner projects, i.e. those that actively contribute to this project
- *[Toolpacks](https://github.com/Azathothas/Toolpacks), Largest Collection of Multi-Platform Pre-Compiled Static Binaries*

#### My other projects
- *[AppImaGen](https://github.com/ivan-hc/AppImaGen), easily create AppImages from Ubuntu PPAs or Debian using pkg2appimage and appimagetool*
- *[ArchImage](https://github.com/ivan-hc/ArchImage), create AppImages for all distributions using Arch Linux packages. Powered by JuNest*
Expand Down
Loading

0 comments on commit 322a545

Please sign in to comment.