mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Merge branch 'master' into logging
This commit is contained in:
commit
9a4fe8c7cd
1
fdroid
1
fdroid
@ -30,6 +30,7 @@ commands = [
|
|||||||
"verify",
|
"verify",
|
||||||
"checkupdates",
|
"checkupdates",
|
||||||
"import",
|
"import",
|
||||||
|
"readmeta",
|
||||||
"rewritemeta",
|
"rewritemeta",
|
||||||
"lint",
|
"lint",
|
||||||
"scanner",
|
"scanner",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# verify.py - part of the FDroid server tools
|
# install.py - part of the FDroid server tools
|
||||||
# Copyright (C) 2013, Ciaran Gultnieks, ciaran@ciarang.com
|
# Copyright (C) 2013, Ciaran Gultnieks, ciaran@ciarang.com
|
||||||
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
|
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
|
||||||
#
|
#
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# common.py - part of the FDroid server tools
|
# metadata.py - part of the FDroid server tools
|
||||||
# Copyright (C) 2013, Ciaran Gultnieks, ciaran@ciarang.com
|
# Copyright (C) 2013, Ciaran Gultnieks, ciaran@ciarang.com
|
||||||
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
|
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
|
||||||
#
|
#
|
||||||
@ -361,11 +361,13 @@ def parse_srclib(metafile, **kw):
|
|||||||
|
|
||||||
# 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_metadata function.
|
||||||
def read_metadata(xref=True, package=None):
|
def read_metadata(xref=True, package=None, store=True):
|
||||||
apps = []
|
apps = []
|
||||||
|
|
||||||
for basedir in ('metadata', 'tmp'):
|
for basedir in ('metadata', 'tmp'):
|
||||||
if not os.path.exists(basedir):
|
if not os.path.exists(basedir):
|
||||||
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'))):
|
||||||
if package is None or metafile == os.path.join('metadata', package + '.txt'):
|
if package is None or metafile == os.path.join('metadata', package + '.txt'):
|
||||||
try:
|
try:
|
||||||
|
31
fdroidserver/readmeta.py
Normal file
31
fdroidserver/readmeta.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# readmeta.py - part of the FDroid server tools
|
||||||
|
# Copyright (C) 2014 Daniel Martí <mvdan@mvdan.cc>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import os, metadata
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
|
if not os.path.isdir('metadata'):
|
||||||
|
return
|
||||||
|
|
||||||
|
metadata.read_metadata(xref=False, store=False)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user