This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as fs from 'fs'; | |
| import * as path from 'path'; | |
| // Ensure the generated folder exists | |
| const GENERATED_FOLDER = path.resolve('./generated'); | |
| if (!fs.existsSync(GENERATED_FOLDER)) { | |
| fs.mkdirSync(GENERATED_FOLDER); | |
| } | |
| // Function to recursively find Java files in a directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _object_rels(obj): | |
| try: | |
| rels = obj.rels | |
| # Change required for python-pptx 0.6.22 | |
| check_rels_content = [k for k in rels] | |
| if isinstance(check_rels_content.pop(), str): | |
| return [v for k, v in rels.items()] | |
| else: | |
| return [k for k in rels] |