-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for FileWrapper
to OLEFile
#9
Conversation
Hmmm, we can't support Linux if the library uses FileWrapper....... |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Overall I think this approach leads to code duplication, which means we'd have much more code to maintain.
We already have protocol Reader
declared, I think we should consider the code in extension FileHandle
to be generalized as extension Reader
instead. Then firstly we don't need a separate OLEFile2
class, and secondly we could add just another init
to OleFile
that takes Data
instance as an argument and create a DataReader
instance from it.
The fileHandle
property should then be changed to let reader: Reader
, to which we could assign either a FileHandle
or a DataReader
instance, depending on which is more convenient.
Does that make sense?
I've removed Xcode 11.0 and 11.1 jobs from the workflow in the |
Thank @MaxDesiatov for your kind advice! Maybe the code was messy at first because I worked at 4 am lol. As your suggestion, I integrated OLEFile2 with var reader: Reader. |
Co-authored-by: Max Desiatov <max@desiatov.com>
…o file-wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work, thank you!
FileWrapper
to OLEFile
@sboh1214 I've invited you as a collaborator to the project, feel free to accept the invitation and merge the PR when CI passes 👏 |
Thank you so much @MaxDesiatov ! |
Sure, but please update
Then add a section for the new version with the current date to Also, this changelog snippet can be added to the release on GitHub itself. |
If you have any problems with the changelog update, please let me know. I think it's useful for all maintainers on a project to be aware of release processes. Or I can do this myself in the next couple of days, I'm sorry I'm a bit busy right now. Thank you! |
Ah, sorry, you've explicitly asked to me to tag and release. I'll do it, sorry about the confusion 🤦♂️ |
@MaxDesiatov No, it's okay! 😃 I edited it to request to you because I don't know about the release process. But also thank you for letting me know how to release it. Please release OLEKit in your spare time, not hurry. |
Hello, @MaxDesiatov ! Your library is giving me a lot of support for developing HWP File parsing library!
By the way, a problem occurred when I started developing SwiftUI document-based app.
It should get file information from FileWrapper in Foudation Framework.
It's critical because we can't get file path from it.
So, I created OLEFile2, which have fileWrapper property instead of fileHandle. And appended some support code.
Also, I checked it parse same result between OLEFile and OLEFile2.
However, You are core maintainer and I'm just freshmen in univ, so I need your kind advice. 😃
Would it be good to add another class like this?
Thanks!