Aplus Tools is a Visual Studio Code extension designed to facilitate the creation or editing of course content published
on the A+ platform. This extension eases the use of the
reStructuredText language used to created courses in A+. In addition, this
extension allows you to preview the current reStructuredText file within the editor, to spot syntax errors inside the
reStructuredText files, and to organise folders and files by using icons.
This extension is aimed at teachers, instructors, course assistants and anyone interested in creating courses in A+.
Never the extension can be used for anyone interested on writing reStructuredText.
It is important to remember that this extension is highly related to the Aplus course template project. Therefore, you must
also comply with the requirements mentioned in the A+ documentation.
Install the extension and reload VS Code if required.
Remember, the name of the extension is Aplus-tools.
Open your course project, create a Python virtual environment for your course, and switch to the new virtual
environment you have just created.
aptdcon --install python3-venv
python3 -m venv .venv_aplus
source .venv_aplus/bin/activate
pip install --upgrade pip setuptools
pip install wheel
It is recommended that you install the Python extension by Microsoft.
It really makes configuring the Python environment easier,since you can select the python environment from the Status
Bar.
📘 Info
Remember to activate your virtual environment every time you open your course in Vs Code.
Install the following Python libraries inside your virtual environment
pip install sphinx==1.6.7
pip install sphinx-autobuild==0.7.1
pip install rstcheck
Press CTRL+Shift+P
to open the Command Palette. Then type Preferences: Open workspace settings (JSON)
this
will create an empty JSON file called .vscode/settings.json. Open the file and copy the following snippet of code.
{
"restructuredtext.confPath": "${workspaceFolder}",
"restructuredtext.linter.run": "onSave",
"restructuredtext.linter.name": "rstcheck"
}
⚠️ Warning
If you changed the name of the virtual enviroment folder in the step 2, you must change the value of
"restructuredtext.confPath":
as well. Otherwise, VS Code will not find the Python interpreter or will use the
wrong one.
Create a .rstcheck.cfg
file and add the desired configuration. You can
start with the following options:
[rstcheck]
report = warning
ignore_roles =
important,
raw-html,
glyphicon-info-sign,
glyphicon-console
ignore_directives =
styled-topic,
div,
point-of-interest,
annotated,
questionnaire,
submit,
acos-submit,
ae-input,
ae-output,
hidden-block,
youtube,
embedded-page,
aplusmeta,
content-tabs
ignore_substitutions =
today,
Aplus
One more thing you want to set up is your conf.py
file inside your course project. If you want to avoid unnecessary
compilation of the libraries, you should add the name of the folder where your virtual environment is located
(.venv_aplus) to the exclude_patterns
array. If you followed the instructions to the letter, your code should
look something like this:
exclude_patterns = ['_build', 'exercises/solutions', '_data', 'enrollment', '.venv_aplus']
📘 Info
Remember to add the .venv_aplus
folder to .gitignore
file.
If you come across a problem with the extension or you want to request a new feature, please
file an issue. On the contrary, if you want to
solve an existing issue, you can create a pull request.