Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking Tutorial Pages to Their Github Source Page #17342

Open
boubascript opened this issue May 21, 2020 · 0 comments
Open

Linking Tutorial Pages to Their Github Source Page #17342

boubascript opened this issue May 21, 2020 · 0 comments
Labels
category: documentation Documentation fix or update

Comments

@boubascript
Copy link
Contributor

boubascript commented May 21, 2020

To make contributing to tutorials easier, it would be nice to be able to go directly from a tutorial page to the file on github that it is generated from. For example, going from Finding contours in your image to find_contours.markdown is slightly complicated because the file is under shapedescriptors, which you can't tell from the way the tutorials are organized on the docs site.

A possible approach to this I tested out was adding an alias to the DoxyFile and then running a shell command that adds a line to the end of every tutorial markdown file using that alias.

For instance the alias:
github_source{1}="[View on Github (https://github.com/opencv/opencv/blob/master/doc/\1)"

With the following BSD command on a mac:
find tutorials js_tutorials py_tutorials -name "*.markdown" -exec sh -c 'printf "\n@github_source{"$0"}" >> "$0"' {} \;

The command/alias can definitely be improved, but I wanted to see if something like this would be accepted, and receive any feedback on better ways to automate this process moving forward.

@asmorkalov asmorkalov added the category: documentation Documentation fix or update label May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: documentation Documentation fix or update
Projects
None yet
Development

No branches or pull requests

2 participants