mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-09 02:41:06 +03:00
Add icon helper functions for later use
This commit is contained in:
parent
d94d67cd5b
commit
b5c0db9ecc
1 changed files with 18 additions and 1 deletions
|
@ -34,6 +34,23 @@ import common, metadata
|
||||||
from metadata import MetaDataException
|
from metadata import MetaDataException
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
|
def get_densities():
|
||||||
|
return [480, 320, 240, 160, 120]
|
||||||
|
|
||||||
|
def launcher_size(density):
|
||||||
|
return (density * 48) / 160
|
||||||
|
|
||||||
|
def icon_dens_label(density):
|
||||||
|
return "icon-%s" % density
|
||||||
|
|
||||||
|
def get_icon_dir(density):
|
||||||
|
return os.path.join(repodir, "icons-%s" % density)
|
||||||
|
|
||||||
|
def get_icon_dirs(repodir):
|
||||||
|
for density in get_densities():
|
||||||
|
yield get_icon_dir(density)
|
||||||
|
|
||||||
def update_wiki(apps, apks):
|
def update_wiki(apps, apks):
|
||||||
"""Update the wiki
|
"""Update the wiki
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue