@@ -10,11 +10,15 @@ octave path.
1010
1111For instructions see the following links:
1212
13- | Requirements | Used version |
14- | -------------------------------------------------------- | ------------ |
15- | [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 |
16- | [Matlab](https://www.mathworks.com/products/matlab.html) | >=2015b |
17- | or [Octave](https://www.gnu.org/software/octave/) | 4.? |
13+ +------------------------------------------------------------+--------------+
14+ | Requirements | Used version |
15+ +============================================================+==============+
16+ | `PsychToolBox <http://psychtoolbox.org/ >`_ | >=3.0.14 |
17+ +------------------------------------------------------------+--------------+
18+ | `Matlab <https://www.mathworks.com/products/matlab.html >`_ | >=2015b |
19+ +------------------------------------------------------------+--------------+
20+ | or `Octave <https://www.gnu.org/software/octave/ >`_ | 4.? |
21+ +------------------------------------------------------------+--------------+
1822
1923Tested:
2024
@@ -25,107 +29,116 @@ How to install
2529
2630The easiest way to use this repository is to create a new repository by using
2731the
28- [ template PTB experiment repository]( https://github.com/cpp-lln-lab/template_PTB_experiment) :
32+ ` template PTB experiment repository < https://github.com/cpp-lln-lab/template_PTB_experiment >`_ :
2933this creates a new repository on your github account with all the basic folders,
3034files and submodules already set up. You only have to then clone the repository
3135and you are good to go.
3236
3337Download with git
3438*****************
3539
36- ```bash
37- cd fullpath_to_directory_where_to_install
38- # use git to download the code
39- git clone https://github.com/cpp-lln-lab/CPP_PTB.git
40- # move into the folder you have just created
41- cd CPP_PTB
42- ` ``
40+ .. code-block :: bash
41+ :linenos:
42+
43+ cd fullpath_to_directory_where_to_install
44+ # use git to download the code
45+ git clone https://github.com/cpp-lln-lab/CPP_PTB.git
46+ # move into the folder you have just created
47+ cd CPP_PTB
48+
4349
4450 Then get the latest commit to stay up to date:
4551
46- ```bash
47- # from the directory where you downloaded the code
48- git pull origin master
49- ` ``
52+ .. code-block :: bash
53+ :linenos:
54+
55+ # from the directory where you downloaded the code
56+ git pull origin master
5057
5158 To work with a specific version, create a branch at a specific version tag
5259number
5360
54- ```bash
55- # creating and checking out a branch that will be called version1 at the version tag v1.0.0
56- git checkout -b version1 v1.0.0
57- ` ``
61+ .. code-block :: bash
62+ :linenos:
63+
64+ # creating and checking out a branch that will be called version1 at the version tag v1.0.0
65+ git checkout -b version1 v1.0.0
66+
5867
5968 Add as a submodule
6069******************
6170
6271Add it as a submodule in the repo you are working on.
6372
64- ```bash
65- cd fullpath_to_directory_where_to_install
66- # use git to download the code
67- git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
68- ` ``
73+ .. code-block :: bash
74+ :linenos:
75+
76+ cd fullpath_to_directory_where_to_install
77+ # use git to download the code
78+ git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
6979
7080 To get the latest commit you then need to update the submodule with the
7181information on its remote repository and then merge those locally.
7282
73- ```bash
74- git submodule update --remote --merge
75- ` ``
83+ .. code-block :: bash
84+ :linenos:
85+
86+ git submodule update --remote --merge
7687
7788 Remember that updates to submodules need to be committed as well.
7889
79- #### Example for submodule usage
90+ Example for submodule usage
91+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
8092
8193So say you want to clone a repo that has some nested submodules, then you would
8294type this to get the content of all the submodules at once (here with my
8395experiment repo):
8496
85- ```bash
86- git clone --recurse-submodules https://github.com/user_name/yourExperiment.git
87- ` ``
97+ .. code-block :: bash
98+ :linenos:
99+
100+ git clone --recurse-submodules https://github.com/user_name/yourExperiment.git
88101
89102 This would be the way to do it "by hand"
90103
91- ```bash
92- # clone the repo
93- git clone https://github.com/user_name/yourExperiment.git
104+ .. code-block :: bash
105+ :linenos:
94106
95- # go into the directory
96- cd yourExperiment
107+ # clone the repo
108+ git clone https://github.com/user_name/ yourExperiment.git
97109
98- # initialize and get the content of the first level of submodules (CPP_PTB and CPP_BIDS)
99- git submodule init
100- git submodule update
110+ # go into the directory
111+ cd yourExperiment
101112
102- # get the nested submodules JSONio and BIDS-matlab for CPP_BIDS
103- git submodule foreach --recursive 'git submodule init'
104- git submodule foreach --recursive 'git submodule update'
105- ` ``
113+ # initialize and get the content of the first level of submodules (CPP_PTB and CPP_BIDS)
114+ git submodule init
115+ git submodule update
116+
117+ # get the nested submodules JSONio and BIDS-matlab for CPP_BIDS
118+ git submodule foreach --recursive ' git submodule init'
119+ git submodule foreach --recursive ' git submodule update'
106120
107121 Direct download
108122***************
109123
110124Download the code. Unzip. And add to the matlab path.
111125
112- Pick a specific version from
113- [here](https://github.com/cpp-lln-lab/CPP_PTB/releases).
126+ Pick a specific version from `here <https://github.com/cpp-lln-lab/CPP_PTB/releases >`_.
114127
115- Or take
116- [the latest commit](https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip) -
128+ Or take `the latest commit <https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip >`_ -
117129NOT RECOMMENDED.
118130
119131Add CPP_PTB globally to the matlab path
120- ----
132+ ***************************************
121133
122134This is NOT RECOMMENDED as this might create conflicts if you use different
123135versions of CPP_PTB as sub-modules.
124136
125137Also note that this might not work at all if you have not set a command line
126138alias to start Matlab from a terminal window by just typing `matlab `. :wink:
127139
128- ```bash
129- # from within the CPP_PTB folder
130- matlab -nojvm -nosplash -r "addpath(genpath(fullfile(pwd, 'src'))); savepath(); path(); exit();"
131- ` ``
140+ .. code-block :: bash
141+ :linenos:
142+
143+ # from within the CPP_PTB folder
144+ matlab -nojvm -nosplash -r " addpath(genpath(fullfile(pwd, 'src'))); savepath(); path(); exit();"
0 commit comments