Commit addf2d1 1 parent 58f5a35 commit addf2d1 Copy full SHA for addf2d1
File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 2
2
layout : single
3
3
title : MBot Command Line Tool
4
4
toc : true
5
+ last_modified_at : 2024-10-22
5
6
---
6
7
7
8
> This guide provides an overview of all command line tools in the MBot ecosystem.
@@ -134,4 +135,5 @@ When you are looking for the answers to:
134
135
- `mbot lcm-msg list`
135
136
136
137
### Demo
137
- <iframe width="560" height="315" src="https://www.youtube.com/embed/zSHahiZNv_A?si=GBOBaFaTz3UKvp6r" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
138
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/zSHahiZNv_A?si=GBOBaFaTz3UKvp6r" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
139
+
Original file line number Diff line number Diff line change 4
4
5
5
# Define the directory containing the Markdown files
6
6
DOCS_DIR=" docs"
7
+ # This is a small hack to ignore the initial commit where all the last modified dates were updated.
8
+ IGNORE_COMMIT=172d7a
9
+
10
+ # Function to get the last relevant commit date
11
+ get_last_relevant_commit_date () {
12
+ local file=$1
13
+ # Iterate through commits until a relevant one is found
14
+ git log --format=" %H %ci" -- " $file " | while read -r hash date time tz; do
15
+
16
+ if [[ $hash != $IGNORE_COMMIT * ]]; then
17
+ echo " $date "
18
+ break
19
+ fi
20
+ done
21
+ }
7
22
8
23
# Loop through all Markdown files recursively in the directory and its subdirectories
9
24
find " $DOCS_DIR " -type f -name " *.md" | while read -r file; do
10
- # Get the last commit date of the file in "YYYY-MM-DD" format
11
- last_modified_date=$( git log -1 --format= " %ci " -- " $file " | cut -d ' ' -f 1 )
25
+ # Get the last relevant commit date of the file in "YYYY-MM-DD" format
26
+ last_modified_date=$( get_last_relevant_commit_date " $file " )
12
27
13
28
# Use awk to process the frontmatter and determine if an update is needed
14
29
needs_update=$( awk -v date=" $last_modified_date " '
You can’t perform that action at this time.
0 commit comments