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

Convert code-blocks to literalincludes in ReadingAndWritingImageFiles.rst #1549

Closed
cary-ilm opened this issue Sep 11, 2023 · 4 comments · Fixed by #1583
Closed

Convert code-blocks to literalincludes in ReadingAndWritingImageFiles.rst #1549

cary-ilm opened this issue Sep 11, 2023 · 4 comments · Fixed by #1583
Labels
Documentation Developer guide, web site, project policies, etc. good first issue Possible one-day project for somebody new

Comments

@cary-ilm
Copy link
Member

cary-ilm commented Sep 11, 2023

The example code in website/ReadingAndWritingImageFiles.rst should be moved to individual files in website/src and included in the documentation files via .. literalinclude::, and also included in website/src/all.cpp so that it get built by CMake for testing and validation. See the other uses of literalinclude as examples.

This task requires some basic familiarity with reStructuredText and sphinx but the concepts are easy to pick up from other examples. See Building the Website for how to test the formatting.

@cary-ilm cary-ilm changed the title Convert code-blocks to literalincludes in ReadingAndWritingImageFiles.rst #1548 Convert code-blocks to literalincludes in ReadingAndWritingImageFiles.rst Sep 11, 2023
@cary-ilm cary-ilm added good first issue Possible one-day project for somebody new Documentation Developer guide, web site, project policies, etc. labels Sep 11, 2023
@MeghaS94
Copy link
Contributor

I'll take a look at this for dev days.

@MeghaS94
Copy link
Contributor

Just a clarifying question on this - There's about 34 code-blocks left in ReadingAndWritingImageFiles.rst, does that mean I'll need to add 34 new cpp files?
whenever possible, would it make sense to put code in the same cpp file, and reference what gets included in the rst files with the start-after and end-before directives?

@cary-ilm
Copy link
Member Author

Whatever makes sense is fine, but start-after/end-after sounds like a good approach for the shorter code snippets sounds like a good approach!

@MeghaS94
Copy link
Contributor

Leaving an update here - I've made most of the changes for this, I will submit a PR soon. Thanks for all the help, Cary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Developer guide, web site, project policies, etc. good first issue Possible one-day project for somebody new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants