mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
VERSION_HISTORY: fixed format and function to show them all
This commit is contained in:
parent
28e7877b46
commit
8f1d74282b
|
@ -168,16 +168,21 @@ changelog_dialog() {
|
||||||
log d "Showing changelog dialog"
|
log d "Showing changelog dialog"
|
||||||
|
|
||||||
if [[ "$1" == "all" ]]; then
|
if [[ "$1" == "all" ]]; then
|
||||||
xml sel -t -m "//component/releases/release/description" -c . $rd_metainfo | tr -s '\n' | sed 's/^\s*//' > "/var/config/retrodeck/changelog-full.xml"
|
> "/var/config/retrodeck/changelog-full.xml"
|
||||||
|
for release in $(xml sel -t -m "//component/releases/release" -v "@version" -n $rd_metainfo); do
|
||||||
|
echo "<h1>RetroDECK v$release</h1>" >> "/var/config/retrodeck/changelog-full.xml"
|
||||||
|
xml sel -t -m "//component/releases/release[@version='$release']/description" -c . $rd_metainfo | tr -s '\n' | sed 's/^\s*//' >> "/var/config/retrodeck/changelog-full.xml"
|
||||||
|
echo "" >> "/var/config/retrodeck/changelog-full.xml"
|
||||||
|
done
|
||||||
|
|
||||||
convert_to_markdown "/var/config/retrodeck/changelog-full.xml"
|
#convert_to_markdown "/var/config/retrodeck/changelog-full.xml"
|
||||||
|
|
||||||
rd_zenity --icon-name=net.retrodeck.retrodeck --text-info --width=1200 --height=720 \
|
rd_zenity --icon-name=net.retrodeck.retrodeck --text-info --width=1200 --height=720 \
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
--title "RetroDECK Changelogs" \
|
--title "RetroDECK Changelogs" \
|
||||||
--filename="/var/config/retrodeck/changelog-full.xml.md"
|
--filename="/var/config/retrodeck/changelog-full.xml.md"
|
||||||
else
|
else
|
||||||
xml sel -t -m "//component/releases/release[1]/description" -c . $rd_metainfo | tr -s '\n' | sed 's/^\s*//' > "/var/config/retrodeck/changelog.xml"
|
xml sel -t -m "//component/releases/release[@version='$1']/description" -c . $rd_metainfo | tr -s '\n' | sed 's/^\s*//' > "/var/config/retrodeck/changelog.xml"
|
||||||
|
|
||||||
convert_to_markdown "/var/config/retrodeck/changelog.xml"
|
convert_to_markdown "/var/config/retrodeck/changelog.xml"
|
||||||
|
|
||||||
|
|
|
@ -960,10 +960,11 @@ convert_to_markdown() {
|
||||||
local output_file="$1.md"
|
local output_file="$1.md"
|
||||||
|
|
||||||
# Convert main tags
|
# Convert main tags
|
||||||
echo "$xml_content" | xmllint --format - | \
|
echo "$xml_content" | \
|
||||||
sed -e 's|<p>\(.*\)</p>|**\1**|g' \
|
sed -e 's|<p>\(.*\)</p>|## \1|g' \
|
||||||
-e 's|<ul>||g' \
|
-e 's|<ul>||g' \
|
||||||
-e 's|</ul>||g' \
|
-e 's|</ul>||g' \
|
||||||
|
-e 's|<h1>\(.*\)</h1>|# \1|g' \
|
||||||
-e 's|<li>\(.*\)</li>|- \1|g' \
|
-e 's|<li>\(.*\)</li>|- \1|g' \
|
||||||
-e 's|<description>||g' \
|
-e 's|<description>||g' \
|
||||||
-e 's|</description>||g' \
|
-e 's|</description>||g' \
|
||||||
|
|
Loading…
Reference in a new issue