@jswork/ushell-module-base 1.0.35 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.sh CHANGED
@@ -21,6 +21,7 @@ source $ROOT_PATH/modules/tail.sh;
21
21
  # Edit file
22
22
  alias reload='source $BASH_BASE_PATH/src/index.sh';
23
23
  alias bakup='cd ~/github/macos-backup/ && gg "feat(daily): automatic backup mac files" && cd -';
24
+ alias mkd="$ROOT_PATH/modules/_mkd.sh"
24
25
 
25
26
  ## aliases:
26
27
  alias cwd="pwd | tr -d '\n' | pbcopy";
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+
3
+ cd $HOME/alo7i/daily-works/src/$(date +%Y)/$(date +%Y-%m)
4
+
5
+ # this weekday
6
+ start_date=$(date +"%Y-%m-%d")
7
+
8
+ # 循环生成七天的日期
9
+ for ((i=0; i<7; i++)); do
10
+ date=$(date -d "$start_date +$i day" +"%Y-%m-%d")
11
+
12
+ # if date is in this month
13
+ if [[ $date =~ $(date +"%Y-%m") ]]; then
14
+ if [[ -f $date.md ]]; then
15
+ continue
16
+ fi
17
+
18
+ # check if date is friday
19
+ if [[ $(date -d $date +%u) -eq 5 ]]; then
20
+ printf "# $date \n\n# weekly\n" >> ${date}_weekly.md
21
+ else
22
+ echo "# $date" >> $date.md
23
+ fi
24
+ fi
25
+
26
+ done
27
+
28
+ cd -
29
+
30
+ unset start_date;
package/modules/shorty.sh CHANGED
@@ -17,7 +17,7 @@ alias o="open .";
17
17
  alias x="exit";
18
18
 
19
19
  # cd
20
- alias d='cd';
20
+ alias d='cd $(git rev-parse --show-toplevel)';
21
21
  alias g='cd ~/github';
22
22
 
23
23
  # v
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/ushell-module-base",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Unix like shell base module.",
5
5
  "main": "index.sh",
6
6
  "repository": {
@@ -27,8 +27,7 @@
27
27
  "registry": "https://registry.npmjs.org/"
28
28
  },
29
29
  "devDependencies": {
30
- "prettier": "^2.8.0",
31
- "release-it": "^15.5.1"
30
+ "prettier": "^2.8.0"
32
31
  },
33
32
  "scripts": {
34
33
  "release": "release-it"