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

About the protobuf version #91

Open
Deng-yongbiao opened this issue Oct 21, 2024 · 5 comments
Open

About the protobuf version #91

Deng-yongbiao opened this issue Oct 21, 2024 · 5 comments

Comments

@Deng-yongbiao
Copy link

Thanks for your contribution, it's a very good job.

I would like to ask about the version of protobuf that generates files corresponding to python from proto files, because I need to use the corresponding c++ source files.

@masaccio
Copy link
Owner

I use Homebrew on a Mac to handle the binary dependencies and it used 28.2. If you are reasonably familiar with Python and command-line dependencies, you should be able to clone the repo and run the various parts of make bootstrap. This will generate the .proto files using a Python protodump. This is basically:

mkdir -p .bootstrap/protos
poetry run python3 src/build/protodump.py /Applications/Numbers.app .bootstrap/protos
poetry run python3 src/build/rename_proto_files.py .bootstrap/protos
mkdir -p src/numbers_parser/generated
for proto in .bootstrap/protos/*.proto; do \
	    /usr/local/bin/protoc -I=.bootstrap/protos --proto_path .bootstrap/protos --python_out=src/numbers_parser/generated $proto; \
	done

You probably don't need to go as far as using Poetry to run the dump scripts as I don't think they have unusual dependencies.

@Deng-yongbiao
Copy link
Author

Thanks for your reply, that's awesome and really help me a lot. It seems that numbers-parser can perfectly support cell operations, but I did not find a way to handle text boxes and some annotation text. Is there any plan to support this?

@masaccio
Copy link
Owner

Text boxes are likely to be stored the same way as table captions, which I do support but it’s quite new and I suspect it might be a bit flakey. By annotations do you mean comments, or is this a different feature?

@Deng-yongbiao
Copy link
Author

Text boxes are likely to be stored the same way as table captions, which I do support but it’s quite new and I suspect it might be a bit flakey. By annotations do you mean comments, or is this a different feature?

I mean some of the comments attached by other people. Can numbers-parser support this feature now?

@masaccio
Copy link
Owner

I'd need to research that so don't expect anything very quickly. Sometimes data is quite straightforward to extract, sometimes it requires reconstruction of a lot of data structures.

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

No branches or pull requests

2 participants