aps105-book

所属分类:教育系统应用
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-10-04 19:26:48
上 传 者sh-1993
说明:  Snefru的源代码:用C书学习编程
(Source code for Snefru: Learning Programming with C book)

文件列表:
LICENSE (448, 2023-10-04)
requirements.txt (52, 2023-10-04)
runtime.txt (4, 2023-10-04)
spell-check/ (0, 2023-10-04)
spell-check/dictionary.dic (3168, 2023-10-04)
spell-check/dictionary.txt (733, 2023-10-04)
spell-check/spell-check.yml (1103, 2023-10-04)
textbook/ (0, 2023-10-04)
textbook/_config.yml (2931, 2023-10-04)
textbook/_static/ (0, 2023-10-04)
textbook/_static/app.js (28028, 2023-10-04)
textbook/_static/code-runner-setup.js (396, 2023-10-04)
textbook/_static/custom.css (526, 2023-10-04)
textbook/_static/style.css (2656, 2023-10-04)
textbook/_static/toml_to_js_convertor.js (1139, 2023-10-04)
textbook/_toc.yml (6451, 2023-10-04)
textbook/chapters/ (0, 2023-10-04)
textbook/chapters/appendix/ (0, 2023-10-04)
textbook/chapters/appendix/appendix.md (501, 2023-10-04)
textbook/chapters/appendix/coding-style.md (153, 2023-10-04)
textbook/chapters/appendix/compile-run.md (33, 2023-10-04)
textbook/chapters/appendix/debugging.md (211, 2023-10-04)
textbook/chapters/appendix/images/ (0, 2023-10-04)
textbook/chapters/appendix/images/error-gutters.png (309373, 2023-10-04)
textbook/chapters/appendix/linux-basics.md (28, 2023-10-04)
textbook/chapters/appendix/setup-vscode.md (6821, 2023-10-04)
textbook/chapters/appendix/vscode-extensions.md (2197, 2023-10-04)
textbook/chapters/chapter01-computers/ (0, 2023-10-04)
textbook/chapters/chapter01-computers/basic-structure.md (2413, 2023-10-04)
textbook/chapters/chapter01-computers/dev-cycle.md (3679, 2023-10-04)
textbook/chapters/chapter01-computers/images/ (0, 2023-10-04)
textbook/chapters/chapter01-computers/images/addresses.pdf (102685, 2023-10-04)
textbook/chapters/chapter01-computers/images/basic-computer-structure.pdf (13356, 2023-10-04)
textbook/chapters/chapter01-computers/images/basic-computer-structure.png (1321122, 2023-10-04)
textbook/chapters/chapter01-computers/images/binary-decimal.pdf (201432, 2023-10-04)
textbook/chapters/chapter01-computers/images/binary-decimal.png (1787676, 2023-10-04)
textbook/chapters/chapter01-computers/images/byte-addressable.pdf (103255, 2023-10-04)
textbook/chapters/chapter01-computers/images/byte-addressable.png (3008677, 2023-10-04)
... ...

# Snefru: Learning Programming with C This is a repository for developing the first online textbook of its kind for APS105. The book's name is Snefru: Learning Programming with C. It is developed using [Jupyter Book](https://jupyterbook.org/en/stable/intro.html). You will find the book at [learningc.org](https://learningc.org), or [learningc.netlify.app](https://learningc.netlify.app/) ## Getting Started If you are trying to build the book locally, you can follow the instructions below. 1- Clone this GitHub repo. In your terminal, type the following command: ``` git clone https://github.com/salma-emara/aps105-book/ cd aps105-book ``` 2- Install jupyter-book by running the following command in the terminal ``` pip install -r requirements.txt ``` 3- To build the book locally, run the following command: ``` # To build everything jupyter-book build --all textbook # To build after updating a markdown file jupyter-book build textbook # To build after updating quizzes node ./textbook/_static/toml_to_js_convertor.js jupyter-book build --all textbook cp -r textbook/quizzes/ textbook/_build/html/quizzes ``` 4- To view the book, you can run: ```open textbook/_build/html/index.html``` ### Check spelling mistakes To check spelling mistakes, you need to install `pyspelling` using the following command: ``` pip install pyspelling ``` Then run the following command: ``` cd spell-check/ pyspelling -c spell-check.yml ``` ## Contributing Most contributions require knowledge of Markdown. I ask you to be consistent with the rest of the book if you will make substantial changes. If you want to add advanced features, you may seek help from [Jupyter Book](https://jupyterbook.org/en/stable/intro.html) website. If you are using VS Code, install MyST-Markdown extension to allow syntax highlighting for `.md` files. When you add a new `.md` file, remember to include it in `textbook/_toc.yml`. ## Correcting mistakes Since this book is still under development, it will have mistakes. If you find a typographical, grammatical or any other mistake, I would highly appreciate if you open an issue pointing out the mistake is in which file. You may also correct it and create a pull request! If you do not have a GitHub account, you may send the primary author an email at `salma@ece.utoronto.ca`. Thank you in advance! ## Automatic Deployment For anyone with a write request to main branch, with every push Netlify will automatically deploy it to [learningc.org](learningc.org). This is done following instructions on [Netlify for Jupyter-Book](https://jupyterbook.org/en/stable/publish/netlify.html). ## Quizzes: Add or Edit The quizzes for the book are created in TOML files, which are then converted into JavaScript files to be read by the code to build the book. To convert .toml files to .js files: 1- Ensure you have Node.js installed on your system. You can download it from their official website (https://nodejs.org). 2- Download the required package by executing the following command: ``` npm install @iarna/toml ``` To add a new quiz: 1- Create a new .toml file containing the quiz in textbook/quizzes in the chapter folder of your choice. 2- In your terminal, execute the following command in `aps105-book` directory. ``` node ./textbook/_static/toml_to_js_convertor.js ``` A .js file will be created in the corresponding folders for all the .toml files present in the textbook/quizzes directory. 3- Open the .md file where you want the quiz to be and add the following line. Replace `file-name` with the name of your quiz file (without .js extension). ``` {{quiz_embed | replace("%%FILENAME%%", "file-name") }} ``` To edit an existing quiz: 1- Open the .toml file of the quiz you want to edit and make the desired changes. 2- In your terminal, go to `aps105-book` directory and execute the following command. ``` node ./textbook/_static/toml_to_js_convertor.js ``` Build the book locally and ensure the quiz is behaving as expected.

近期下载者

相关文件


收藏者