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

Examples are incomplete when only reading the PDF versions #626

Closed
FryingPanBrock opened this issue Sep 30, 2021 · 1 comment
Closed

Examples are incomplete when only reading the PDF versions #626

FryingPanBrock opened this issue Sep 30, 2021 · 1 comment

Comments

@FryingPanBrock
Copy link

FryingPanBrock commented Sep 30, 2021

All of the examples in the courses have example files that can be downloaded. E.g. in the Hello World example in Ada, only the source code of greet.adb is shown. However, the example involves the use of the files main.gpr and main.adc. There is no way to know this just from reading the PDF file. Thus, I suggest either including the source code of the additional example files in the PDF just underneath the .adb source code, or making a ZIP archive containing the book along with all of the example files.

For example, for the course Introduction to Ada, you would create a ZIP archive containing the PDF and a subfolder for each of the examples where the subfolder contains the code files of the corresponding example. The subfolders could be prefixed with numbers to ensure that they are sorted in the correct order. For example:

introduction_to_ada.zip:

  • introduction_to_ada.pdf
  • Examples/
    • 01.Imperative_Language.Greet/
      • greet.adb
      • main.adc
      • main.gpr
    • 02.Imperative_Language.Greet_2/
      • greet.adb
      • main.adc
      • main.gpr
    • 03.Imperative_Language.Check_Positive/
      • check_positive.adb
      • main.adc
      • main.gpr
    • etc.

The same would be done for all of the other courses offered on learn.adacore.com.

Aside: thank you very much for creating these resources! Not everyone has the money to spare for Barnes' book, especially if one is a student completing a course in Ada.

@gusthoff gusthoff self-assigned this Jun 24, 2022
gusthoff added a commit that referenced this issue Apr 1, 2023
…t/20230331

Infrastructure: adding support for zipfile with source-code examples

Writing separate directories for code blocks.
Directories named by MD5 hash.
Writing JSON file containing code block information.

Ref #626
@gusthoff
Copy link
Collaborator

gusthoff commented Apr 1, 2023

ZIP file containing all source-code examples is now available on the website.

@gusthoff gusthoff closed this as completed Apr 1, 2023
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

2 participants