Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Be sure to include blorbed files in the list of possible file extensions
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a60434f578f2af423e0e34afe3b23d251201c161
User & Date: brandon 2018-11-13 22:11:51
Context
2018-11-13
22:12
Detect whether the user is adding a duplicate release from the edit dialog check-in: 317c252e00 user: brandon tags: trunk
22:11
Be sure to include blorbed files in the list of possible file extensions check-in: a60434f578 user: brandon tags: trunk
21:54
Do not try to render resources that end up with no description check-in: b248e65e10 user: brandon tags: trunk
Changes

Changes to src/grotesque/settings.py.

176
177
178
179
180
181
182


183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
                exts = treatyofbabel.formats.tads2.get_file_extensions()
            elif if_format == 'tads3':
                exts = treatyofbabel.formats.tads3.get_file_extensions()
            elif if_format == 'zcode':
                exts = treatyofbabel.formats.zcode.get_file_extensions()
            elif if_format == 'twine':
                exts = treatyofbabel.formats.twine.get_file_extensions()


            else:
                exts = ''
        return ','.join(exts)

    def set_file_exts(self, if_format, exts):
        self.config.set('File_exts', if_format, exts)

    def get_all_exts(self):
        exts = self.config.items('File_exts')
        if len(exts) == 0:
            for if_format in ['adrift', 'agt', 'alan',
                              'dos', 'win32', 'glulx', 'hugo', 'level9',
                              'magscrolls', 'tads2', 'tads3', 'twine',
                              'zcode']:
                self.set_file_exts(if_format, self.get_file_exts(if_format))
            self.save()
        return self.config.items('File_exts')

    def get_format_from_ext(self, ext):
        if_formats = []
        all_exts = self.config.items('File_exts')







>
>













|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
                exts = treatyofbabel.formats.tads2.get_file_extensions()
            elif if_format == 'tads3':
                exts = treatyofbabel.formats.tads3.get_file_extensions()
            elif if_format == 'zcode':
                exts = treatyofbabel.formats.zcode.get_file_extensions()
            elif if_format == 'twine':
                exts = treatyofbabel.formats.twine.get_file_extensions()
            elif if_format == 'blorb':
                exts = treatyofbabel.wrappers.blorb.get_file_extensions()
            else:
                exts = ''
        return ','.join(exts)

    def set_file_exts(self, if_format, exts):
        self.config.set('File_exts', if_format, exts)

    def get_all_exts(self):
        exts = self.config.items('File_exts')
        if len(exts) == 0:
            for if_format in ['adrift', 'agt', 'alan',
                              'dos', 'win32', 'glulx', 'hugo', 'level9',
                              'magscrolls', 'tads2', 'tads3', 'twine',
                              'zcode', 'blorb']:
                self.set_file_exts(if_format, self.get_file_exts(if_format))
            self.save()
        return self.config.items('File_exts')

    def get_format_from_ext(self, ext):
        if_formats = []
        all_exts = self.config.items('File_exts')