You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# HOWTO
<!-- Table of Contents -->
- [Prerequisites](#Prerequisites)
- [Add the daily Youtube video](<#Add the daily Youtube video>)
- [Add today's sharing](<#Add today's sharing>)
- [Generate markdown for Youtube video](<#Generate markdown for Youtube video>)
- [Merge monthly markdown files into one large README](<#Merge monthly markdown files into one large README>)
- [Generate table of contents for markdown file(s).](<#Generate table of contents for markdown file(s).>)
## Prerequisites
- [curl](https://curl.se/)
- [gm](http://www.graphicsmagick.org/)
- [m4](https://www.gnu.org/software/m4/)
- [markdown-toc](https://github.com/jonschlinkert/markdown-toc)
- [stitchmd](https://github.com/abhinav/stitchmd)
- [gen-toc](https://github.com/sosukesuzuki/gen-toc)
Create a directory for each month of the year under the root directory.
Add a `header.md` file under each monthly directory with the following content.
Example for January:
```markdown
<!-- toc -->
# January 2025
RIAY January 2025
The <!-- toc --> comment header is mandatory else markdown-toc will not generate the table of contents
for the monthly markdown (in this case, January2025.md).
You can replace the top-level markdown header
# January 2025
BIAY January 2025
with your own if you wish.
Add a compact.txt file with the first line as header.md under each monthly directory.
This ensures that the header is present for each month's markdown.
Add the daily Youtube video
Execute the script addvideo with the following parameters:
video id - the id of the youtube video
caption or title (in double quotes)
Example:
./addvideo 5I2BbalTOPo "Hagar and Ishmael"
Results:
The day is generated from the length of the videos.txt file. The day is the number of lines in the file + 1.
In this case, 10.
Video id is appended to the videos.txt file in the root directory.
Day010.md is generated in the January subdirectory.
Day010.jpg image is generated in the January/jpgs directory.
Day010.md file name is appended to the January/compact.txt file.
January20XX.md file is updated (in the root directory) with the Day010.md contents.
Add today's sharing
First, add today's video.
Edit the generated Dayxxx.md file for today.
Paste the sharing text into the file adding appropriate markdown headers as needed.
Save the file.
Execute script genmonth with the following parameters:
month index - 1 - 12
four digit year - 20XX
Example:
./genmonth 01 2025
Results:
The January2025.md file is updated with the sharing text added to the Day010.md file.
You can add sharing to other days as well in a similar fashion.
Don't forget to execute genmonth with the appropriate month index for that day.
You can obtain the month index by executing the following bash command:
date --date="$(date --date='jan 1 + 30 days''+%B %d, %Y')" +%m
The day of year has to be decremented by 1 and substituted in the command.
The above gives the month index for day 31.
Generate markdown for Youtube video
Execute the genvidmd script with the following parameters:
vid - video id
caption - video title
pathtoimg - relative path to jpeg image file to be generated
Example:
./genvidmd g7o7WjQc3as "Bringing the Bible back to Catholics" January/jpgs/bringingback.jpg
Results:
The markdown is generated on the command line. This can be used to insert video markdown in your markdown files.
The overlaid image file for the video is generated as January/jpgs/bringingback.jpg.
Merge monthly markdown files into one large README
Edit the stitch.md file provided to include the markdown files you wish to merge.
The
<!-- toc -->
comment header is mandatory else markdown-toc will not generate the table of contentsfor the monthly markdown (in this case,
January2025.md
).You can replace the top-level markdown header
# January 2025 BIAY January 2025
with your own if you wish.
Add a
compact.txt
file with the first line asheader.md
under each monthly directory.This ensures that the header is present for each month's markdown.
Add the daily Youtube video
Execute the script
addvideo
with the following parameters:Example:
./addvideo 5I2BbalTOPo "Hagar and Ishmael"
Results:
In this case, 10.
videos.txt
file in the root directory.Day010.md
is generated in the January subdirectory.Day010.jpg
image is generated in theJanuary/jpgs
directory.Day010.md
file name is appended to theJanuary/compact.txt
file.January20XX.md
file is updated (in the root directory) with theDay010.md
contents.Add today's sharing
Dayxxx.md
file for today.genmonth
with the following parameters:month index - 1 - 12
four digit year - 20XX
Example:
Results:
The
January2025.md
file is updated with the sharing text added to theDay010.md
file.You can add sharing to other days as well in a similar fashion.
Don't forget to execute
genmonth
with the appropriate month index for that day.You can obtain the month index by executing the following bash command:
date --date="$(date --date='jan 1 + 30 days' '+%B %d, %Y')" +%m
The day of year has to be decremented by 1 and substituted in the command.
The above gives the month index for day 31.
Generate markdown for Youtube video
Execute the
genvidmd
script with the following parameters:Example:
./genvidmd g7o7WjQc3as "Bringing the Bible back to Catholics" January/jpgs/bringingback.jpg
Results:
January/jpgs/bringingback.jpg
.Merge monthly markdown files into one large README
Edit the
stitch.md
file provided to include the markdown files you wish to merge.The file format is as follows:
Include or exclude any files you need or don't need.
Execute the
stitch
script.Results:
A huge README is generated with all the contents of the listed markdown files in
stitch.md
.Generate table of contents for markdown file(s)
Execute the
gentoc
script as follows:Before executing the script, update the file and place the comment
<-- Table of Contents -->
where you want the table of contents to be generated.Results:
The table of contents will be generated as per the existing headings in the markdown file.
The text was updated successfully, but these errors were encountered: