Skip to content

Instantly share code, notes, and snippets.

@ZoomQuiet
Created December 12, 2023 15:08
Show Gist options
  • Save ZoomQuiet/008989ec91e65a3ba70fed32b88f5623 to your computer and use it in GitHub Desktop.
Save ZoomQuiet/008989ec91e65a3ba70fed32b88f5623 to your computer and use it in GitHub Desktop.
https://slides.101.camp/ 配置本地演示脚本
function cr4app() {
HTML=$1
if [ -z $HTML ] ;then
echo 'USAGE::'
echo '$ cr4app [目标幻灯.html]'
echo '注意: 不必包含路径'
else
locf="file:///opt/data/Sites/101.camp/_running/slides/docs/$HTML"
chrome2app="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
echo "will open as app:"
echo "$printf \"$chrome2app\" --new-window --app=\"$locf\" "
# 调用
sh -c "$printf \"$chrome2app\" --new-window --app=\"$locf\" "
fi #else
}
function br4app() {
HTML=$1
if [ -z $HTML ] ;then
echo 'USAGE::'
echo '$ br4app [目标幻灯.html]'
echo '注意: 不必包含路径'
else
locf="file:///opt/data/Sites/101.camp/_running/slides/docs/$HTML"
chrome2app="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
echo "will open as app:"
echo "$printf \"$chrome2app\" --new-window --app=\"$locf\" "
# 调用
sh -c "$printf \"$chrome2app\" --new-window --app=\"$locf\" "
fi #else
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment