mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
metadata: rename parse_metadata() to parse_txt_metadata()
This makes the code clear as support for other metadata formats is added.
This commit is contained in:
parent
04e6f2ebfd
commit
141e0e24c7
@ -198,7 +198,7 @@ def main():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Construct the metadata...
|
# Construct the metadata...
|
||||||
app = metadata.parse_metadata(None)[1]
|
app = metadata.parse_txt_metadata(None)[1]
|
||||||
app['Web Site'] = website
|
app['Web Site'] = website
|
||||||
app['Source Code'] = sourcecode
|
app['Source Code'] = sourcecode
|
||||||
if issuetracker:
|
if issuetracker:
|
||||||
|
@ -470,7 +470,7 @@ def read_srclibs():
|
|||||||
|
|
||||||
|
|
||||||
# Read all metadata. Returns a list of 'app' objects (which are dictionaries as
|
# Read all metadata. Returns a list of 'app' objects (which are dictionaries as
|
||||||
# returned by the parse_metadata function.
|
# returned by the parse_txt_metadata function.
|
||||||
def read_metadata(xref=True):
|
def read_metadata(xref=True):
|
||||||
|
|
||||||
# Always read the srclibs before the apps, since they can use a srlib as
|
# Always read the srclibs before the apps, since they can use a srlib as
|
||||||
@ -484,7 +484,7 @@ def read_metadata(xref=True):
|
|||||||
os.makedirs(basedir)
|
os.makedirs(basedir)
|
||||||
|
|
||||||
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
||||||
appid, appinfo = parse_metadata(metafile)
|
appid, appinfo = parse_txt_metadata(metafile)
|
||||||
check_metadata(appinfo)
|
check_metadata(appinfo)
|
||||||
apps[appid] = appinfo
|
apps[appid] = appinfo
|
||||||
|
|
||||||
@ -584,7 +584,7 @@ def split_list_values(s):
|
|||||||
# 'descriptionlines' - original lines of description as formatted in the
|
# 'descriptionlines' - original lines of description as formatted in the
|
||||||
# metadata file.
|
# metadata file.
|
||||||
#
|
#
|
||||||
def parse_metadata(metafile):
|
def parse_txt_metadata(metafile):
|
||||||
|
|
||||||
appid = None
|
appid = None
|
||||||
linedesc = None
|
linedesc = None
|
||||||
|
Loading…
Reference in New Issue
Block a user