Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Dotnet port #4

Open
Togusa09 opened this issue Dec 10, 2017 · 5 comments
Open

Dotnet port #4

Togusa09 opened this issue Dec 10, 2017 · 5 comments

Comments

@Togusa09
Copy link

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

@kodonnell
Copy link
Contributor

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?

@Togusa09
Copy link
Author

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).

@Togusa09
Copy link
Author

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?

@kodonnell
Copy link
Contributor

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.

@kodonnell
Copy link
Contributor

FYI @Togusa09 - see updated readme. Your port will may get more traffic!

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

No branches or pull requests

2 participants