
# Other ideas

```
git rebase -i --exec <build command> <first sha you want to test>~
```

Or :
```
#!/usr/bin/env bash
# test_commits.sh

while read -r rev; do
    git checkout "$rev"
    if ! git submodule update && make clean && make; then
        >&2 echo "Commit $rev failed"
        exit 1
    fi
done < <(git rev-list "$1")
```

Use :
```
./test_commits.sh origin/master..master
```

# Icon for environment

- what could go wrong : Nuke icon for very very bad ideas


# DONE : Custom search and list of environment

If we want to list all **wip** environment in the lecture we call :
![list_env](wip)

If we don't want to list an environment, we do not use this. No need for an extra option in the rustyphoenixlecture

And then, there is a PContent which contains all **wip** of the lecture and their link to jump directly where they are defined in the lecture itself.
- This is not possible to create a part/chapter/section because the update of the file names was already done. So, this could only be about content.

So, for all environment we want to count (we need a map of the environment to be listed)
- we keep in which file the environment is
	- we update the file with the section
- when we found the environment we want
	- we add in the **PContent** which will be the list :
		- the link to the location of the environment in the web site
		- the link to the location of the environment in the lecture file
		- the environment (to get an idea of its purpose)
- Finally, we have to update the PContentEnvList with the content we just created.
	- to get them, without iterating again on all PVecContent, we can have a Vec< usize >
		- vec for the index to pass through the PVecContent hierarchy if the PContentEnvList is in a
		- we forbid the PContentEnvList to be in a nested PContent (such as PContentTitle)
			- so on single usize is enough to get its position and update the PContentEnvList

- When we parse a PContentEnvList, we have to add the name of the environment in the PSearchEnvironment in the PLectureData (because is has to be muttable)
	- and we add the PContentEnvList in the main PVecContent
```rust
///Manage the search of environments in the lecture
pub struct PSearchEnvironment{
	///List of the environments to search (key: environment name, value: index of the PContentEnvList in the main PVecContent)
	p_map_env_to_search: HashMap<String, Vec<usize>>,
	
}
```

# DONE : Cite label from other websites / other lectures

Each lecture provides a configuration file `toml` where all **labels**, **class**, **functions**, etc, are defined.

```toml
[lecture]
name = "SomeProjectName"
repo_url = "https://url/of/the/repository"
doc_url = "https://url/of/the/doc"
# Version of the lecture if it changed
version = "1.2.0"

# Labels which are defined in the lecture (name = "Text in lecture")
[label]
secIntroduction = "1.2.3"
# If we call @SomeProjectName::figTweety This gets => <a href="https://url/of/the/doc/redirection.html?label=figTweety"><b>Figure 26</b></a>
figTweety = "Figure 26"

secIntroduction = {id = "42", title = "Section"}
figTweety = {id = "542", title = "Figure"}

# Defined C++ classes by the lecture
# the corresponding label is class+ClassName (example: classPMatMandelbrot)
# So, each time the lecture parser see PMatMandelbrot, it replaces by a span with the proper class style and an url to the defined class in the dependency lecture
vec_cpp_class = ["PMatMandelbrot"]
vec_rust_class = ["PFileParserIter"]
vec_cpp_function = ["compute_mandelbrot"]


```
This could be a part of the distributed packaged with `pixi` in the **share/ProjectName/doc** directory.


Then in the main lecture, we have to add this dependency :
```toml
[lecture-dependencies]
performance_with_stencil = "https://pages.gitlab.com/url/to/this/lecture/"

```
So we can get automatically the lecture definition and put it in a **lecture_dependencies** directory.


# Idea to improve all


<!-- Some comment -->

some *test*



- classic url : [text](some/url)

- video : ![file](file.mp4)
- audio : ![file](file.mp3)
- image : ![file](file.png)
- svg : ![file](file.svg)

With highlighting :
- C++ source : ![file](file.cpp)
- C source : ![file](file.c)
- Rust source : ![file](file.rs)
- CMake source : ![file](file.cmake)
- CMakeLists : ![file](CMakeLists.txt)
- Toml config : ![file](file.toml)
- Yml config : ![file](file.yml)
- Dockerfile : ![file](Dockerfile)
- terminal output : ![file](file.terminal)

- we could use the [] to get some extra parameters :
	- file type ![c++](main.cpp.cmake) or ![cpp](main.cpp.cmake)
	- animation ![animation-typing,first-line-char-delay-ms=100,other-line-delay-ms=500](command.terminal) => plays the typing of characters to show command lines
		- first line is typed fully and then all lines comes one per one
		- **first-line-char-delay-ms** : gives the time in milliseconds to draw one character
		- **other-line-delay-ms** : gives the time in milliseconds to fully draw all the other lines
		- the copy-paste button applies only on the first command row (maybe it has to be smart and keep **escaped newlines** for long commands

We could also auto detect special comment from embeded lecture inside these files. (some `//{`)
- We remember from which source we parse special comment :
	- better feed back in case of error / typos in command
	- allow the `edit button` even when the lecture is in source
- If there is no special comment we add :
	- the source
	- a link to get the file (in a `ressource` directory
- If there are some special comments we add :
	- the alternated comments and source snipet (and source snipet should have a copy-paste button)
	- then the full source
	- then a link to get the full file (in a `ressource` directory


Config to do the archive and strip the embeded lecture comments :
```toml

[[archive]]
name = "Example.tar.gz"
directory = "Examples/"
ignore = ["*.pixi", "build"]

```
Best is to remember the time modification of all files to see if we have to rebuild the archive or not.




