Skip to content
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

write only file_meta to existing mdf file #137

Open
skidzo opened this issue Mar 19, 2018 · 5 comments
Open

write only file_meta to existing mdf file #137

skidzo opened this issue Mar 19, 2018 · 5 comments

Comments

@skidzo
Copy link

skidzo commented Mar 19, 2018

How can I write only updated file_metadata dict from read file to same existing file without having to read in any other data?

@skidzo
Copy link
Author

skidzo commented Mar 19, 2018

This is more a feature request somehow...

@ratal
Copy link
Owner

ratal commented Mar 19, 2018

I am not sure to understand exactly but I guess you want a specific method to write only metadata in file ?
Currently, if you give the filename as argument in write method, it will overwrite the complete file with the mdf object/metadata/data in memory (size might inflate)
For mdf 3.x, this should be relatively easy, metadata being in header block. However, more complicated for mdf4.x as there are metatadata in all kind of blocks with variable lengthes, easier to rewrite the file.

@skidzo
Copy link
Author

skidzo commented Mar 20, 2018

actually I just want to (over) write one metadata item e.g a hash key into the existing mdf file, no matter if i have to rewrite it or not.

@skidzo
Copy link
Author

skidzo commented Mar 20, 2018

we have made a function to do that for mdf 3.x, only for mdf 4.x upwards compatibility it would be nice to implement this inside mdfreader. For now there is no urgent need for that. Thanks for your fast reply!

@ecalpy
Copy link

ecalpy commented Sep 9, 2021

Sort of on a related note: when converting and mdf4 to mdf3 file (or vise versa) - is it possible to retain the meta data (e.g., comments, project info, start/stop time, etc...) in the new output file?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants