powerbi-vcs
powerbi-vcs copied to clipboard
Dotnet port
Hi,
I've created a dotnet port of this project. https://github.com/Togusa09/powerbi-vcs-dotnet
I was wanting to improve the git diffs for powerbi files by providing it the extracted file contents to diff on. Your scripts were the best resource I could find regarding the makeup of the pbit/pbix files, so I've ported your scripts to c# as a base for me to work off.
The compression back to pbit/pbix is still incomplete in the port, but I intent to finish it when I get a chance.
Regards,
Ben
Nice! Let's keep this open as a way to cross-pollinate between them. Can you update us if you implement any cool new features?
So far I've just added the ability to write the file contents to the screen to support git diffs. This is almost the same as the output from your original raw_to_vcs methods, but the noop converter outputs a SHA hash.
I've used "-s" as the command line switch to trigger this (s for screen, I'm open to better suggestions).
I've been going through the metadata file and believe that I've worked out part of the format.
Skip 8 bytes
Read 4 -> 32 bit int -> length of section 1 Foreach part of section 1 Read 1 -> 8 bit int -> number of characters in string Read characters -> Name Read 1 -> 8 bit int -> number of characters in string Read characters -> Guid Key
Read 4 -> 32 bit int -> length of section 2 Foreach part of section 1 Read 1 -> 8 bit int -> number of characters in string Read characters -> Guid Key Read 1 -> 8 bit int -> number of characters in string Read characters -> Name
Skip 1 byte Read 1 byte -> length of section 3 ? Foreach part of section 3 ? Read 1 -> 8 bit int -> number of characters in string Read characters -> Name?
Nice - I've always thought it'd be good to create a specification file which lists all of these assumptions/findings. Maybe you could start one with the above? Encoding was a big one which I kept forgetting.
FYI @Togusa09 - see updated readme. Your port will may get more traffic!