Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert play.d to yaml WIP (eterbug #17755) #259

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions generate_yaml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/sh

DIR=play.d
LOG_FILE="process_log.txt"

extract_var() {
grep -E "^$1=" "$2" | sed -E "s/^$1=(.*)/\1/" | tr -d '"' | tr -d "'"
}

extract_pkgurl() {
if grep -q "^[^#]*get_github_url" "$1"; then
grep -E "^[^#]*^PKGURL=" "$1" | sed -E 's/.*get_github_url[[:space:]]+([^[:space:]]+).*/\1/' | tr -d '"'
elif grep -q "^[^#]*eget --list --latest" "$1"; then
grep -E "^[^#]*^PKGURL=" "$1" | sed -E 's/.*eget --list --latest[[:space:]]+([^[:space:]]+).*/\1/' | tr -d '"'
else
grep -E "^[^#]*^PKGURL=" "$1" | sed -E 's/^PKGURL=(.*)/\1/' | tr -d '"'
fi
}

extract_download_mask() {
if grep -q "^[^#]*get_github_url" "$1"; then
grep -E "^[^#]*^PKGURL=" "$1" | sed -E 's/.*get_github_url[[:space:]]+[^[:space:]]+[[:space:]]+([^[:space:]]+).*/\1/' | sed 's/[)"]*$//' | tr -d '"'
elif grep -q "^[^#]*eget --list --latest" "$1"; then
grep -E "^[^#]*^PKGURL=" "$1" | sed -E 's/.*eget --list --latest[[:space:]]+[^[:space:]]+[[:space:]]+([^[:space:]]+).*/\1/' | sed 's/[)"]*$//' | tr -d '"'
else
grep -E "^[^#]*^PKGURL=" "$1" | sed -E 's/^PKGURL=(.*)/\1/' | tr -d '"'
fi
}

replace_vars() {
local mask="$1"
echo "$mask" | sed "s/\${PKGNAME}/$PKGNAME/g; s/\$PKGNAME/$PKGNAME/g; s/\${VERSION}/\*/g; s/\$VERSION/\*/g"
}

> "$LOG_FILE"

for SH_FILE in $DIR/*.sh; do
if echo $SH_FILE | grep -q "common"; then
echo "$SH_FILE пропущен: файл common" >> "$LOG_FILE"
continue
fi

PKGNAME=$(extract_var PKGNAME $SH_FILE)
PKGNAME=$(echo "$PKGNAME" | sed -E 's/[_]/ /g; s/[[:space:]]*-linux$//i')
SUPPORTEDARCHES=$(extract_var SUPPORTEDARCHES $SH_FILE)
VERSION=$(extract_var VERSION $SH_FILE)
DESCRIPTION=$(extract_var DESCRIPTION $SH_FILE)
URL=$(extract_var URL $SH_FILE)

DOWNLOAD_PAGE=$(extract_pkgurl $SH_FILE)
DOWNLOAD_MASK=$(extract_download_mask $SH_FILE)

if [ -z "$PKGNAME" ]; then
echo "$SH_FILE пропущен: PKGNAME не найден" >> "$LOG_FILE"
continue
fi

if echo "$DESCRIPTION" | grep -qE "^\s*#"; then
echo "$SH_FILE пропущен: комментарии в description" >> "$LOG_FILE"
continue
fi

YAML_FILE=yaml.d/${PKGNAME}.yaml

REPLACED_DOWNLOAD_PAGE=$(replace_vars "$DOWNLOAD_PAGE")
REPLACED_DOWNLOAD_MASK=$(replace_vars "$DOWNLOAD_MASK")

echo "apps:" > "$YAML_FILE"
echo " - name: $PKGNAME" >> "$YAML_FILE"
echo " group: $PKGNAME group" >> "$YAML_FILE"
echo " license: $PKGNAME license" >> "$YAML_FILE"
echo " url: $URL" >> "$YAML_FILE"
echo " summary: $PKGNAME summary" >> "$YAML_FILE"
echo " description: $DESCRIPTION" >> "$YAML_FILE"
echo " arches: $SUPPORTEDARCHES" >> "$YAML_FILE"
echo " download_page: $REPLACED_DOWNLOAD_PAGE" >> "$YAML_FILE"

if [ "$DOWNLOAD_MASK" != "$DOWNLOAD_PAGE" ] && [ "$DOWNLOAD_MASK" != "$(basename "$DOWNLOAD_PAGE")" ]; then
echo " download_mask: $REPLACED_DOWNLOAD_MASK" >> "$YAML_FILE"
fi

echo "YAML файл сгенерирован: $YAML_FILE"
done
15 changes: 15 additions & 0 deletions process_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
play.d/brave.sh пропущен: PKGNAME не найден
play.d/chrome-remote-desktop.sh пропущен: комментарии в description
play.d/commfort-client.sh пропущен: комментарии в description
play.d/common-jetbrains.sh пропущен: файл common
play.d/common-outformat.sh пропущен: файл common
play.d/common.sh пропущен: файл common
play.d/edge.sh пропущен: PKGNAME не найден
play.d/kubo.sh пропущен: PKGNAME не найден
play.d/lithium.sh пропущен: PKGNAME не найден
play.d/opera.sh пропущен: PKGNAME не найден
play.d/rememberthemilk.sh пропущен: комментарии в description
play.d/rupost.sh пропущен: PKGNAME не найден
play.d/telegram.sh пропущен: PKGNAME не найден
play.d/vivaldi.sh пропущен: PKGNAME не найден
play.d/yandex-browser.sh пропущен: PKGNAME не найден
9 changes: 9 additions & 0 deletions yaml.d/1c-connect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: 1c-connect
group: 1c-connect group
license: 1c-connect license
url: https://1c-connect.com
summary: 1c-connect summary
description: 1C Connect — Service & Help desk со встроенным удалённым доступом и мессенджером
arches: x86_64
download_page: https://updates.1c-connect.com/desktop/distribs/1C-Connect-Linux-x64.tar.gz
10 changes: 10 additions & 0 deletions yaml.d/64Gram.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: 64Gram
group: 64Gram group
license: 64Gram license
url: https://github.com/TDesktop-x64
summary: 64Gram summary
description: 64Gram (unofficial Telegram Desktop)
arches: x86_64
download_page: https://github.com/TDesktop-x64/tdesktop/releases
download_mask: 64Gram_*_linux.zip
10 changes: 10 additions & 0 deletions yaml.d/AniLibrix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: AniLibrix
group: AniLibrix group
license: AniLibrix license
url: https://github.com/pavloniym/anilibrix
summary: AniLibrix summary
description: Anilibria desktop anime cinema for any of your computers
arches: x86_64
download_page: https://github.com/pavloniym/anilibrix/releases
download_mask: AniLibrix-linux-x86_64-*.AppImage
10 changes: 10 additions & 0 deletions yaml.d/Anytype.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: Anytype
group: Anytype group
license: Anytype license
url: https://anytype.io/
summary: Anytype summary
description: The everything app for those who celebrate trust & autonomy
arches: x86_64
download_page: https://download.anytype.io/
download_mask: *.AppImage
9 changes: 9 additions & 0 deletions yaml.d/Autodesk EAGLE.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: Autodesk EAGLE
group: Autodesk EAGLE group
license: Autodesk EAGLE license
url:
summary: Autodesk EAGLE summary
description: EAGLE (EDA software) from the official site
arches: x86_64
download_page: https://trial2.autodesk.com/NET17SWDLD/2017/EGLPRM/ESD/Autodesk_EAGLE_*_English_Linux_64bit.tar.gz
10 changes: 10 additions & 0 deletions yaml.d/Bastyon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: Bastyon
group: Bastyon group
license: Bastyon license
url: https://bastyon.com/applications
summary: Bastyon summary
description: Bastyon is a decentralized, open-source social network and video sharing platform.
arches: x86_64
download_page: https://github.com/pocketnetteam/pocketnet.gui/releases
download_mask: Bastyon.AppImage
9 changes: 9 additions & 0 deletions yaml.d/CLion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: CLion
group: CLion group
license: CLion license
url: https://www.jetbrains.com/clion/
summary: CLion summary
description: CLion - A cross-platform IDE for C and C++ from the official site
arches: x86_64 aarch64
download_page: $(get_jetbrains_pkgurl CL cpp)
9 changes: 9 additions & 0 deletions yaml.d/ClipGrab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: ClipGrab
group: ClipGrab group
license: ClipGrab license
url: https://clipgrab.org/
summary: ClipGrab summary
description: ClibGrab - A friendly downloader for YouTube and other sites from the official site
arches: x86_64
download_page:
10 changes: 10 additions & 0 deletions yaml.d/DJV2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: DJV2
group: DJV2 group
license: DJV2 license
url:
summary: DJV2 summary
description: DJV2 - Professional media review software for VFX, animation, and film production
arches: x86_64
download_page: https://github.com/darbyjohnston/DJV/releases
download_mask: $mask
9 changes: 9 additions & 0 deletions yaml.d/FBReader Book Reader.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: FBReader Book Reader
group: FBReader Book Reader group
license: FBReader Book Reader license
url: https://fbreader.org/en/linux
summary: FBReader Book Reader summary
description: An ePub reader supporting Readium LCP DRM. Also opens fb2 and other formats. Free, fast, configurable
arches: x86_64 aarch64
download_page: https://fbreader.org/static/packages/linux/FBReader_Book_Reader-$arch-*.AppImage
9 changes: 9 additions & 0 deletions yaml.d/Heroic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: Heroic
group: Heroic group
license: Heroic license
url: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher
summary: Heroic summary
description: Is an Open Source Game Launcher for Linux. It supports launching games from the Epic Games Store, GOG Games and Amazon Games
arches: x86_64
download_page:
9 changes: 9 additions & 0 deletions yaml.d/ICAClient.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: ICAClient
group: ICAClient group
license: ICAClient license
url: https://www.citrix.com/downloads/workspace-app/linux/workspace-app-for-linux-latest.html
summary: ICAClient summary
description:
arches: x86_64
download_page:
9 changes: 9 additions & 0 deletions yaml.d/Joplin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: Joplin
group: Joplin group
license: Joplin license
url: https://joplinapp.org/
summary: Joplin summary
description: Joplin - an open source note taking and to-do application with synchronisation capabilities
arches: x86_64
download_page:
9 changes: 9 additions & 0 deletions yaml.d/LevenhukLite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: LevenhukLite
group: LevenhukLite group
license: LevenhukLite license
url: https://www.levenhuk.ru/
summary: LevenhukLite summary
description: LevenhukLite microscope
arches: x86_64
download_page: https://www.levenhuk.ru/products/materials/0/lvh_software_levenhuklite_${VERSION//./_}.zip
9 changes: 9 additions & 0 deletions yaml.d/Moonlight.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: Moonlight
group: Moonlight group
license: Moonlight license
url: https://moonlight-stream.org/
summary: Moonlight summary
description: GameStream client for PCs (Windows, Mac, and Linux)
arches: x86_64
download_page:
10 changes: 10 additions & 0 deletions yaml.d/MyTonWallet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: MyTonWallet
group: MyTonWallet group
license: MyTonWallet license
url: https://mytonwallet.app/
summary: MyTonWallet summary
description: MyTonWallet from the official site
arches: x86_64
download_page: https://github.com/mytonwalletorg/mytonwallet/releases
download_mask: MyTonWallet-x86_64.AppImage
10 changes: 10 additions & 0 deletions yaml.d/NotepadNext.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: NotepadNext
group: NotepadNext group
license: NotepadNext license
url: https://github.com/dail8859/NotepadNext
summary: NotepadNext summary
description: A cross-platform, reimplementation of Notepad++
arches: x86_64
download_page: https://github.com/dail8859/NotepadNext/releases
download_mask: NotepadNext-v*-x86_64.AppImage
10 changes: 10 additions & 0 deletions yaml.d/OrcaSlicer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: OrcaSlicer
group: OrcaSlicer group
license: OrcaSlicer license
url: https://github.com/SoftFever/OrcaSlicer
summary: OrcaSlicer summary
description: Orca Slicer is an open source slicer for FDM printers
arches: x86_64
download_page: https://github.com/SoftFever/OrcaSlicer/releases/
download_mask: OrcaSlicer_Linux_V*.AppImage
9 changes: 9 additions & 0 deletions yaml.d/PacketTracer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: PacketTracer
group: PacketTracer group
license: PacketTracer license
url: https://www.sysnettechsolutions.com/en/download-cisco-packet-tracer/
summary: PacketTracer summary
description: Cisco PacketTracer
arches: x86_64
download_page:
10 changes: 10 additions & 0 deletions yaml.d/Pencil.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: Pencil
group: Pencil group
license: Pencil license
url: https://pencil.evolus.vn/
summary: Pencil summary
description: Pencil from the official site
arches: x86_64 x86
download_page: https://pencil.evolus.vn/Downloads.html
download_mask: $mask
9 changes: 9 additions & 0 deletions yaml.d/PhpStorm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: PhpStorm
group: PhpStorm group
license: PhpStorm license
url: https://www.jetbrains.com/phpstorm/
summary: PhpStorm summary
description: PhpStorm - The Lightning-Smart PHP IDE from the official site
arches: x86_64 aarch64
download_page: $(get_jetbrains_pkgurl PS webide)
10 changes: 10 additions & 0 deletions yaml.d/Popcorn-Time.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: Popcorn-Time
group: Popcorn-Time group
license: Popcorn-Time license
url: https://github.com/popcorn-official/popcorn-desktop
summary: Popcorn-Time summary
description: Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player
arches: x86_64
download_page: https://github.com/popcorn-official/popcorn-desktop/releases
download_mask: Popcorn-Time-*-amd64.deb
10 changes: 10 additions & 0 deletions yaml.d/ProtonUp-Qt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: ProtonUp-Qt
group: ProtonUp-Qt group
license: ProtonUp-Qt license
url: https://github.com/DavidoTek/ProtonUp-Qt
summary: ProtonUp-Qt summary
description: Install and manage GE-Proton and Luxtorpeda for Steam and Wine-GE for Lutris with this graphical user interface
arches: x86_64
download_page: https://github.com/DavidoTek/ProtonUp-Qt/releases
download_mask: ProtonUp-Qt-*-x86_64.AppImage
9 changes: 9 additions & 0 deletions yaml.d/S4A.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: S4A
group: S4A group
license: S4A license
url: https://s4a.cat/
summary: S4A summary
description: A Scratch modification that allows for simple programming of the Arduino open source hardware platform
arches: x86_64
download_page: https://s4a.cat/downloads/S4A16.deb
9 changes: 9 additions & 0 deletions yaml.d/Simplenote.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: Simplenote
group: Simplenote group
license: Simplenote license
url: https://github.com/Automattic/simplenote-electron
summary: Simplenote summary
description: A Simplenote React client packaged in Electron.
arches: x86_64 aarch64 armhf
download_page:
9 changes: 9 additions & 0 deletions yaml.d/SweetHome3D.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: SweetHome3D
group: SweetHome3D group
license: SweetHome3D license
url: $(eget -4 --list --latest https://www.sweethome3d.com/download.jsp SweetHome3D-$VERSION-linux-$arch.tgz/download)
summary: SweetHome3D summary
description:
arches: x86_64 x86
download_page: $(echo $URL | sed -e s|https*://sourceforge.net/projects/sweethome3d/files|https://download.sourceforge.net/project/sweethome3d| -e 's|/download$||' )
9 changes: 9 additions & 0 deletions yaml.d/Todoist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apps:
- name: Todoist
group: Todoist group
license: Todoist license
url: https://todoist.com/
summary: Todoist summary
description: Todoist client application from the official site
arches: x86_64
download_page: https://todoist.com/linux_app/appimage
10 changes: 10 additions & 0 deletions yaml.d/Tonkeeper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apps:
- name: Tonkeeper
group: Tonkeeper group
license: Tonkeeper license
url: https://tonkeeper.com/desktop
summary: Tonkeeper summary
description: Tonkeeper desktop from the official site
arches: x86_64 aarch64
download_page: https://github.com/tonkeeper/tonkeeper-web/releases
download_mask: $(epm
Loading