danil09234 / metadataeditor Goto Github PK
View Code? Open in Web Editor NEWProgram for the advanced metadata editing
License: Apache License 2.0
Program for the advanced metadata editing
License: Apache License 2.0
Word file inner part example:
- temp_file.docx
- _rels
- .rels
- word
- _rels
- document.xml.rels
- media
- image1.png
- theme
- theme1.xml
- document.xml
- fontTable.xml
- footer1.xml
- numbering.xml
- settings.xml
- styles.xml
- [Content_Types].xml
Error example:
Traceback (most recent call last): File "D:\...\gui.py", line 148, in <module> AntismirnovaApp().run() File "C:\...\AppData\Roaming\Python\Python310\site-packages\kivy\app.py", line 955, in run runTouchApp() File "C:\...\AppData\Roaming\Python\Python310\site-packages\kivy\base.py", line 574, in runTouchApp EventLoop.mainloop() File "C:\...\AppData\Roaming\Python\Python310\site-packages\kivy\base.py", line 341, in mainloop self.window.mainloop() File "C:\...\AppData\Roaming\Python\Python310\site-packages\kivy\core\window\window_sdl2.py", line 651, in mainloop self._dispatch_drop_event(action, args) File "C:\...\AppData\Roaming\Python\Python310\site-packages\kivy\core\window\window_sdl2.py", line 780, in _dispatch_drop_event self.dispatch('on_drop_file', args[0], x, y) File "kivy\_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch File "kivy\_event.pyx", line 1231, in kivy._event.EventObservers._dispatch File "D:\...\gui.py", line 137, in _on_file_drop self.__initialize_file(pathlib.Path(file_path.decode("utf-8"))) File "D:\...\gui.py", line 109, in __initialize_file if (creator := metadata.creator) is not None: File "D:\...\word.py", line 350, in creator creator = core.creator File "D:\...\word.py", line 135, in creator return self.__get_property("creator") File "D:\...\word.py", line 121, in __get_property domtree = xml.dom.minidom.parse(str(self.xml_file_path.absolute())) File "C:\Program Files\Python310\lib\xml\dom\minidom.py", line 1988, in parse return expatbuilder.parse(file) File "C:\Program Files\Python310\lib\xml\dom\expatbuilder.py", line 910, in parse with open(file, 'rb') as fp: FileNotFoundError: [Errno 2] No such file or directory: 'D:\\...\\temp_file.docx\\docProps\\core.xml'
Function with error
word.py -> WordCoreXml -> __get_property()
gui.py
Bug in the WordCoreXml
class of word.py
file
After changing creator
property many times, the core.xml
file looks like:
core.xml
... <dc:title/> <dc:subject/> <dc:creator/> <dc:creator>Beta user</dc:creator> <dc:creator/> <dc:creator>Beta user</dc:creator> <cp:keywords/> <dc:description/> <cp:lastModifiedBy/> ...
__getitem__
__setitem__
gui.py
Raises PermissionError
Store preference in .yaml
format
Future preferences.yaml
example:
preferences.yaml
# Preferences for command "new" new: creator: admin last modified by: admin application: Microsoft Office Word editing time: 0 revision: 1 # Preferences for command "privet_smirnovoy" # Will randomly be selected configured number of creators and modifiers & random application from applications list privet_smirnovoy: applications: - Minecraft - Calculator - Excel creators: - User 1 - User 2 - User 3 modifiers: - User 1 - User 2 creators number: 2 modifiers number: 1
Add TextInput
s auto-scrolling after such buttons as Reset metadata
and Send hello to Smirnova
are being pressed.
Traceback (most recent call last):
File "D:\...\gui.py", line 938, in <module>
AntismirnovaApp().run()
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivy\app.py", line 955, in run
runTouchApp()
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivy\base.py", line 574, in runTouchApp
EventLoop.mainloop()
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivy\base.py", line 339, in mainloop
self.idle()
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivy\base.py", line 379, in idle
Clock.tick()
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivy\clock.py", line 733, in tick
self.post_idle(ts, self.idle())
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivy\clock.py", line 776, in post_idle
self._process_events()
File "kivy\_clock.pyx", line 620, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 653, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivymd\uix\tooltip.py", line 238, in display_tooltip
Window.add_widget(self._tooltip)
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\kivy\core\window\__init__.py", line 1487, in add_widget
raise WidgetException(
kivy.uix.widget.WidgetException: Cannot add <kivymd.uix.tooltip.MDTooltipViewClass object at 0x00000234D9BBD850> to window, it already has a parent <kivy.core.window.window_sdl2.WindowSDL object at 0x00000234B9303A70>
Process finished with exit code 1
Bug reason is unknown
Add shadows to such widgets as label
, button
preferences.py
main.py
code for new constants locationgui.py
code for new constants locationnew
commandopen-gui
commandprivet-smirnovoy
commandSource files with bug: gui.py
, main.py
, preferences.py
, word.py
Add spesial command to open GUI
Suggested command name: gui
UTF-8
encoding supportAll namespasec must be declared in core.xml
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.