summaryrefslogtreecommitdiff
path: root/updatedeck.py
blob: 48f9e2d898ec0fe6e5e0f446770544e066877f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

import fnmatch
import os
from subprocess import call

# Logic:
# Find all *.*odp recursively and see if there are corresponding .pngs
# if not call convert_deck.sh

matches = []
for root, dirnames, filenames in os.walk('filestore'):
    for filename in fnmatch.filter(filenames, 'deck*.*odp'):
        if len(fnmatch.filter(filenames, 'deck*.png')) <= 0:
            call(['./convert_deck.sh', root, '128x128'])