┌───────────────────────────────────────────────────────┐ │ Experimental -- This might introduce false positives! │ ├───────────────────────────────────────────────────────┤ │ The stripped down version of the model string removes │ │ endings like '-series', '
(self, model)
| 182 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 183 | # set language support |
| 184 | def set_support(self, model): |
| 185 | # model_stripped = re.sub(r'(\d|\s|-)[a-zA-Z]+$', '', model) |
| 186 | ''' |
| 187 | ┌───────────────────────────────────────────────────────┐ |
| 188 | │ Experimental -- This might introduce false positives! │ |
| 189 | ├───────────────────────────────────────────────────────┤ |
| 190 | │ The stripped down version of the model string removes │ |
| 191 | │ endings like '-series', ' printer' (maybe localized), │ |
| 192 | │ 'd' (duplex), 't' (tray), 'c' (color), 'n' (network). │ |
| 193 | └───────────────────────────────────────────────────────┘ |
| 194 | ''' |
| 195 | self.support = [_f for _f in [re.findall( |
| 196 | re.escape(m), model, re.I) for m in self.models] if _f] |
| 197 | |
| 198 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 199 | # open database of supported devices |