Some handy scripts for working with markdown articles on learn.microsoft.com
- fix-nb.py - Change notebook links and images to markdown syntax.
- move-to-v1.py - Fix links in a file that you're going to move to the v1 folder.
- include-usage.py - Count how many times your include files are used by your documents.
See Maintain code snippets in Azure docs for more information on how to use these scripts.
Scripts in the GitHub folder are used to help us maintain our code references. Make sure you have pyGithub
installed (pip install pyGithub
) to run these scripts.
- find-snippets.py
- creates the file refs-found.csv. This file is used for both the pr-report and merge-report scripts.
- create a CODEOWNERS file for the azureml-examples repo. Use this to generate content to replace the lines in https://github.com/Azure/azureml-examples/blob/main/.github/CODEOWNERS.
- pr-report.py - Use this to evaluate whether a PR in azureml-examples will cause problems in our docs build. If you're using it for the first time in a while, first run find-sippets.py to get the most recent version of code snippets referenced by azure-docs.
- merge-report.py - Use this to see what PRs in azureml-examples have merged in the last N days that might require a docs update (default is 8 days). If you're using it for the first time in a while, first runfind-sippets.py to get the most recent version of code snippets referenced by azure-docs.
The following files provide functions used in the above scripts:
-
utilities.py - functions used by find-snippets, pr-report, and merge-report
-
auth_request.py - function used by pr-report and merge-report to authenticate to github.
You'll need to set a GH_ACCESS_TOKEN environment variable before using auth-request.py. See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens to create a token. Then add the token to an environment variable called GH_ACCESS_TOKEN.
These shortcut commands are available for Github merge and pr reports:
./merge.sh
./merge.sh <days>
./pr.sh <pr-number>
Also see these repos for other handy tools:
- (Python) Search images - find text inside images
- (R) toc-to-csv - convert a markdown table of contents to a csv file
- (R) MonthlyReport - Summarizes file modification from git logs