Update Appdata XML and add screenshot (#2229)
This commit is contained in:
committed by
GitHub
parent
85b953bbec
commit
589bc7c313
@@ -1,21 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component type="desktop-application">
|
<component type="desktop-application">
|
||||||
<id>novelwriter</id>
|
<id>io.novelwriter.novelWriter</id>
|
||||||
<metadata_license>GPL-3.0</metadata_license>
|
<metadata_license>GPL-3.0</metadata_license>
|
||||||
<project_license>GPL-3.0</project_license>
|
<project_license>GPL-3.0</project_license>
|
||||||
<name>novelWriter</name>
|
<developer_name>Veronica Berglyd Olsen</developer_name>
|
||||||
<summary>A markdown-like text editor for planning and writing novels</summary>
|
<name>novelWriter</name>
|
||||||
<description>
|
<summary>A plain text editor for planning and writing novels</summary>
|
||||||
<p>{description}</p>
|
<description>
|
||||||
</description>
|
<p>{description}</p>
|
||||||
<launchable type="desktop-id">novelwriter.desktop</launchable>
|
</description>
|
||||||
<url type="homepage">https://novelwriter.io/</url>
|
<launchable type="desktop-id">novelwriter.desktop</launchable>
|
||||||
<screenshots>
|
<url type="homepage">https://novelwriter.io/</url>
|
||||||
<screenshot type="default">
|
<screenshots>
|
||||||
<image>https://novelwriter.io/images/screenshot-multi.png</image>
|
<screenshot type="default">
|
||||||
</screenshot>
|
<image>https://raw.githubusercontent.com/vkbo/novelWriter/refs/heads/main/setup/screenshot.png</image>
|
||||||
</screenshots>
|
</screenshot>
|
||||||
<provides>
|
</screenshots>
|
||||||
<id>novelwriter.desktop</id>
|
<provides>
|
||||||
</provides>
|
<mediatype>application/x-novelwriter-project</mediatype>
|
||||||
</component>
|
<id>novelwriter.desktop</id>
|
||||||
|
</provides>
|
||||||
|
</component>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 347 KiB |
@@ -27,8 +27,8 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from utils.common import (
|
from utils.common import (
|
||||||
ROOT_DIR, SETUP_DIR, copyPackageFiles, copySourceCode, extractVersion,
|
ROOT_DIR, SETUP_DIR, appdataXml, copyPackageFiles, copySourceCode,
|
||||||
makeCheckSum, readFile, toUpload, writeFile
|
extractVersion, makeCheckSum, toUpload, writeFile
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -113,10 +113,7 @@ def appImage(args: argparse.Namespace) -> None:
|
|||||||
# Write Metadata
|
# Write Metadata
|
||||||
# ==============
|
# ==============
|
||||||
|
|
||||||
appDescription = readFile(SETUP_DIR / "description_short.txt")
|
writeFile(imgDir / "novelwriter.appdata.xml", appdataXml())
|
||||||
appdataXML = readFile(SETUP_DIR / "novelwriter.appdata.xml")
|
|
||||||
appdataXML = appdataXML.format(description=appDescription)
|
|
||||||
writeFile(imgDir / "novelwriter.appdata.xml", appdataXML)
|
|
||||||
print("Wrote: novelwriter.appdata.xml")
|
print("Wrote: novelwriter.appdata.xml")
|
||||||
|
|
||||||
writeFile(imgDir / "entrypoint.sh", (
|
writeFile(imgDir / "entrypoint.sh", (
|
||||||
|
|||||||
@@ -172,6 +172,15 @@ def checkAssetsExist() -> bool:
|
|||||||
return hasSample and hasManual and hasQmData
|
return hasSample and hasManual and hasQmData
|
||||||
|
|
||||||
|
|
||||||
|
def appdataXml() -> str:
|
||||||
|
"""Generate the appdata XML content."""
|
||||||
|
raw = readFile(SETUP_DIR / "description_short.txt")
|
||||||
|
desc = " ".join(raw.strip().splitlines()).strip()
|
||||||
|
xml = readFile(SETUP_DIR / "novelwriter.appdata.xml")
|
||||||
|
xml = xml.format(description=desc)
|
||||||
|
return xml
|
||||||
|
|
||||||
|
|
||||||
def readFile(file: Path) -> str:
|
def readFile(file: Path) -> str:
|
||||||
"""Read an entire file and return as a string."""
|
"""Read an entire file and return as a string."""
|
||||||
return file.read_text(encoding="utf-8")
|
return file.read_text(encoding="utf-8")
|
||||||
|
|||||||
Reference in New Issue
Block a user