Skip to content

Commit

Permalink
Update README.md with link to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulSimpetru committed Oct 2, 2024
1 parent deeafa5 commit 37cd706
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<a href="https://www.pytorchlightning.ai/"><img alt="Code style: black" src="https://img.shields.io/badge/uses-pytorch & pytorch lighting-blueviolet"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code style-black-000000.svg"></a>

> [!TIP]
> Take a look at our [documentation](https://nsquaredlab.github.io/DocOctopy/README.html).
## What is this?
DocOctopy , the **research** library for kinematics, kinetics, and everything else you can think of that has to do with EMG and AIs.
Expand Down
20 changes: 20 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@
with (HERE.parent.parent / "README.md").open() as f:
out = f.read()

lines = out.split("\n")
# find the line_indices containing "[!"
line_indices = [i for i, line in enumerate(lines) if "[!" in line]
# find for each index the last line connected to it that does not contain ">".
lines_connected = {}
for i, l in enumerate(line_indices):
for j in range(l, len(lines) - 1):
if ">" in lines[j] and ">" not in lines[j + 1]:
lines_connected[l] = j
break

for start, end in lines_connected.items():
lines[start] = "```{" + lines[start][4:].strip().replace("]", "").lower() + "}\n"
for i in range(start + 1, end + 1):
lines[i] = lines[i].replace("> ", "") + "\n"

lines[end] += "```\n"

out = "\n".join(lines)

out = out.split("\n")

# find the index of the line that contains "## What papers/preprints use this package?"
Expand Down

0 comments on commit 37cd706

Please sign in to comment.