chiark / gitweb /
Allowed for APKs with bad names, and added Mobile C64, which is one of those
authorCiaran Gultnieks <ciaran@ciarang.com>
Wed, 29 Dec 2010 16:43:04 +0000 (16:43 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Wed, 29 Dec 2010 16:43:04 +0000 (16:43 +0000)
README
metadata.py
metadata/de.joergjahnke.c64.android.txt [new file with mode: 0644]
update.py

diff --git a/README b/README
index bfcb462e69067b3f9ec665739419ad317cac66a9..213f8faeb0f4629893eff5871528040d6b1df454 100644 (file)
--- a/README
+++ b/README
@@ -31,6 +31,13 @@ The license for the application.
 
 Common values: GPLv2, GPLv2+, GPLv3, Apache2, MIT, BSD
 
+==Name==
+
+The name of the application. Normally, this field should not be present since the
+application's correct name is retrieved from the APK file. However, in a situation
+where an APK contains a bad or missing application name, it can be overridden
+using this.
+
 ==Web Site==
 
 The URL for the application's web site.
index a62f83605074a5b400da8519f8805bcdbeb9689e..e8d6feefaf61ecd003db4ba20de06ca12463b42b 100644 (file)
@@ -28,6 +28,7 @@ def read_metadata():
         thisinfo['id'] = metafile[9:-4]
         print "Reading metadata for " + thisinfo['id']
         thisinfo['description'] = ''
+        thisinfo['name'] = None
         thisinfo['summary'] = ''
         thisinfo['license'] = 'Unknown'
         thisinfo['web'] = ''
@@ -56,6 +57,8 @@ def read_metadata():
                     value = line[index+1:]
                     if field == 'Description':
                         mode = 1
+                    elif field == 'Name':
+                        thisinfo['name'] = value
                     elif field == 'Summary':
                         thisinfo['summary'] = value
                     elif field == 'Source Code':
diff --git a/metadata/de.joergjahnke.c64.android.txt b/metadata/de.joergjahnke.c64.android.txt
new file mode 100644 (file)
index 0000000..ec74d89
--- /dev/null
@@ -0,0 +1,9 @@
+License:GPL
+Name:Mobile C64
+Web Site:http://jmec64.sourceforge.net/
+Source Code:http://sourceforge.net/projects/jmec64/develop
+Issue Tracker:http://sourceforge.net/tracker/?group_id=171310
+Summary:Commodore 64 Emulator
+Description:
+A Commodore 64 (C64) emulator.
+.
index 61519e2dac2d9a686ff21cc314c3a4ab7cb4d9db..b9e0c1a31b6fbb50248a3fa8eb878188ebfb6928 100644 (file)
--- a/update.py
+++ b/update.py
@@ -152,11 +152,13 @@ for app in apps:
                 bestapk = apk
 
     if bestver == 0:
-        app['name'] = app['id']
+        if app['name'] is None:
+            app['name'] = app['id']
         app['icon'] = ''
         print "WARNING: Application " + app['id'] + " has no packages"
     else:
-        app['name'] = bestapk['name']
+        if app['name'] is None:
+            app['name'] = bestapk['name']
         app['icon'] = bestapk['icon']
 
 # Generate warnings for apk's with no metadata (or create skeleton