diff --git a/404.html b/404.html new file mode 100644 index 0000000..d1bc138 --- /dev/null +++ b/404.html @@ -0,0 +1,5 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>404 Page not found</title> +<link rel=canonical href=https://chenkeao.github.io/404.html><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="404 Page not found"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/404.html"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="404 Page not found"><meta name=twitter:description content="Nothing happened to me"><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><div class=not-found-card><h1 class=article-title>404 错误</h1><h2 class=article-subtitle>页面不存在</h2></div><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/android-chrome-192x192.png b/android-chrome-192x192.png new file mode 100644 index 0000000..1f46704 Binary files /dev/null and b/android-chrome-192x192.png differ diff --git a/android-chrome-512x512.png b/android-chrome-512x512.png new file mode 100644 index 0000000..ffe4fd3 Binary files /dev/null and b/android-chrome-512x512.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..9732de4 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/archives/index.html b/archives/index.html new file mode 100644 index 0000000..09a9b8c --- /dev/null +++ b/archives/index.html @@ -0,0 +1,5 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content><title>归档</title> +<link rel=canonical href=https://chenkeao.github.io/archives/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="归档"><meta property="og:description" content><meta property="og:url" content="https://chenkeao.github.io/archives/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta name=twitter:title content="归档"><meta name=twitter:description content><link rel="shortcut icon" href=/favicon.ico></head><body class=template-archives><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li class=current><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><header><h2 class=section-title>Categories</h2><div class=subsection-list><div class=article-list--tile><article><a href=/categories/dontstarve/><div class=article-details><h2 class=article-title>饥荒</h2></div></a></article><article><a href=/categories/programming/><div class=article-details><h2 class=article-title>编程</h2></div></a></article><article><a href=/categories/photography/><div class=article-details><h2 class=article-title>摄影</h2></div></a></article></div></div></header><div class=archives-group id=2023><h2 class="archives-date section-title"><a href=/archives/#2023>2023</a></h2><div class=article-list--compact><article><a href=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/><div class=article-details><h2 class=article-title>饥荒联机版与多层世界</h2><footer class=article-time><time datetime=2023-06-09T00:00:00Z>2023-06-09</time></footer></div><div class=article-image><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_120x120_fill_box_smart1_3.png width=120 height=120 alt=饥荒联机版与多层世界 loading=lazy></div></a></article><article><a href=/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/><div class=article-details><h2 class=article-title>GNU Parallel的妙用</h2><footer class=article-time><time datetime=2023-06-08T00:00:00Z>2023-06-08</time></footer></div></a></article><article><a href=/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/><div class=article-details><h2 class=article-title>使用Shell批量修改文件后缀, 批量格式转换</h2><footer class=article-time><time datetime=2023-06-06T00:00:00Z>2023-06-06</time></footer></div></a></article></div></div><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git "a/archlinux\350\256\276\347\275\256\346\214\202\350\275\275\347\241\254\347\233\230\346\227\266\346\227\240\351\234\200\350\276\223\345\205\245\345\257\206\347\240\201/featured-image.png" "b/archlinux\350\256\276\347\275\256\346\214\202\350\275\275\347\241\254\347\233\230\346\227\266\346\227\240\351\234\200\350\276\223\345\205\245\345\257\206\347\240\201/featured-image.png" new file mode 100644 index 0000000..8da43f3 Binary files /dev/null and "b/archlinux\350\256\276\347\275\256\346\214\202\350\275\275\347\241\254\347\233\230\346\227\266\346\227\240\351\234\200\350\276\223\345\205\245\345\257\206\347\240\201/featured-image.png" differ diff --git "a/archlinux\350\256\276\347\275\256\346\214\202\350\275\275\347\241\254\347\233\230\346\227\266\346\227\240\351\234\200\350\276\223\345\205\245\345\257\206\347\240\201/index.html" "b/archlinux\350\256\276\347\275\256\346\214\202\350\275\275\347\241\254\347\233\230\346\227\266\346\227\240\351\234\200\350\276\223\345\205\245\345\257\206\347\240\201/index.html" new file mode 100644 index 0000000..83fb44b --- /dev/null +++ "b/archlinux\350\256\276\347\275\256\346\214\202\350\275\275\347\241\254\347\233\230\346\227\266\346\227\240\351\234\200\350\276\223\345\205\245\345\257\206\347\240\201/index.html" @@ -0,0 +1,18 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="在archlinux上使用udisks2挂载硬盘时需要输入密码,挂载位置为/run/media/$USER. 但是在manjaro上挂载时不需"><title>Archlinux设置挂载硬盘时无需输入密码</title> +<link rel=canonical href=https://chenkeao.github.io/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Archlinux设置挂载硬盘时无需输入密码"><meta property="og:description" content="在archlinux上使用udisks2挂载硬盘时需要输入密码,挂载位置为/run/media/$USER. 但是在manjaro上挂载时不需"><meta property="og:url" content="https://chenkeao.github.io/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta property="article:published_time" content="2023-06-05T00:00:00+00:00"><meta property="article:modified_time" content="2023-06-05T00:00:00+00:00"><meta name=twitter:title content="Archlinux设置挂载硬盘时无需输入密码"><meta name=twitter:description content="在archlinux上使用udisks2挂载硬盘时需要输入密码,挂载位置为/run/media/$USER. 但是在manjaro上挂载时不需"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li class=current><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/>Archlinux设置挂载硬盘时无需输入密码</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-05</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer></div></header><section class=article-content><p>在<code>archlinux</code>上使用<code>udisks2</code>挂载硬盘时需要输入密码,挂载位置为<code>/run/media/$USER</code>. 但是在<code>manjaro</code>上挂载时不需要密码,经过一番搜索,发现是<code>udisk2</code>的配置问题.<br>解决方法是修改<code>/usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy</code>文件,将其中</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-xml data-lang=xml><span class=line><span class=cl><span class=nt><action</span> <span class=na>id=</span><span class=s>"org.freedesktop.udisks2.filesystem-mount-system"</span><span class=nt>></span> +</span></span></code></pre></td></tr></table></div></div><p>标签下的</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-xml data-lang=xml><span class=line><span class=cl><span class=nt><allow_active></span>auth_admin_keep<span class=nt></allow_active></span> +</span></span></code></pre></td></tr></table></div></div><p>修改为</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-xml data-lang=xml><span class=line><span class=cl><span class=nt><allow_active></span>yes<span class=nt></allow_active></span> +</span></span></code></pre></td></tr></table></div></div><p>然后重启<code>udisk2</code>即可</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>sudo systemctl restart udisks2.service +</span></span></code></pre></td></tr></table></div></div><blockquote><p>参考: <a class=link href="https://bbs.archlinuxcn.org/viewtopic.php?id=4582" target=_blank rel=noopener>https://bbs.archlinuxcn.org/viewtopic.php?id=4582</a></p></blockquote></section><footer class=article-footer></footer></article><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/categories/dontstarve/index.html b/categories/dontstarve/index.html new file mode 100644 index 0000000..b8e4277 --- /dev/null +++ b/categories/dontstarve/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="饥荒联机版"><title>Category: 饥荒 - 陈默的BLOG</title> +<link rel=canonical href=https://chenkeao.github.io/categories/dontstarve/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Category: 饥荒 - 陈默的BLOG"><meta property="og:description" content="饥荒联机版"><meta property="og:url" content="https://chenkeao.github.io/categories/dontstarve/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Category: 饥荒 - 陈默的BLOG"><meta name=twitter:description content="饥荒联机版"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/categories/dontstarve/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title>Categories</h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>饥荒</h1><h2 class=section-description>饥荒联机版</h2></div></div></header><section class=article-list--compact><article><a href=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/><div class=article-details><h2 class=article-title>饥荒联机版与多层世界</h2><footer class=article-time><time datetime=2023-06-09T00:00:00Z>2023-06-09</time></footer></div><div class=article-image><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_120x120_fill_box_smart1_3.png width=120 height=120 alt=饥荒联机版与多层世界 loading=lazy></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/categories/dontstarve/index.xml b/categories/dontstarve/index.xml new file mode 100644 index 0000000..4f8951e --- /dev/null +++ b/categories/dontstarve/index.xml @@ -0,0 +1,462 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>饥荒 on 陈默的BLOG</title><link>https://chenkeao.github.io/categories/dontstarve/</link><description>Recent content in 饥荒 on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Fri, 09 Jun 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/categories/dontstarve/index.xml" rel="self" type="application/rss+xml"/><item><title>饥荒联机版与多层世界</title><link>https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/</link><pubDate>Fri, 09 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/</guid><description><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png" alt="Featured image of post 饥荒联机版与多层世界" /><blockquote> +<p>此文全程处于<code>linux</code>环境,阅读此文需具备一些<code>linux</code>使用经验。</p> +</blockquote> +<p>解决饥荒卡顿有两个方法,如果你是单人联机玩家,可以添加<a class="link" href="https://steamcommunity.com/sharedfiles/filedetails/?id=2657513551" target="_blank" rel="noopener" +>长路独行</a>模组,开启后就可以获得与单机版相同的游戏体验,此模组的原理的注意事项可以<a class="link" href="https://dont-starve-mod.github.io/zh/dsa_index/" target="_blank" rel="noopener" +>点此查看</a>。 +对于联机玩家,可以搭建专用服务器优化卡顿。饥荒联机版专用服务器 (Don&rsquo;t Starve Together Dedicated Server) 是由 klei 官方提供的一个工具,购买饥荒联机版后,在<code>Steam</code>的<code>库</code>页面勾选<code>TOOLS</code>后就可以看到了。 +专用服务器可以在云服务器或PC上运行。如果你的电脑配置还可以,并且不要求服务器全天运行,完全可以在自己电脑上搭建专用服务器。 +运行专用服务器每个世界大约需要<code>1G</code>内存,同时运行游戏本身也需要内存,因此内存最好在<code>8G</code>以上。如图1所示,第一个进程是游戏本身,占用了<code>1.2G</code>的内存,第二个进程是专用服务器,占用了<code>995M</code>左右的内存。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3.png" +width="781" +height="117" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图1" +class="gallery-image" +data-flex-grow="667" +data-flex-basis="1602px" +></p> +<h2 id="饥荒存档的构成">饥荒存档的构成</h2> +<blockquote> +<p>使用游戏本身创建的存档最多可以有一个森林和一个洞穴。但是饥荒专用服务器支持一个存档内包含任意多个森林和洞穴。</p> +</blockquote> +<p>专用服务器的运行单位是一个世界,而不是一个存档。比如说,一个存档中包括2个森林和2个洞穴,那么就需要启动4个专用服务器的进程实例。当然,你也可以不运行全部的世界,如果你不打算去某个世界,完全可以不启动它。这些进程通过网络通信,由于这种灵活的方式,你完全可以将一个存档中的不同的世界运行在不同的电脑上 (当然一般不需要这么做,除非你的世界太大了以至于一台电脑运行起来吃力)。</p> +<p>唯一的限制是,每个存档必须有且仅有一个主世界 (Master Shard),所有其他的世界都需要绑定到主世界。为了区分,每个世界都有一个唯一的<code>id</code>,通过给洞穴入口或洞穴出口绑定不同的<code>id</code>,玩家可以通过在多个世界之间穿越。旺达的溯源表也绑定了世界的<code>id</code>,因此可以穿越到不同的世界。如图2所示,这是一个拥有两个森林和两个洞穴的世界。其中一个森林是主世界,箭头代表可以通过洞穴入口或洞穴出口进出另一个世界。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png" +width="4572" +height="3284" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图2" +class="gallery-image" +data-flex-grow="139" +data-flex-basis="334px" +></p> +<p>这个世界对应的存档结构如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">. +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Master +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Cave1 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Cave2 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Forest1 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>-rw-r--r--<span class="o">]</span> cluster.ini +</span></span><span class="line"><span class="cl">└── <span class="o">[</span>-rw-r--r--<span class="o">]</span> cluster_token.txt +</span></span></code></pre></td></tr></table> +</div> +</div><p>可以看出,每个世界都对应一个文件夹。此外,<code>cluster.ini</code>存放了世界的一些参数设置,<code>cluster_token.txt</code>里存放了用户的身份令牌 (身份令牌的获取参见下一章)。这些就是一个 存档的完整内容。 +也可以查看<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录。如果你在本地创建了存档,那么这个目录下就会有以<code>Cluster_X</code>格式命名的文件夹,其中<code>X</code>是此存档在游戏中显示的位置。如图3所示,我创建了一个存档,那么此文件夹中就有一个<code>Cluster_1</code>。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2.png" +width="1336" +height="584" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图3" +class="gallery-image" +data-flex-grow="228" +data-flex-basis="549px" +></p> +<p>查看目录结构,可以看出我只添加了一个主世界,没有添加洞穴。只有在专用服务器上运行的存档才需要<code>cluster_token.txt</code>,因此这里没有。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">```bash +</span></span><span class="line"><span class="cl">Cluster_1 +</span></span><span class="line"><span class="cl">├── Master +</span></span><span class="line"><span class="cl">└── cluster.ini +</span></span></code></pre></td></tr></table> +</div> +</div><h2 id="在本地运行专用服务器">在本地运行专用服务器</h2> +<h3 id="准备存档文件">准备存档文件</h3> +<p>在游戏中创建存档,添加好要启用的模组并设置好世界的参数后生成世界。等待世界生成,进入选人物的步骤后,断开连接。</p> +<blockquote> +<p>一定要添加洞穴,否则存档无法在专用服务器中运行。</p> +</blockquote> +<p>进入<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录,将刚刚创建的存档<code>Cluster_X</code>(<code>X</code>是此存档在游戏中显示的位置)移动到<code>~/.klei/DontStarveTogether/</code>中。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> ~/.klei/DontStarveTogether/<span class="nv">$SteamUserID</span>/ +</span></span><span class="line"><span class="cl">mv Cluster_X .. +</span></span></code></pre></td></tr></table> +</div> +</div><p>使用浏览器打开<a class="link" href="https://accounts.klei.com/login" target="_blank" rel="noopener" +>Klei Account</a>,登录自己的<code>Klei</code>账号,可以使用<code>Steam</code>登录。登录成功后进入如下页面。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4.png" +width="1904" +height="964" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图4" +class="gallery-image" +data-flex-grow="197" +data-flex-basis="474px" +></p> +<p>点击导航栏中的<code>游戏</code>,在游戏列表中点击<code>《饥荒:联机版》的游戏服务器</code>,如下图所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5.png" +width="1365" +height="843" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图5" +class="gallery-image" +data-flex-grow="161" +data-flex-basis="388px" +></p> +<p>随便起一个名字,点击<code>添加新服务器</code>,然后复制生成的以<code>pds-g^</code>开头的代码,如下图所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6.png" +width="1320" +height="565" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图6" +class="gallery-image" +data-flex-grow="233" +data-flex-basis="560px" +></p> +<p>在<code>~/.klei/DontStarveTogether/Cluster_X</code>中创建<code>cluster_token.txt</code>文件,内容为刚刚复制的代码。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;pds-g^...&#34;</span> &gt; cluster_token.txt +</span></span></code></pre></td></tr></table> +</div> +</div><p>至此,存档文件就准备好了。</p> +<h3 id="准备专用服务器和模组">准备专用服务器和模组</h3> +<p>在<code>Steam</code>中安装<code>Don't Starve Together Dedicated Server</code>,进入安装目录 (安装目录可以在<code>Steam</code>的游戏设置中找到)。 +如果你的存档添加了模组,则需要修改<code>mods</code>文件夹下的<code>dedicated_server_mods_setup.lua</code>文件。专用服务器启动时,会根据这个文件的内容自动更新模组,如果你只在存档中添加了模组但是没有修改这个文件,则模组会添加失败。将需要添加的模组的<code>id</code>以如下这种格式添加到此文件中即可。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;1438233888&#34;</span><span class="p">)</span> <span class="c1">--多层世界选择器</span> +</span></span><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;1418746242&#34;</span><span class="p">)</span> <span class="c1">--汉化增强 Chinese++</span> +</span></span><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;666155465&#34;</span><span class="p">)</span> <span class="c1">--show me</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>模组的<code>id</code>可以通过<code>Steam</code>创意工坊中的链接查看。在<code>Steam</code>中模组的详情页面右击空白处,选择<code>Copy Page URL</code>。链接末尾的<code>?id=</code>后接的就是它的<code>id</code>。例如<code>Show Me</code>的创意工坊链接为<code>https://steamcommunity.com/sharedfiles/filedetails/?id=666155465</code>,其<code>id</code>为<code>666155465</code>。 +除了这种方式,还可以查看此存档中主世界目录中的<code>modoverrides.lua</code>文件,这个文件保存了当前世界启用的模组的设置。格式如下所示,其中<code>workshop-</code>后接的数字就是模组的<code>id</code>。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span><span class="lnt">9 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="cl"><span class="kr">return</span><span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;workshop-1418746242&#34;</span><span class="p">]</span><span class="o">=</span><span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;configuration_options&#34;</span><span class="p">]</span><span class="o">=</span><span class="p">{</span> <span class="p">[</span><span class="s2">&#34;clearfont&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span><span class="err">,</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;eventplus&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span><span class="err">,</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;extratrans&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span> +</span></span><span class="line"><span class="cl"> <span class="p">},</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;enabled&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span> +</span></span><span class="line"><span class="cl"> <span class="p">}</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>如下命令会根据<code>modoverrides.lua</code>文件自动生成<code>dedicated_server_mods_setup.lua</code>文件。<code>cd</code>到<code>modoverrides.lua</code>所在目录中执行如下命令,然后将生成的文件复制到<code>专用服务器安装目录/mods</code>文件夹覆盖原有文件即可。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat ./modoverrides.lua <span class="p">|</span> grep -E <span class="s1">&#39;\[&#34;workshop-[0-9]+&#34;\].*&#39;</span> <span class="p">|</span> sed -r <span class="s1">&#39;s/\[&#34;workshop-([0-9]+)&#34;\].*/ServerModSetup(&#34;\1&#34;)/g&#39;</span> &gt; dedicated_server_mods_setup.lua +</span></span></code></pre></td></tr></table> +</div> +</div><h3 id="启动专用服务器">启动专用服务器</h3> +<p><code>cd</code>到安装目录中的<code>bin64</code>文件夹,执行</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class="s2">&#34;Cluster_X&#34;</span> -monitor_parent_process <span class="nv">$$</span> -shard Caves <span class="p">&amp;</span> +</span></span><span class="line"><span class="cl">./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class="s2">&#34;Cluster_X&#34;</span> -monitor_parent_process <span class="nv">$$</span> -shard Master +</span></span></code></pre></td></tr></table> +</div> +</div><p><code>-console</code>指定在游戏中启用控制台。 +<code>-cluster</code>指定存档的名字,这个名字和要运行的存档文件夹名对应。 +<code>-shard</code>指定世界碎片的名字。同样,这个名字也要和世界碎片的文件夹名对应。</p> +<blockquote> +<p>在<code>cluster.ini</code>中也可以指定一个名称,这个名称是在游戏中玩家看的世界名称。而<code>-cluster</code>指定的只是文件夹的名称,在游戏中是看不到的。</p> +</blockquote> +<h2 id="在云服务器运行专用服务器">在云服务器运行专用服务器</h2> +<p>购买阿里云或腾讯云提供的云服务器,配置选择<code>1核2G</code>或者<code>2核4G</code>即可。安装<code>Debian</code>或<code>Ubuntu</code>操作系统,在安全组中开放<code>10888-10999</code>端口。此处以<code>Debian</code>为例。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"> _,met<span class="nv">$$$$$gg</span>. momo@debian +</span></span><span class="line"><span class="cl"> ,g<span class="nv">$$$$$$$$$$$$$$$P</span>. ----------- +</span></span><span class="line"><span class="cl"> ,g<span class="nv">$$</span>P<span class="s2">&#34; &#34;&#34;&#34;</span>Y<span class="nv">$$</span>.<span class="s2">&#34;. OS: Debian GNU/Linux 11 (bullseye) x86_64 +</span></span></span><span class="line"><span class="cl"><span class="s2"> ,</span><span class="nv">$$</span><span class="s2">P&#39; `</span><span class="nv">$$</span>$<span class="s2">. Host: VirtualBox 1.2 +</span></span></span><span class="line"><span class="cl"><span class="s2">&#39;,</span><span class="nv">$$</span><span class="s2">P ,ggs. `</span><span class="nv">$$</span><span class="s2">b: Kernel: 5.10.0-23-amd64 +</span></span></span><span class="line"><span class="cl"><span class="s2">`d</span><span class="nv">$$</span><span class="s2">&#39; ,</span><span class="nv">$P</span><span class="s2">&#34;</span><span class="s1">&#39; . $$$ Uptime: 1 min +</span></span></span><span class="line"><span class="cl"><span class="s1"> $$P d$&#39;</span> , <span class="nv">$$</span>P Packages: <span class="m">444</span> <span class="o">(</span>dpkg<span class="o">)</span> +</span></span><span class="line"><span class="cl"> <span class="nv">$$</span>: <span class="nv">$$</span>. - ,d<span class="nv">$$</span><span class="s1">&#39; Shell: bash 5.1.4 +</span></span></span><span class="line"><span class="cl"><span class="s1"> $$; Y$b._ _,d$P&#39;</span> Resolution: preferred +</span></span><span class="line"><span class="cl"> Y<span class="nv">$$</span>. <span class="sb">`</span>.<span class="sb">`</span><span class="s2">&#34;Y</span><span class="nv">$$$$</span><span class="s2">P&#34;</span><span class="err">&#39;</span> Terminal: /dev/pts/0 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span><span class="nv">$$</span>b <span class="s2">&#34;-.__ CPU: Intel i5-7300HQ (2) @ 2.496GHz +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2"> GPU: 00:02.0 VMware SVGA II Adapter +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2">. Memory: 78MiB / 3919MiB +</span></span></span><span class="line"><span class="cl"><span class="s2"> `</span><span class="nv">$$</span><span class="s2">b. +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2">b. +</span></span></span><span class="line"><span class="cl"><span class="s2"> `&#34;</span>Y<span class="nv">$b</span>._ +</span></span><span class="line"><span class="cl"> <span class="sb">`</span><span class="s2">&#34;&#34;&#34; +</span></span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>添加<code>32</code>位支持</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dpkg --add-architecture i386 +</span></span><span class="line"><span class="cl">sudo apt update <span class="o">&amp;&amp;</span> sudo apt upgrade -y +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>安装依赖</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install libstdc++6:i386 libgcc1:i386 libcurl4-gnutls-dev:i386 -y +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>安装<code>SteamCMD</code></li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 这一步的速度视网络环境而定</span> +</span></span><span class="line"><span class="cl">mkdir -p ~/steamcmd/ +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ~/steamcmd/ +</span></span><span class="line"><span class="cl">wget <span class="s2">&#34;https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz&#34;</span> +</span></span><span class="line"><span class="cl">tar -xvzf steamcmd_linux.tar.gz +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>准备存档文件 +这一步骤与上一章中的相同,可以在本地生成存档文件夹,然后上传到服务器。</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 在服务器</span> +</span></span><span class="line"><span class="cl">mkdir -p ~/.klei/DoNotStarveTogether +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="c1"># 在本地</span> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ~/.klei/DoNotStarveTogether +</span></span><span class="line"><span class="cl">scp -r ./Cluster_X username@xxx.xxx.xxx.xxx:~/.klei/DoNotStarveTogether/ +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>将以下内容写入<code>run_server.sh</code>文件并赋予其执行权限。</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span><span class="lnt">20 +</span><span class="lnt">21 +</span><span class="lnt">22 +</span><span class="lnt">23 +</span><span class="lnt">24 +</span><span class="lnt">25 +</span><span class="lnt">26 +</span><span class="lnt">27 +</span><span class="lnt">28 +</span><span class="lnt">29 +</span><span class="lnt">30 +</span><span class="lnt">31 +</span><span class="lnt">32 +</span><span class="lnt">33 +</span><span class="lnt">34 +</span><span class="lnt">35 +</span><span class="lnt">36 +</span><span class="lnt">37 +</span><span class="lnt">38 +</span><span class="lnt">39 +</span><span class="lnt">40 +</span><span class="lnt">41 +</span><span class="lnt">42 +</span><span class="lnt">43 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/bin/bash +</span></span></span><span class="line"><span class="cl"><span class="cp"></span> +</span></span><span class="line"><span class="cl"><span class="nv">steamcmd_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/steamcmd&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">install_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/dontstarvetogether_dedicated_server&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">cluster_name</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">dontstarve_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/.klei/DoNotStarveTogether&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="k">function</span> fail<span class="o">()</span> +</span></span><span class="line"><span class="cl"><span class="o">{</span> +</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> Error: <span class="s2">&#34;</span><span class="nv">$@</span><span class="s2">&#34;</span> &gt;<span class="p">&amp;</span><span class="m">2</span> +</span></span><span class="line"><span class="cl"> <span class="nb">exit</span> <span class="m">1</span> +</span></span><span class="line"><span class="cl"><span class="o">}</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="k">function</span> check_for_file<span class="o">()</span> +</span></span><span class="line"><span class="cl"><span class="o">{</span> +</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">[</span> ! -e <span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> +</span></span><span class="line"><span class="cl"> fail <span class="s2">&#34;Missing file: </span><span class="nv">$1</span><span class="s2">&#34;</span> +</span></span><span class="line"><span class="cl"> <span class="k">fi</span> +</span></span><span class="line"><span class="cl"><span class="o">}</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="s2">&#34;</span><span class="nv">$steamcmd_dir</span><span class="s2">&#34;</span> <span class="o">||</span> fail <span class="s2">&#34;Missing </span><span class="nv">$steamcmd_dir</span><span class="s2"> directory!&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;steamcmd.sh&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/cluster.ini&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/cluster_token.txt&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Master/server.ini&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Caves/server.ini&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">./steamcmd.sh +force_install_dir <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">&#34;</span> +login anonymous +app_update <span class="m">343050</span> validate +quit +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/bin64&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">cat <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Master/modoverrides.lua&#34;</span> <span class="p">|</span> grep -E <span class="s1">&#39;\[&#34;workshop-[0-9]+&#34;\].*&#39;</span> <span class="p">|</span> sed -r <span class="s1">&#39;s/\[&#34;workshop-([0-9]+)&#34;\].*/ServerModSetup(&#34;\1&#34;)/g&#39;</span> &gt; <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/mods/dedicated_server_mods_setup.lua&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/bin64&#34;</span> <span class="o">||</span> fail +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">=(</span>./dontstarve_dedicated_server_nullrenderer_x64<span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-console<span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-cluster <span class="s2">&#34;</span><span class="nv">$cluster_name</span><span class="s2">&#34;</span><span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-monitor_parent_process <span class="nv">$$</span><span class="o">)</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="s2">&#34;</span><span class="si">${</span><span class="nv">run_shared</span><span class="p">[@]</span><span class="si">}</span><span class="s2">&#34;</span> -shard Caves <span class="p">|</span> sed <span class="s1">&#39;s/^/Caves: /&#39;</span> <span class="p">&amp;</span> +</span></span><span class="line"><span class="cl"><span class="s2">&#34;</span><span class="si">${</span><span class="nv">run_shared</span><span class="p">[@]</span><span class="si">}</span><span class="s2">&#34;</span> -shard Master <span class="p">|</span> sed <span class="s1">&#39;s/^/Master: /&#39;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>这个脚本是我在<code>Klei</code>官方提供的脚本的基础上优化修改而来。运行时需要提供存档文件夹的名称作为脚本的第一个参数。脚本将会检查存档文件是否完整,使用<code>SteamCMD</code>更新专用服务器并根据存档的模组设置文件<code>modoverrides.lua</code>自动生成<code>dedicated_server_mods_setup.lua</code>文件。</p> +<ul> +<li>运行脚本</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./run_server.sh Cluster_X +</span></span></code></pre></td></tr></table> +</div> +</div><p>由于第一次运行时要下载专用服务器,速度会比较慢。当终端输出<code>Sim paused</code>时就说明启动完毕,可以在游戏中搜索加入了。</p> +<blockquote> +<p>可以使用<code>tmux</code>或<code>screen</code>等工具,这样脚本就可以在后台运行了。</p> +</blockquote> +<h2 id="多层世界">多层世界</h2> +<p>理论上来说,一个存档中可以添加无数个世界。配置多层世界需要修改存档根目录中的<code>cluster.ini</code>和每个世界目录中的<code>server.ini</code>。 +首先看一下的<code>cluster.ini</code>的内容。</p> +<blockquote> +<p>TODO 文件内容分析</p> +</blockquote> +<p>使用多层世界选择器可以解决给洞穴入口绑定id的麻烦。类似于路由器的工作方式,玩家选择目标世界,由多层世界选择器将玩家送到对应世界,如图7所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7.png" +width="5284" +height="3284" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图7" +class="gallery-image" +data-flex-grow="160" +data-flex-basis="386px" +></p> +<h2 id="常见问题">常见问题</h2> +<h3 id="connecting-anonymously-to-steam-public-retry-retry">Connecting anonymously to Steam Public&hellip;: Retry Retry</h3> +<p>无法连接到<code>Steam</code>的服务器,这一般是由于<code>GFW</code>,科学上网即可解决。</p> +<h3 id="服务器启动失败-cluster_tokentxt-do-not-exist">服务器启动失败: cluster_token.txt do not exist</h3> +<p>检查<code>cluster_token.txt</code>是否存在,内容是否正确。</p> +<h3 id="服务器启动失败-libcurl-gnultsso4">服务器启动失败: libcurl-gnults.so.4</h3> +<p>安装<code>libcurl-gnults</code>。</p> +<h3 id="全部模组没有添加成功">全部模组没有添加成功</h3> +<p>查看<code>modoverrides.lua</code>和<code>dedicated_server_mods_setup.lua</code>是否都存在,内容是否正确。</p> +<h3 id="部分模组没有添加成功">部分模组没有添加成功</h3> +<p>因为网络原因,有时专用服务器会在下载某些模组时失败。如果运行后发现只有一部分模组,一般重新运行专用服务器即可。</p> +<h3 id="游戏大厅内无法搜索到世界">游戏大厅内无法搜索到世界</h3> +<p>可以通过控制台指令<code>c_connect(&quot;xxx.xxx.xxx.xxx&quot;,10999,&quot;password&quot;)</code>加入世界,其中第一个参数是服务器的<code>IP</code>地址,第二个参数是主世界碎片的端口号,第三个参数是世界的密码。</p></description></item></channel></rss> \ No newline at end of file diff --git a/categories/dontstarve/page/1/index.html b/categories/dontstarve/page/1/index.html new file mode 100644 index 0000000..3284c1e --- /dev/null +++ b/categories/dontstarve/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/categories/dontstarve/</title> +<link rel=canonical href=https://chenkeao.github.io/categories/dontstarve/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/categories/dontstarve/"></head></html> \ No newline at end of file diff --git a/categories/index.html b/categories/index.html new file mode 100644 index 0000000..a0632e4 --- /dev/null +++ b/categories/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Categories</title> +<link rel=canonical href=https://chenkeao.github.io/categories/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Categories"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/categories/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Categories"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/categories/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title></h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>Categories</h1></div></div></header><section class=article-list--compact><article><a href=/categories/dontstarve/><div class=article-details><h2 class=article-title>饥荒</h2><footer class=article-time><time datetime=2023-06-09T00:00:00Z>2023-06-09</time></footer></div></a></article><article><a href=/categories/programming/><div class=article-details><h2 class=article-title>编程</h2><footer class=article-time><time datetime=2023-06-08T00:00:00Z>2023-06-08</time></footer></div></a></article><article><a href=/categories/photography/><div class=article-details><h2 class=article-title>摄影</h2><footer class=article-time><time datetime=0001-01-01T00:00:00Z>0001-01-01</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/categories/index.xml b/categories/index.xml new file mode 100644 index 0000000..e22c0b3 --- /dev/null +++ b/categories/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on 陈默的BLOG</title><link>https://chenkeao.github.io/categories/</link><description>Recent content in Categories on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Fri, 09 Jun 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/categories/index.xml" rel="self" type="application/rss+xml"/><item><title>饥荒</title><link>https://chenkeao.github.io/categories/dontstarve/</link><pubDate>Fri, 09 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/categories/dontstarve/</guid><description/></item><item><title>编程</title><link>https://chenkeao.github.io/categories/programming/</link><pubDate>Thu, 08 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/categories/programming/</guid><description/></item><item><title>摄影</title><link>https://chenkeao.github.io/categories/photography/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/categories/photography/</guid><description/></item></channel></rss> \ No newline at end of file diff --git a/categories/page/1/index.html b/categories/page/1/index.html new file mode 100644 index 0000000..2b6306c --- /dev/null +++ b/categories/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/categories/</title> +<link rel=canonical href=https://chenkeao.github.io/categories/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/categories/"></head></html> \ No newline at end of file diff --git a/categories/photography/index.html b/categories/photography/index.html new file mode 100644 index 0000000..faff3fb --- /dev/null +++ b/categories/photography/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="一些照片"><title>Category: 摄影 - 陈默的BLOG</title> +<link rel=canonical href=https://chenkeao.github.io/categories/photography/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Category: 摄影 - 陈默的BLOG"><meta property="og:description" content="一些照片"><meta property="og:url" content="https://chenkeao.github.io/categories/photography/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Category: 摄影 - 陈默的BLOG"><meta name=twitter:description content="一些照片"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/categories/photography/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title>Categories</h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>摄影</h1><h2 class=section-description>一些照片</h2></div></div></header><section class=article-list--compact></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/categories/photography/index.xml b/categories/photography/index.xml new file mode 100644 index 0000000..719a408 --- /dev/null +++ b/categories/photography/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>摄影 on 陈默的BLOG</title><link>https://chenkeao.github.io/categories/photography/</link><description>Recent content in 摄影 on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://chenkeao.github.io/categories/photography/index.xml" rel="self" type="application/rss+xml"/></channel></rss> \ No newline at end of file diff --git a/categories/photography/page/1/index.html b/categories/photography/page/1/index.html new file mode 100644 index 0000000..45a894d --- /dev/null +++ b/categories/photography/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/categories/photography/</title> +<link rel=canonical href=https://chenkeao.github.io/categories/photography/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/categories/photography/"></head></html> \ No newline at end of file diff --git a/categories/programming/index.html b/categories/programming/index.html new file mode 100644 index 0000000..fa30953 --- /dev/null +++ b/categories/programming/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="一些代码"><title>Category: 编程 - 陈默的BLOG</title> +<link rel=canonical href=https://chenkeao.github.io/categories/programming/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Category: 编程 - 陈默的BLOG"><meta property="og:description" content="一些代码"><meta property="og:url" content="https://chenkeao.github.io/categories/programming/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Category: 编程 - 陈默的BLOG"><meta name=twitter:description content="一些代码"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/categories/programming/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title>Categories</h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>编程</h1><h2 class=section-description>一些代码</h2></div></div></header><section class=article-list--compact><article><a href=/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/><div class=article-details><h2 class=article-title>GNU Parallel的妙用</h2><footer class=article-time><time datetime=2023-06-08T00:00:00Z>2023-06-08</time></footer></div></a></article><article><a href=/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/><div class=article-details><h2 class=article-title>使用Shell批量修改文件后缀, 批量格式转换</h2><footer class=article-time><time datetime=2023-06-06T00:00:00Z>2023-06-06</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/categories/programming/index.xml b/categories/programming/index.xml new file mode 100644 index 0000000..3502588 --- /dev/null +++ b/categories/programming/index.xml @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>编程 on 陈默的BLOG</title><link>https://chenkeao.github.io/categories/programming/</link><description>Recent content in 编程 on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Thu, 08 Jun 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/categories/programming/index.xml" rel="self" type="application/rss+xml"/><item><title>GNU Parallel的妙用</title><link>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</link><pubDate>Thu, 08 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</guid><description><p><code>Android QQ</code>的图片文件是以下面这种结构保存的,以<code>Cache_</code>开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span><span class="lnt">9 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">├── 0a0 +</span></span><span class="line"><span class="cl">│ ├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">│ └── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">├── 0a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">│ └── Cache_57776dc1e17110a6 +</span></span><span class="line"><span class="cl">└── 0a7 +</span></span><span class="line"><span class="cl"> └── Cache_25d732f84bd7d0a7 +</span></span></code></pre></td></tr></table> +</div> +</div><p>使用<code>GNU Parallel</code>配合<code>mv</code>可以快速的<code>解散</code>每个二级文件夹,变成以下这种结构。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">. +</span></span><span class="line"><span class="cl">├── Cache_25d732f84bd7d0a7 +</span></span><span class="line"><span class="cl">├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">├── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">└── Cache_57776dc1e17110a6 +</span></span></code></pre></td></tr></table> +</div> +</div><p>命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">find . -name <span class="s2">&#34;*&#34;</span> -type f -print <span class="p">|</span> parallel mv <span class="o">{}</span> ./<span class="o">{</span>/<span class="o">}</span> +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考: <a class="link" href="https://www.myfreax.com/gnu-parallel/" target="_blank" rel="noopener" +>https://www.myfreax.com/gnu-parallel/</a></p> +</blockquote></description></item><item><title>使用Shell批量修改文件后缀, 批量格式转换</title><link>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</link><pubDate>Tue, 06 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</guid><description><p><code>shell</code>脚本是处理这类工作最为简单,快捷的方式。</p> +<h2 id="修改后缀">修改后缀</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.原后缀<span class="p">;</span> <span class="k">do</span> mv <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="s2">&#34;`echo </span><span class="nv">$file</span><span class="s2"> | sed s/.原后缀/.新后缀/`&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><h2 id="格式转换">格式转换</h2> +<h3 id="heic转jpg"><code>heic</code>转<code>jpg</code></h3> +<p>首先,安装转换工具。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S libheif +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>heif-convert</code>命令转换。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">heif-convert input.heic output.jpg +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.heic<span class="p">;</span> <span class="k">do</span> heif-convert <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.heic/.jpg</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>此命令的原理是根据当前文件夹下的<code>.heic</code>文件生成<code>.jpg</code>文件,如果成功生成则删除原<code>.heic</code>文件,如果未成功则不会删除原文件。 若未能生成<code>.jpg</code>文件的原因是<code>Input file 'filename.heic' is a JPEG image</code>则可以使用批量修改后缀的方法直接将文件的后缀改为<code>.jpg</code>。</p> +<h3 id="flac转mp3"><code>flac</code>转<code>mp3</code></h3> +<p>首先,安装转换工具:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S ffmpeg +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>ffmpeg</code>命令转换,除了格式转换,<code>ffmpeg</code>还支持很多功能,具体可以查阅<a class="link" href="%22https://ffmpeg.org/documentation.html%22" >文档</a>。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ffmpeg -i <span class="s1">&#39;input.flac&#39;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="s1">&#39;output.mp3&#39;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.flac<span class="p">;</span> <span class="k">do</span> ffmpeg -i <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.flac/.mp3</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>原理同上。</p> +<h3 id="速度优化">速度优化</h3> +<p>使用<code>for</code>循环的方式,所有文件排着队一个一个的被<code>ffmpeg</code>处理。 这种方式固然可以,但效率太低了。 我的运行环境如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"> -<span class="sb">`</span> momo@momo-arch +</span></span><span class="line"><span class="cl"> .o+<span class="sb">`</span> -------------- +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>ooo/ OS: Arch Linux x86_64 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooo: Host: 81AC Lenovo ideapad 720S-15IKB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooooo: Kernel: 6.3.6-arch1-1 +</span></span><span class="line"><span class="cl"> -+oooooo+: Uptime: <span class="m">6</span> hours, <span class="m">59</span> mins +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/:-:++oooo+: Packages: <span class="m">975</span> <span class="o">(</span>pacman<span class="o">)</span>, <span class="m">8</span> <span class="o">(</span>flatpak<span class="o">)</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++/+++++++: Shell: bash 5.1.16 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++++++++++++: Resolution: 1920x1080 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/+++ooooooooooooo/<span class="sb">`</span> DE: Plasma 5.27.5 +</span></span><span class="line"><span class="cl"> ./ooosssso++osssssso+<span class="sb">`</span> WM: kwin +</span></span><span class="line"><span class="cl"> .oossssso-<span class="sb">````</span>/ossssss+<span class="sb">`</span> Theme: <span class="o">[</span>Plasma<span class="o">]</span>, Layan-Light-Solid <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> -osssssso. :ssssssso. Icons: Papirus <span class="o">[</span>Plasma<span class="o">]</span>, Papirus <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> :osssssss/ osssso+++. Terminal: konsole +</span></span><span class="line"><span class="cl"> /ossssssss/ +ssssooo/- CPU: Intel i5-7300HQ <span class="o">(</span>4<span class="o">)</span> @ 3.500GHz +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/ossssso+/:- -:/+osssso+- GPU: Intel HD Graphics <span class="m">630</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+sso+:-<span class="sb">`</span> <span class="sb">`</span>.-/+oso: Memory: 7216MiB / 19554MiB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>++:. <span class="sb">`</span>-/+/ +</span></span><span class="line"><span class="cl"> .<span class="sb">`</span> <span class="sb">`</span>/ +</span></span></code></pre></td></tr></table> +</div> +</div><p>经过测试,处理<code>10</code>个<code>.flac</code>文件所需时间为<code>59</code>秒。 速度慢的原因是单进程串行的处理方式,为了提高速度,可以同时启动多个进程并行处理。</p> +<p>使用终端工具<a class="link" href="%22https://www.gnu.org/software/parallel/sphinx.html%22" >GNU Parallel</a>,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls *.flac <span class="p">|</span> parallel -j4 <span class="s2">&#34;ffmpeg -i {} -ab 320k -map_metadata 0 -id3v2_version 3 {.}.mp3 &amp;&amp; rm {}&#34;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p><code>parallel</code>将从标准输入中读取文件列表,<code>-j</code>指定了并行进程数,<code>{}</code>代表输入文件名,<code>{.}</code>代表没有后缀的输入文件名,其他用法可以<code>man parallel</code>查看。</p> +<p>经过测试,在同样环境下处理同样的<code>.flac</code>文件仅需<code>17</code>秒。</p></description></item></channel></rss> \ No newline at end of file diff --git a/categories/programming/page/1/index.html b/categories/programming/page/1/index.html new file mode 100644 index 0000000..b65a4c0 --- /dev/null +++ b/categories/programming/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/categories/programming/</title> +<link rel=canonical href=https://chenkeao.github.io/categories/programming/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/categories/programming/"></head></html> \ No newline at end of file diff --git a/en/404.html b/en/404.html new file mode 100644 index 0000000..d4e46b6 --- /dev/null +++ b/en/404.html @@ -0,0 +1,5 @@ +<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>404 Page not found</title> +<link rel=canonical href=https://chenkeao.github.io/en/404.html><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="404 Page not found"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/en/404.html"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2022-03-06T00:00:00+00:00 "><meta name=twitter:title content="404 Page not found"><meta name=twitter:description content="Nothing happened to me"><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><main class="main full-width"><div class=not-found-card><h1 class=article-title>Not Found</h1><h2 class=article-subtitle>This page does not exist</h2></div><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/about/index.html b/en/about/index.html new file mode 100644 index 0000000..84cff83 --- /dev/null +++ b/en/about/index.html @@ -0,0 +1,10 @@ +<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="There are some code, prose and photots "><title>About</title> +<link rel=canonical href=https://chenkeao.github.io/en/about/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="About"><meta property="og:description" content="There are some code, prose and photots "><meta property="og:url" content="https://chenkeao.github.io/en/about/"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta name=twitter:title content="About"><meta name=twitter:description content="There are some code, prose and photots "><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li class=current><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">Table of contents</h2><div class=widget--toc><nav id=TableOfContents><ol><li><ol><li><a href=#there-are-some-code-prose-and-photots>There are some code, prose and photots</a></li></ol></li></ol></nav></div></section></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/en/about/>About</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>1 minute read</time></div></footer><footer class=article-translations><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><div><a href=https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/ class=link>中文</a></div></footer></div></header><section class=article-content><h3 id=there-are-some-code-prose-and-photots>There are some code, prose and photots</h3></section><footer class=article-footer></footer></article><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/archives/index.html b/en/archives/index.html new file mode 100644 index 0000000..01cd31f --- /dev/null +++ b/en/archives/index.html @@ -0,0 +1,5 @@ +<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content><title>Archives</title> +<link rel=canonical href=https://chenkeao.github.io/en/archives/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Archives"><meta property="og:description" content><meta property="og:url" content="https://chenkeao.github.io/en/archives/"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta property="article:published_time" content="2022-03-06T00:00:00+00:00"><meta property="article:modified_time" content="2022-03-06T00:00:00+00:00"><meta name=twitter:title content="Archives"><meta name=twitter:description content><link rel="shortcut icon" href=/favicon.ico></head><body class=template-archives><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li class=current><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><main class="main full-width"><header></header><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/categories/index.html b/en/categories/index.html new file mode 100644 index 0000000..00b9c98 --- /dev/null +++ b/en/categories/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Categories</title> +<link rel=canonical href=https://chenkeao.github.io/en/categories/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Categories"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/en/categories/"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2022-03-06T00:00:00+00:00 "><meta name=twitter:title content="Categories"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/en/categories/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><form action=/en/search/ class="search-form widget"><p><label>Search</label> +<input name=keyword required placeholder="Type something..."> +<button title=Search><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg></button></p></form><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">Archives</h2><div class=widget-archive--list></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">Categories</h2><div class=tagCloud-tags></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">Tags</h2><div class=tagCloud-tags></div></section></aside><main class="main full-width"><header><h3 class=section-title>Section</h3><div class=section-card><div class=section-details><h3 class=section-count>0 pages</h3><h1 class=section-term>Categories</h1></div></div></header><section class=article-list--compact></section><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/categories/index.xml b/en/categories/index.xml new file mode 100644 index 0000000..91970a2 --- /dev/null +++ b/en/categories/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on Chenmo's BLOG</title><link>https://chenkeao.github.io/en/categories/</link><description>Recent content in Categories on Chenmo's BLOG</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://chenkeao.github.io/en/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss> \ No newline at end of file diff --git a/en/categories/page/1/index.html b/en/categories/page/1/index.html new file mode 100644 index 0000000..a6f0f14 --- /dev/null +++ b/en/categories/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=en><head><title>https://chenkeao.github.io/en/categories/</title> +<link rel=canonical href=https://chenkeao.github.io/en/categories/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/en/categories/"></head></html> \ No newline at end of file diff --git a/en/index.html b/en/index.html new file mode 100644 index 0000000..d26c8c5 --- /dev/null +++ b/en/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=en dir=ltr><head><meta name=generator content="Hugo 0.121.2"><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Chenmo's BLOG</title> +<link rel=canonical href=https://chenkeao.github.io/en/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Chenmo's BLOG"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/en/"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2022-03-06T00:00:00+00:00 "><meta name=twitter:title content="Chenmo's BLOG"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/en/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li class=current><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><form action=/en/search/ class="search-form widget"><p><label>Search</label> +<input name=keyword required placeholder="Type something..."> +<button title=Search><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg></button></p></form><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">Archives</h2><div class=widget-archive--list></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">Categories</h2><div class=tagCloud-tags></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">Tags</h2><div class=tagCloud-tags></div></section></aside><main class="main full-width"><section class=article-list></section><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/index.xml b/en/index.xml new file mode 100644 index 0000000..5ee2f72 --- /dev/null +++ b/en/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Chenmo's BLOG</title><link>https://chenkeao.github.io/en/</link><description>Recent content on Chenmo's BLOG</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 06 Mar 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Archives</title><link>https://chenkeao.github.io/en/archives/</link><pubDate>Sun, 06 Mar 2022 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/en/archives/</guid><description/></item><item><title>About</title><link>https://chenkeao.github.io/en/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/en/about/</guid><description><h3 id="there-are-some-code-prose-and-photots">There are some code, prose and photots</h3></description></item><item><title>Search</title><link>https://chenkeao.github.io/en/search/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/en/search/</guid><description/></item></channel></rss> \ No newline at end of file diff --git a/en/page/1/index.html b/en/page/1/index.html new file mode 100644 index 0000000..b560ab1 --- /dev/null +++ b/en/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=en><head><title>https://chenkeao.github.io/en/</title> +<link rel=canonical href=https://chenkeao.github.io/en/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/en/"></head></html> \ No newline at end of file diff --git a/en/page/index.html b/en/page/index.html new file mode 100644 index 0000000..ece235b --- /dev/null +++ b/en/page/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Pages</title> +<link rel=canonical href=https://chenkeao.github.io/en/page/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Pages"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/en/page/"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2022-03-06T00:00:00+00:00 "><meta name=twitter:title content="Pages"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/en/page/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><form action=/en/search/ class="search-form widget"><p><label>Search</label> +<input name=keyword required placeholder="Type something..."> +<button title=Search><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg></button></p></form><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">Archives</h2><div class=widget-archive--list></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">Categories</h2><div class=tagCloud-tags></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">Tags</h2><div class=tagCloud-tags></div></section></aside><main class="main full-width"><header><h3 class=section-title>Section</h3><div class=section-card><div class=section-details><h3 class=section-count>3 pages</h3><h1 class=section-term>Pages</h1></div></div></header><section class=article-list--compact><article><a href=/en/archives/><div class=article-details><h2 class=article-title>Archives</h2><footer class=article-time><time datetime=2022-03-06T00:00:00Z>2022-03-06</time></footer></div></a></article><article><a href=/en/about/><div class=article-details><h2 class=article-title>About</h2><footer class=article-time><time datetime=0001-01-01T00:00:00Z>0001-01-01</time></footer></div></a></article><article><a href=/en/search/><div class=article-details><h2 class=article-title>Search</h2><footer class=article-time><time datetime=0001-01-01T00:00:00Z>0001-01-01</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/page/index.xml b/en/page/index.xml new file mode 100644 index 0000000..1696f75 --- /dev/null +++ b/en/page/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pages on Chenmo's BLOG</title><link>https://chenkeao.github.io/en/page/</link><description>Recent content in Pages on Chenmo's BLOG</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 06 Mar 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/en/page/index.xml" rel="self" type="application/rss+xml"/><item><title>Archives</title><link>https://chenkeao.github.io/en/archives/</link><pubDate>Sun, 06 Mar 2022 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/en/archives/</guid><description/></item><item><title>About</title><link>https://chenkeao.github.io/en/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/en/about/</guid><description><h3 id="there-are-some-code-prose-and-photots">There are some code, prose and photots</h3></description></item><item><title>Search</title><link>https://chenkeao.github.io/en/search/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/en/search/</guid><description/></item></channel></rss> \ No newline at end of file diff --git a/en/page/page/1/index.html b/en/page/page/1/index.html new file mode 100644 index 0000000..4fba6af --- /dev/null +++ b/en/page/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=en><head><title>https://chenkeao.github.io/en/page/</title> +<link rel=canonical href=https://chenkeao.github.io/en/page/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/en/page/"></head></html> \ No newline at end of file diff --git a/en/search/index.html b/en/search/index.html new file mode 100644 index 0000000..fdf1f48 --- /dev/null +++ b/en/search/index.html @@ -0,0 +1,6 @@ +<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content><title>Search</title> +<link rel=canonical href=https://chenkeao.github.io/en/search/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Search"><meta property="og:description" content><meta property="og:url" content="https://chenkeao.github.io/en/search/"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta name=twitter:title content="Search"><meta name=twitter:description content><link rel=alternate type=application/json href=https://chenkeao.github.io/en/search/index.json><link rel="shortcut icon" href=/favicon.ico><link rel=preload href=/en/search/index.json as=fetch crossorigin=anonymous></head><body class=template-search><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li class=current><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><main class="main full-width"><form action=/en/search/ class=search-form data-json=/en/search/index.json><p><label>Search</label> +<input name=keyword placeholder="Type something..."></p><button title=Search><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg></button></form><div class=search-result><h3 class="search-result--title section-title"></h3><div class="search-result--list article-list--compact"></div></div><script>window.searchResultTitleTemplate="#PAGES_COUNT pages (#TIME_SECONDS seconds)"</script><script type=text/javascript src=/ts/search.js defer></script><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/search/index.json b/en/search/index.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/en/search/index.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/en/sitemap.xml b/en/sitemap.xml new file mode 100644 index 0000000..80fd13c --- /dev/null +++ b/en/sitemap.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://chenkeao.github.io/en/</loc><lastmod>2022-03-06T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/"/><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/"/></url><url><loc>https://chenkeao.github.io/en/archives/</loc><lastmod>2022-03-06T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/archives/"/><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/archives/"/></url><url><loc>https://chenkeao.github.io/en/page/</loc><lastmod>2022-03-06T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/page/"/><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/page/"/></url><url><loc>https://chenkeao.github.io/en/about/</loc><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/"/><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/about/"/></url><url><loc>https://chenkeao.github.io/en/categories/</loc><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/categories/"/><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/categories/"/></url><url><loc>https://chenkeao.github.io/en/search/</loc></url><url><loc>https://chenkeao.github.io/en/tags/</loc><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/tags/"/><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/tags/"/></url></urlset> \ No newline at end of file diff --git a/en/tags/index.html b/en/tags/index.html new file mode 100644 index 0000000..f071def --- /dev/null +++ b/en/tags/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Tags</title> +<link rel=canonical href=https://chenkeao.github.io/en/tags/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Tags"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/en/tags/"><meta property="og:site_name" content="Chenmo's BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2022-03-06T00:00:00+00:00 "><meta name=twitter:title content="Tags"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/en/tags/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label="Toggle Menu"> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/en><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/en>Chenmo's BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/en/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>Home</span></a></li><li><a href=/en/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>Archives</span></a></li><li><a href=/en/search/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg><span>Search</span></a></li><li><a href=/en/about/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>About</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/>中文</option><option value=https://chenkeao.github.io/en/ selected>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>Dark Mode</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><form action=/en/search/ class="search-form widget"><p><label>Search</label> +<input name=keyword required placeholder="Type something..."> +<button title=Search><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="10" cy="10" r="7"/><line x1="21" y1="21" x2="15" y2="15"/></svg></button></p></form><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">Archives</h2><div class=widget-archive--list></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">Categories</h2><div class=tagCloud-tags></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">Tags</h2><div class=tagCloud-tags></div></section></aside><main class="main full-width"><header><h3 class=section-title>Section</h3><div class=section-card><div class=section-details><h3 class=section-count>0 pages</h3><h1 class=section-term>Tags</h1></div></div></header><section class=article-list--compact></section><footer class=site-footer><section class=copyright>© +2023 - +2024 Chenmo's BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>Theme <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> designed by <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a></section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/en/tags/index.xml b/en/tags/index.xml new file mode 100644 index 0000000..949fff6 --- /dev/null +++ b/en/tags/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tags on Chenmo's BLOG</title><link>https://chenkeao.github.io/en/tags/</link><description>Recent content in Tags on Chenmo's BLOG</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://chenkeao.github.io/en/tags/index.xml" rel="self" type="application/rss+xml"/></channel></rss> \ No newline at end of file diff --git a/en/tags/page/1/index.html b/en/tags/page/1/index.html new file mode 100644 index 0000000..fb4f3ce --- /dev/null +++ b/en/tags/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=en><head><title>https://chenkeao.github.io/en/tags/</title> +<link rel=canonical href=https://chenkeao.github.io/en/tags/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/en/tags/"></head></html> \ No newline at end of file diff --git a/favicon-16x16.png b/favicon-16x16.png new file mode 100644 index 0000000..ae8c01f Binary files /dev/null and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..a5c5a73 Binary files /dev/null and b/favicon-32x32.png differ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..9bcb261 Binary files /dev/null and b/favicon.ico differ diff --git "a/gwenview\345\212\240\350\275\275heic\346\240\274\345\274\217\345\233\276\347\211\207/1.png" "b/gwenview\345\212\240\350\275\275heic\346\240\274\345\274\217\345\233\276\347\211\207/1.png" new file mode 100644 index 0000000..bf8ffd4 Binary files /dev/null and "b/gwenview\345\212\240\350\275\275heic\346\240\274\345\274\217\345\233\276\347\211\207/1.png" differ diff --git "a/gwenview\345\212\240\350\275\275heic\346\240\274\345\274\217\345\233\276\347\211\207/index.html" "b/gwenview\345\212\240\350\275\275heic\346\240\274\345\274\217\345\233\276\347\211\207/index.html" new file mode 100644 index 0000000..56eb3ab --- /dev/null +++ "b/gwenview\345\212\240\350\275\275heic\346\240\274\345\274\217\345\233\276\347\211\207/index.html" @@ -0,0 +1,12 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Dolphin中无法加载缩略图,也无法打开图片。 安装kimageformats后解决。 1 yay -S kimageformats 参考 https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/"><title>Gwenview加载HEIC格式图片</title> +<link rel=canonical href=https://chenkeao.github.io/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Gwenview加载HEIC格式图片"><meta property="og:description" content="Dolphin中无法加载缩略图,也无法打开图片。 安装kimageformats后解决。 1 yay -S kimageformats 参考 https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/"><meta property="og:url" content="https://chenkeao.github.io/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta property="article:published_time" content="2023-06-01T00:00:00+00:00"><meta property="article:modified_time" content="2023-06-01T00:00:00+00:00"><meta name=twitter:title content="Gwenview加载HEIC格式图片"><meta name=twitter:description content="Dolphin中无法加载缩略图,也无法打开图片。 安装kimageformats后解决。 1 yay -S kimageformats 参考 https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li class=current><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/>Gwenview加载HEIC格式图片</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-01</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer></div></header><section class=article-content><p><code>Dolphin</code>中无法加载缩略图,也无法打开图片。</p><p>安装<code>kimageformats</code>后解决。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>yay -S kimageformats +</span></span></code></pre></td></tr></table></div></div><blockquote><p>参考 <a class=link href=https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/ target=_blank rel=noopener>https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/</a></p></blockquote></section><footer class=article-footer></footer></article><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg b/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg new file mode 100644 index 0000000..7d96b6c Binary files /dev/null and b/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..c568b38 --- /dev/null +++ b/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta name=generator content="Hugo 0.121.2"><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>陈默的BLOG</title> +<link rel=canonical href=https://chenkeao.github.io/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="陈默的BLOG"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="陈默的BLOG"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li class=current><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><section class=article-list><article class=has-image><header class=article-header><div class=article-image><a href=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_800x0_resize_box_3.png srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_800x0_resize_box_3.png 800w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_1600x0_resize_box_3.png 1600w" width=800 height=575 loading=lazy alt="Featured image of post 饥荒联机版与多层世界"></a></div><div class=article-details><header class=article-category><a href=/categories/dontstarve/ style=background-color:#2a9d8f;color:#fff>饥荒</a></header><div class=article-title-wrapper><h2 class=article-title><a href=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/>饥荒联机版与多层世界</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-09</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 8 分钟</time></div></footer></div></header></article><article><header class=article-header><div class=article-details><header class=article-category><a href=/categories/programming/ style=background-color:#7eb2ff;color:#fff>编程</a></header><div class=article-title-wrapper><h2 class=article-title><a href=/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/>GNU Parallel的妙用</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-08</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer></div></header></article><article><header class=article-header><div class=article-details><header class=article-category><a href=/categories/programming/ style=background-color:#7eb2ff;color:#fff>编程</a></header><div class=article-title-wrapper><h2 class=article-title><a href=/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/>使用Shell批量修改文件后缀, 批量格式转换</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-06</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 2 分钟</time></div></footer></div></header></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/index.xml b/index.xml new file mode 100644 index 0000000..91212c5 --- /dev/null +++ b/index.xml @@ -0,0 +1,723 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>陈默的BLOG</title><link>https://chenkeao.github.io/</link><description>Recent content on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Thu, 04 Jan 2024 17:42:11 +0800</lastBuildDate><atom:link href="https://chenkeao.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>KDE Global Menu与Flatpak</title><link>https://chenkeao.github.io/kde-global-menu%E4%B8%8Eflatpak/</link><pubDate>Thu, 04 Jan 2024 17:42:11 +0800</pubDate><guid>https://chenkeao.github.io/kde-global-menu%E4%B8%8Eflatpak/</guid><description><p>从 Flatpak 安装的 Obsidian 不显示全局菜单。执行下列命令后解决:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo flatpak override --talk-name<span class="o">=</span>com.canonical.AppMenu.Regist +</span></span><span class="line"><span class="cl">rar md.obsidian.Obsidian +</span></span></code></pre></td></tr></table> +</div> +</div></description></item><item><title>Linux Zen与Nvidia</title><link>https://chenkeao.github.io/linux-zen%E4%B8%8Envidia/</link><pubDate>Mon, 01 Jan 2024 20:17:04 +0800</pubDate><guid>https://chenkeao.github.io/linux-zen%E4%B8%8Envidia/</guid><description><p><code>prime-run steam</code>命令报错<code>X Error of failed request: BadValue (integer parameter out of range for operation)</code>,原因是内核与<code>nvidia</code>驱动不匹配。按照<code>archwiki</code>的说明,安装<code>linux-zen-headers</code>和<code>nvidia-dkms</code>并添加内核参数<code>CONFIG_DRM_SIMPLEDRM=y</code>后解决。</p></description></item><item><title>Wayland与Anki</title><link>https://chenkeao.github.io/wayland-and-anki/</link><pubDate>Sun, 31 Dec 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/wayland-and-anki/</guid><description><p>为了使用<code>Waydroid</code>不得已换<code>X11</code>为<code>Wayland</code>,随之问题就来了。基于<code>Qt6</code>的<code>Anki</code>似乎与<code>Wayland</code>兼容的不太好,无法在<code>KDE</code>中使用全局菜单,并且<code>Goldendict</code>的<code>Ctrl+c+c</code>粘贴板查词功能在<code>Anki</code>里也无法使用了。 +Google上搜索了一番后发现可以用<code>WAYLAND_DISPLAY=&quot;&quot;</code>环境变量强制<code>Anki</code>使用<code>X11</code>解决。使用后果然没有上述问题了,但是出现了新的问题:<code>fcitx</code>无法在<code>Anki</code>里使用了。略微思考后,我想起来我遵从<code>Wayland</code>的建议删掉了在<code>/etc/environment</code>全局设置的<code>QT_IM_MODULE=fcitx</code>。这个问题官方的建议也提及了,可以单独为<code>Anki</code>设置环境变量,设置后问题果然解决。启动命令:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nv">WAYLAND_DISPLAY</span><span class="o">=</span> <span class="nv">QT_IM_MODULE</span><span class="o">=</span>fcitx Anki +</span></span></code></pre></td></tr></table> +</div> +</div></description></item><item><title>日记</title><link>https://chenkeao.github.io/%E6%97%A5%E8%AE%B0/</link><pubDate>Sun, 09 Jul 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/%E6%97%A5%E8%AE%B0/</guid><description><p>已经凌晨两点了,我却睡不着。最近总想写点什么,写一些从内容上来说不是遗书,从作用上来说却是遗书的内容。若是意外来临,我骤然离去,也能留下些话给在乎我的人,或者即使没有死去,但不再有从前的意识,也能看着我的外表读读我写的话。</p> +<p>我打算写很多,也打算写给很多人看,没有什么固定的主题,也没有哪句话算作完结,我可能会写到自己的喜好,喜欢的书,喜欢的电影,喜欢的事。或者会写到一些故事,让我印象深刻的故事。又或者一些感受,一些期望,一些牢骚。若是我能长寿,愿我可以写成一本书,只是那时候恐怕已无人愿意为了我翻阅这本书。若你为怀念我来阅读此文,切勿感伤,我希望世界上多一些欢笑,而不是痛苦。至少在现在,我二十三岁的时候,我相信做人最幸福的事情就是从未出生过,苦难如同真空中的以太,幸福则如同一颗新星,昙花一现。这并非悲观,正因为此,我相信人生的意义在于增加世界上的欢乐,让每个人可以尽量幸福的走完一生。在满溢痛苦的世界上制造更多的痛苦是愚蠢的。可理想总是理想,没有人可以只生产欢乐。当我意识到这世界充满不幸的时候,我已经经历了很多,有时候是我自己造成的,有些时候我也是受害者,有时候它就在那里,没有什么人是罪魁祸首,它就在那,在必经之路上等待你,避无可避。</p> +<p>居安思危,每当我心中感到幸福时,都不由的开始担心,因为我知道幸福一定是短暂的,不知道这一次会是 怎么样的走向不幸。每当我看到美景,欣赏之余一定会感到无尽的惋惜,惋惜无论怎么做都无法将其定格。每当从一场恍若隔世的梦中醒来,我总是尝试用文字记录下那片刻所想,可回头再看时就只有平淡的情节,再也无法体会那种感受。以至于有时我会怀疑,是否是睡着时穿越到了另一个平行宇宙?经历了另一种截然不同的可能?那样触手可及又那样遥远无期,像是来自另一个世界的另一个自己。</p> +<p>幸运的是,我还能用文字记录下这个世界中的我的所思所想,写下现在的自己。如果我能有幸一直活着,未来我可以和曾经的自己的对话,如果不能,他人也可以和那个曾经活着的我对话。我想写一篇篇散文,或者是一篇篇日记。如果写得多了,他日可以整理成册;如果写得少了,往后某天看到也是一段回忆。</p></description></item><item><title>饥荒联机版与多层世界</title><link>https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/</link><pubDate>Fri, 09 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/</guid><description><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png" alt="Featured image of post 饥荒联机版与多层世界" /><blockquote> +<p>此文全程处于<code>linux</code>环境,阅读此文需具备一些<code>linux</code>使用经验。</p> +</blockquote> +<p>解决饥荒卡顿有两个方法,如果你是单人联机玩家,可以添加<a class="link" href="https://steamcommunity.com/sharedfiles/filedetails/?id=2657513551" target="_blank" rel="noopener" +>长路独行</a>模组,开启后就可以获得与单机版相同的游戏体验,此模组的原理的注意事项可以<a class="link" href="https://dont-starve-mod.github.io/zh/dsa_index/" target="_blank" rel="noopener" +>点此查看</a>。 +对于联机玩家,可以搭建专用服务器优化卡顿。饥荒联机版专用服务器 (Don&rsquo;t Starve Together Dedicated Server) 是由 klei 官方提供的一个工具,购买饥荒联机版后,在<code>Steam</code>的<code>库</code>页面勾选<code>TOOLS</code>后就可以看到了。 +专用服务器可以在云服务器或PC上运行。如果你的电脑配置还可以,并且不要求服务器全天运行,完全可以在自己电脑上搭建专用服务器。 +运行专用服务器每个世界大约需要<code>1G</code>内存,同时运行游戏本身也需要内存,因此内存最好在<code>8G</code>以上。如图1所示,第一个进程是游戏本身,占用了<code>1.2G</code>的内存,第二个进程是专用服务器,占用了<code>995M</code>左右的内存。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3.png" +width="781" +height="117" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图1" +class="gallery-image" +data-flex-grow="667" +data-flex-basis="1602px" +></p> +<h2 id="饥荒存档的构成">饥荒存档的构成</h2> +<blockquote> +<p>使用游戏本身创建的存档最多可以有一个森林和一个洞穴。但是饥荒专用服务器支持一个存档内包含任意多个森林和洞穴。</p> +</blockquote> +<p>专用服务器的运行单位是一个世界,而不是一个存档。比如说,一个存档中包括2个森林和2个洞穴,那么就需要启动4个专用服务器的进程实例。当然,你也可以不运行全部的世界,如果你不打算去某个世界,完全可以不启动它。这些进程通过网络通信,由于这种灵活的方式,你完全可以将一个存档中的不同的世界运行在不同的电脑上 (当然一般不需要这么做,除非你的世界太大了以至于一台电脑运行起来吃力)。</p> +<p>唯一的限制是,每个存档必须有且仅有一个主世界 (Master Shard),所有其他的世界都需要绑定到主世界。为了区分,每个世界都有一个唯一的<code>id</code>,通过给洞穴入口或洞穴出口绑定不同的<code>id</code>,玩家可以通过在多个世界之间穿越。旺达的溯源表也绑定了世界的<code>id</code>,因此可以穿越到不同的世界。如图2所示,这是一个拥有两个森林和两个洞穴的世界。其中一个森林是主世界,箭头代表可以通过洞穴入口或洞穴出口进出另一个世界。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png" +width="4572" +height="3284" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图2" +class="gallery-image" +data-flex-grow="139" +data-flex-basis="334px" +></p> +<p>这个世界对应的存档结构如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">. +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Master +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Cave1 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Cave2 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Forest1 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>-rw-r--r--<span class="o">]</span> cluster.ini +</span></span><span class="line"><span class="cl">└── <span class="o">[</span>-rw-r--r--<span class="o">]</span> cluster_token.txt +</span></span></code></pre></td></tr></table> +</div> +</div><p>可以看出,每个世界都对应一个文件夹。此外,<code>cluster.ini</code>存放了世界的一些参数设置,<code>cluster_token.txt</code>里存放了用户的身份令牌 (身份令牌的获取参见下一章)。这些就是一个 存档的完整内容。 +也可以查看<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录。如果你在本地创建了存档,那么这个目录下就会有以<code>Cluster_X</code>格式命名的文件夹,其中<code>X</code>是此存档在游戏中显示的位置。如图3所示,我创建了一个存档,那么此文件夹中就有一个<code>Cluster_1</code>。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2.png" +width="1336" +height="584" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图3" +class="gallery-image" +data-flex-grow="228" +data-flex-basis="549px" +></p> +<p>查看目录结构,可以看出我只添加了一个主世界,没有添加洞穴。只有在专用服务器上运行的存档才需要<code>cluster_token.txt</code>,因此这里没有。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">```bash +</span></span><span class="line"><span class="cl">Cluster_1 +</span></span><span class="line"><span class="cl">├── Master +</span></span><span class="line"><span class="cl">└── cluster.ini +</span></span></code></pre></td></tr></table> +</div> +</div><h2 id="在本地运行专用服务器">在本地运行专用服务器</h2> +<h3 id="准备存档文件">准备存档文件</h3> +<p>在游戏中创建存档,添加好要启用的模组并设置好世界的参数后生成世界。等待世界生成,进入选人物的步骤后,断开连接。</p> +<blockquote> +<p>一定要添加洞穴,否则存档无法在专用服务器中运行。</p> +</blockquote> +<p>进入<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录,将刚刚创建的存档<code>Cluster_X</code>(<code>X</code>是此存档在游戏中显示的位置)移动到<code>~/.klei/DontStarveTogether/</code>中。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> ~/.klei/DontStarveTogether/<span class="nv">$SteamUserID</span>/ +</span></span><span class="line"><span class="cl">mv Cluster_X .. +</span></span></code></pre></td></tr></table> +</div> +</div><p>使用浏览器打开<a class="link" href="https://accounts.klei.com/login" target="_blank" rel="noopener" +>Klei Account</a>,登录自己的<code>Klei</code>账号,可以使用<code>Steam</code>登录。登录成功后进入如下页面。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4.png" +width="1904" +height="964" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图4" +class="gallery-image" +data-flex-grow="197" +data-flex-basis="474px" +></p> +<p>点击导航栏中的<code>游戏</code>,在游戏列表中点击<code>《饥荒:联机版》的游戏服务器</code>,如下图所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5.png" +width="1365" +height="843" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图5" +class="gallery-image" +data-flex-grow="161" +data-flex-basis="388px" +></p> +<p>随便起一个名字,点击<code>添加新服务器</code>,然后复制生成的以<code>pds-g^</code>开头的代码,如下图所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6.png" +width="1320" +height="565" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图6" +class="gallery-image" +data-flex-grow="233" +data-flex-basis="560px" +></p> +<p>在<code>~/.klei/DontStarveTogether/Cluster_X</code>中创建<code>cluster_token.txt</code>文件,内容为刚刚复制的代码。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;pds-g^...&#34;</span> &gt; cluster_token.txt +</span></span></code></pre></td></tr></table> +</div> +</div><p>至此,存档文件就准备好了。</p> +<h3 id="准备专用服务器和模组">准备专用服务器和模组</h3> +<p>在<code>Steam</code>中安装<code>Don't Starve Together Dedicated Server</code>,进入安装目录 (安装目录可以在<code>Steam</code>的游戏设置中找到)。 +如果你的存档添加了模组,则需要修改<code>mods</code>文件夹下的<code>dedicated_server_mods_setup.lua</code>文件。专用服务器启动时,会根据这个文件的内容自动更新模组,如果你只在存档中添加了模组但是没有修改这个文件,则模组会添加失败。将需要添加的模组的<code>id</code>以如下这种格式添加到此文件中即可。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;1438233888&#34;</span><span class="p">)</span> <span class="c1">--多层世界选择器</span> +</span></span><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;1418746242&#34;</span><span class="p">)</span> <span class="c1">--汉化增强 Chinese++</span> +</span></span><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;666155465&#34;</span><span class="p">)</span> <span class="c1">--show me</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>模组的<code>id</code>可以通过<code>Steam</code>创意工坊中的链接查看。在<code>Steam</code>中模组的详情页面右击空白处,选择<code>Copy Page URL</code>。链接末尾的<code>?id=</code>后接的就是它的<code>id</code>。例如<code>Show Me</code>的创意工坊链接为<code>https://steamcommunity.com/sharedfiles/filedetails/?id=666155465</code>,其<code>id</code>为<code>666155465</code>。 +除了这种方式,还可以查看此存档中主世界目录中的<code>modoverrides.lua</code>文件,这个文件保存了当前世界启用的模组的设置。格式如下所示,其中<code>workshop-</code>后接的数字就是模组的<code>id</code>。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span><span class="lnt">9 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="cl"><span class="kr">return</span><span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;workshop-1418746242&#34;</span><span class="p">]</span><span class="o">=</span><span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;configuration_options&#34;</span><span class="p">]</span><span class="o">=</span><span class="p">{</span> <span class="p">[</span><span class="s2">&#34;clearfont&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span><span class="err">,</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;eventplus&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span><span class="err">,</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;extratrans&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span> +</span></span><span class="line"><span class="cl"> <span class="p">},</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;enabled&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span> +</span></span><span class="line"><span class="cl"> <span class="p">}</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>如下命令会根据<code>modoverrides.lua</code>文件自动生成<code>dedicated_server_mods_setup.lua</code>文件。<code>cd</code>到<code>modoverrides.lua</code>所在目录中执行如下命令,然后将生成的文件复制到<code>专用服务器安装目录/mods</code>文件夹覆盖原有文件即可。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat ./modoverrides.lua <span class="p">|</span> grep -E <span class="s1">&#39;\[&#34;workshop-[0-9]+&#34;\].*&#39;</span> <span class="p">|</span> sed -r <span class="s1">&#39;s/\[&#34;workshop-([0-9]+)&#34;\].*/ServerModSetup(&#34;\1&#34;)/g&#39;</span> &gt; dedicated_server_mods_setup.lua +</span></span></code></pre></td></tr></table> +</div> +</div><h3 id="启动专用服务器">启动专用服务器</h3> +<p><code>cd</code>到安装目录中的<code>bin64</code>文件夹,执行</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class="s2">&#34;Cluster_X&#34;</span> -monitor_parent_process <span class="nv">$$</span> -shard Caves <span class="p">&amp;</span> +</span></span><span class="line"><span class="cl">./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class="s2">&#34;Cluster_X&#34;</span> -monitor_parent_process <span class="nv">$$</span> -shard Master +</span></span></code></pre></td></tr></table> +</div> +</div><p><code>-console</code>指定在游戏中启用控制台。 +<code>-cluster</code>指定存档的名字,这个名字和要运行的存档文件夹名对应。 +<code>-shard</code>指定世界碎片的名字。同样,这个名字也要和世界碎片的文件夹名对应。</p> +<blockquote> +<p>在<code>cluster.ini</code>中也可以指定一个名称,这个名称是在游戏中玩家看的世界名称。而<code>-cluster</code>指定的只是文件夹的名称,在游戏中是看不到的。</p> +</blockquote> +<h2 id="在云服务器运行专用服务器">在云服务器运行专用服务器</h2> +<p>购买阿里云或腾讯云提供的云服务器,配置选择<code>1核2G</code>或者<code>2核4G</code>即可。安装<code>Debian</code>或<code>Ubuntu</code>操作系统,在安全组中开放<code>10888-10999</code>端口。此处以<code>Debian</code>为例。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"> _,met<span class="nv">$$$$$gg</span>. momo@debian +</span></span><span class="line"><span class="cl"> ,g<span class="nv">$$$$$$$$$$$$$$$P</span>. ----------- +</span></span><span class="line"><span class="cl"> ,g<span class="nv">$$</span>P<span class="s2">&#34; &#34;&#34;&#34;</span>Y<span class="nv">$$</span>.<span class="s2">&#34;. OS: Debian GNU/Linux 11 (bullseye) x86_64 +</span></span></span><span class="line"><span class="cl"><span class="s2"> ,</span><span class="nv">$$</span><span class="s2">P&#39; `</span><span class="nv">$$</span>$<span class="s2">. Host: VirtualBox 1.2 +</span></span></span><span class="line"><span class="cl"><span class="s2">&#39;,</span><span class="nv">$$</span><span class="s2">P ,ggs. `</span><span class="nv">$$</span><span class="s2">b: Kernel: 5.10.0-23-amd64 +</span></span></span><span class="line"><span class="cl"><span class="s2">`d</span><span class="nv">$$</span><span class="s2">&#39; ,</span><span class="nv">$P</span><span class="s2">&#34;</span><span class="s1">&#39; . $$$ Uptime: 1 min +</span></span></span><span class="line"><span class="cl"><span class="s1"> $$P d$&#39;</span> , <span class="nv">$$</span>P Packages: <span class="m">444</span> <span class="o">(</span>dpkg<span class="o">)</span> +</span></span><span class="line"><span class="cl"> <span class="nv">$$</span>: <span class="nv">$$</span>. - ,d<span class="nv">$$</span><span class="s1">&#39; Shell: bash 5.1.4 +</span></span></span><span class="line"><span class="cl"><span class="s1"> $$; Y$b._ _,d$P&#39;</span> Resolution: preferred +</span></span><span class="line"><span class="cl"> Y<span class="nv">$$</span>. <span class="sb">`</span>.<span class="sb">`</span><span class="s2">&#34;Y</span><span class="nv">$$$$</span><span class="s2">P&#34;</span><span class="err">&#39;</span> Terminal: /dev/pts/0 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span><span class="nv">$$</span>b <span class="s2">&#34;-.__ CPU: Intel i5-7300HQ (2) @ 2.496GHz +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2"> GPU: 00:02.0 VMware SVGA II Adapter +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2">. Memory: 78MiB / 3919MiB +</span></span></span><span class="line"><span class="cl"><span class="s2"> `</span><span class="nv">$$</span><span class="s2">b. +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2">b. +</span></span></span><span class="line"><span class="cl"><span class="s2"> `&#34;</span>Y<span class="nv">$b</span>._ +</span></span><span class="line"><span class="cl"> <span class="sb">`</span><span class="s2">&#34;&#34;&#34; +</span></span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>添加<code>32</code>位支持</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dpkg --add-architecture i386 +</span></span><span class="line"><span class="cl">sudo apt update <span class="o">&amp;&amp;</span> sudo apt upgrade -y +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>安装依赖</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install libstdc++6:i386 libgcc1:i386 libcurl4-gnutls-dev:i386 -y +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>安装<code>SteamCMD</code></li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 这一步的速度视网络环境而定</span> +</span></span><span class="line"><span class="cl">mkdir -p ~/steamcmd/ +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ~/steamcmd/ +</span></span><span class="line"><span class="cl">wget <span class="s2">&#34;https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz&#34;</span> +</span></span><span class="line"><span class="cl">tar -xvzf steamcmd_linux.tar.gz +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>准备存档文件 +这一步骤与上一章中的相同,可以在本地生成存档文件夹,然后上传到服务器。</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 在服务器</span> +</span></span><span class="line"><span class="cl">mkdir -p ~/.klei/DoNotStarveTogether +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="c1"># 在本地</span> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ~/.klei/DoNotStarveTogether +</span></span><span class="line"><span class="cl">scp -r ./Cluster_X username@xxx.xxx.xxx.xxx:~/.klei/DoNotStarveTogether/ +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>将以下内容写入<code>run_server.sh</code>文件并赋予其执行权限。</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span><span class="lnt">20 +</span><span class="lnt">21 +</span><span class="lnt">22 +</span><span class="lnt">23 +</span><span class="lnt">24 +</span><span class="lnt">25 +</span><span class="lnt">26 +</span><span class="lnt">27 +</span><span class="lnt">28 +</span><span class="lnt">29 +</span><span class="lnt">30 +</span><span class="lnt">31 +</span><span class="lnt">32 +</span><span class="lnt">33 +</span><span class="lnt">34 +</span><span class="lnt">35 +</span><span class="lnt">36 +</span><span class="lnt">37 +</span><span class="lnt">38 +</span><span class="lnt">39 +</span><span class="lnt">40 +</span><span class="lnt">41 +</span><span class="lnt">42 +</span><span class="lnt">43 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/bin/bash +</span></span></span><span class="line"><span class="cl"><span class="cp"></span> +</span></span><span class="line"><span class="cl"><span class="nv">steamcmd_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/steamcmd&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">install_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/dontstarvetogether_dedicated_server&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">cluster_name</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">dontstarve_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/.klei/DoNotStarveTogether&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="k">function</span> fail<span class="o">()</span> +</span></span><span class="line"><span class="cl"><span class="o">{</span> +</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> Error: <span class="s2">&#34;</span><span class="nv">$@</span><span class="s2">&#34;</span> &gt;<span class="p">&amp;</span><span class="m">2</span> +</span></span><span class="line"><span class="cl"> <span class="nb">exit</span> <span class="m">1</span> +</span></span><span class="line"><span class="cl"><span class="o">}</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="k">function</span> check_for_file<span class="o">()</span> +</span></span><span class="line"><span class="cl"><span class="o">{</span> +</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">[</span> ! -e <span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> +</span></span><span class="line"><span class="cl"> fail <span class="s2">&#34;Missing file: </span><span class="nv">$1</span><span class="s2">&#34;</span> +</span></span><span class="line"><span class="cl"> <span class="k">fi</span> +</span></span><span class="line"><span class="cl"><span class="o">}</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="s2">&#34;</span><span class="nv">$steamcmd_dir</span><span class="s2">&#34;</span> <span class="o">||</span> fail <span class="s2">&#34;Missing </span><span class="nv">$steamcmd_dir</span><span class="s2"> directory!&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;steamcmd.sh&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/cluster.ini&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/cluster_token.txt&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Master/server.ini&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Caves/server.ini&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">./steamcmd.sh +force_install_dir <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">&#34;</span> +login anonymous +app_update <span class="m">343050</span> validate +quit +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/bin64&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">cat <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Master/modoverrides.lua&#34;</span> <span class="p">|</span> grep -E <span class="s1">&#39;\[&#34;workshop-[0-9]+&#34;\].*&#39;</span> <span class="p">|</span> sed -r <span class="s1">&#39;s/\[&#34;workshop-([0-9]+)&#34;\].*/ServerModSetup(&#34;\1&#34;)/g&#39;</span> &gt; <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/mods/dedicated_server_mods_setup.lua&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/bin64&#34;</span> <span class="o">||</span> fail +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">=(</span>./dontstarve_dedicated_server_nullrenderer_x64<span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-console<span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-cluster <span class="s2">&#34;</span><span class="nv">$cluster_name</span><span class="s2">&#34;</span><span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-monitor_parent_process <span class="nv">$$</span><span class="o">)</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="s2">&#34;</span><span class="si">${</span><span class="nv">run_shared</span><span class="p">[@]</span><span class="si">}</span><span class="s2">&#34;</span> -shard Caves <span class="p">|</span> sed <span class="s1">&#39;s/^/Caves: /&#39;</span> <span class="p">&amp;</span> +</span></span><span class="line"><span class="cl"><span class="s2">&#34;</span><span class="si">${</span><span class="nv">run_shared</span><span class="p">[@]</span><span class="si">}</span><span class="s2">&#34;</span> -shard Master <span class="p">|</span> sed <span class="s1">&#39;s/^/Master: /&#39;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>这个脚本是我在<code>Klei</code>官方提供的脚本的基础上优化修改而来。运行时需要提供存档文件夹的名称作为脚本的第一个参数。脚本将会检查存档文件是否完整,使用<code>SteamCMD</code>更新专用服务器并根据存档的模组设置文件<code>modoverrides.lua</code>自动生成<code>dedicated_server_mods_setup.lua</code>文件。</p> +<ul> +<li>运行脚本</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./run_server.sh Cluster_X +</span></span></code></pre></td></tr></table> +</div> +</div><p>由于第一次运行时要下载专用服务器,速度会比较慢。当终端输出<code>Sim paused</code>时就说明启动完毕,可以在游戏中搜索加入了。</p> +<blockquote> +<p>可以使用<code>tmux</code>或<code>screen</code>等工具,这样脚本就可以在后台运行了。</p> +</blockquote> +<h2 id="多层世界">多层世界</h2> +<p>理论上来说,一个存档中可以添加无数个世界。配置多层世界需要修改存档根目录中的<code>cluster.ini</code>和每个世界目录中的<code>server.ini</code>。 +首先看一下的<code>cluster.ini</code>的内容。</p> +<blockquote> +<p>TODO 文件内容分析</p> +</blockquote> +<p>使用多层世界选择器可以解决给洞穴入口绑定id的麻烦。类似于路由器的工作方式,玩家选择目标世界,由多层世界选择器将玩家送到对应世界,如图7所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7.png" +width="5284" +height="3284" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图7" +class="gallery-image" +data-flex-grow="160" +data-flex-basis="386px" +></p> +<h2 id="常见问题">常见问题</h2> +<h3 id="connecting-anonymously-to-steam-public-retry-retry">Connecting anonymously to Steam Public&hellip;: Retry Retry</h3> +<p>无法连接到<code>Steam</code>的服务器,这一般是由于<code>GFW</code>,科学上网即可解决。</p> +<h3 id="服务器启动失败-cluster_tokentxt-do-not-exist">服务器启动失败: cluster_token.txt do not exist</h3> +<p>检查<code>cluster_token.txt</code>是否存在,内容是否正确。</p> +<h3 id="服务器启动失败-libcurl-gnultsso4">服务器启动失败: libcurl-gnults.so.4</h3> +<p>安装<code>libcurl-gnults</code>。</p> +<h3 id="全部模组没有添加成功">全部模组没有添加成功</h3> +<p>查看<code>modoverrides.lua</code>和<code>dedicated_server_mods_setup.lua</code>是否都存在,内容是否正确。</p> +<h3 id="部分模组没有添加成功">部分模组没有添加成功</h3> +<p>因为网络原因,有时专用服务器会在下载某些模组时失败。如果运行后发现只有一部分模组,一般重新运行专用服务器即可。</p> +<h3 id="游戏大厅内无法搜索到世界">游戏大厅内无法搜索到世界</h3> +<p>可以通过控制台指令<code>c_connect(&quot;xxx.xxx.xxx.xxx&quot;,10999,&quot;password&quot;)</code>加入世界,其中第一个参数是服务器的<code>IP</code>地址,第二个参数是主世界碎片的端口号,第三个参数是世界的密码。</p></description></item><item><title>GNU Parallel的妙用</title><link>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</link><pubDate>Thu, 08 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</guid><description><p><code>Android QQ</code>的图片文件是以下面这种结构保存的,以<code>Cache_</code>开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span><span class="lnt">9 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">├── 0a0 +</span></span><span class="line"><span class="cl">│ ├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">│ └── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">├── 0a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">│ └── Cache_57776dc1e17110a6 +</span></span><span class="line"><span class="cl">└── 0a7 +</span></span><span class="line"><span class="cl"> └── Cache_25d732f84bd7d0a7 +</span></span></code></pre></td></tr></table> +</div> +</div><p>使用<code>GNU Parallel</code>配合<code>mv</code>可以快速的<code>解散</code>每个二级文件夹,变成以下这种结构。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">. +</span></span><span class="line"><span class="cl">├── Cache_25d732f84bd7d0a7 +</span></span><span class="line"><span class="cl">├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">├── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">└── Cache_57776dc1e17110a6 +</span></span></code></pre></td></tr></table> +</div> +</div><p>命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">find . -name <span class="s2">&#34;*&#34;</span> -type f -print <span class="p">|</span> parallel mv <span class="o">{}</span> ./<span class="o">{</span>/<span class="o">}</span> +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考: <a class="link" href="https://www.myfreax.com/gnu-parallel/" target="_blank" rel="noopener" +>https://www.myfreax.com/gnu-parallel/</a></p> +</blockquote></description></item><item><title>使用Shell批量修改文件后缀, 批量格式转换</title><link>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</link><pubDate>Tue, 06 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</guid><description><p><code>shell</code>脚本是处理这类工作最为简单,快捷的方式。</p> +<h2 id="修改后缀">修改后缀</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.原后缀<span class="p">;</span> <span class="k">do</span> mv <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="s2">&#34;`echo </span><span class="nv">$file</span><span class="s2"> | sed s/.原后缀/.新后缀/`&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><h2 id="格式转换">格式转换</h2> +<h3 id="heic转jpg"><code>heic</code>转<code>jpg</code></h3> +<p>首先,安装转换工具。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S libheif +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>heif-convert</code>命令转换。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">heif-convert input.heic output.jpg +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.heic<span class="p">;</span> <span class="k">do</span> heif-convert <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.heic/.jpg</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>此命令的原理是根据当前文件夹下的<code>.heic</code>文件生成<code>.jpg</code>文件,如果成功生成则删除原<code>.heic</code>文件,如果未成功则不会删除原文件。 若未能生成<code>.jpg</code>文件的原因是<code>Input file 'filename.heic' is a JPEG image</code>则可以使用批量修改后缀的方法直接将文件的后缀改为<code>.jpg</code>。</p> +<h3 id="flac转mp3"><code>flac</code>转<code>mp3</code></h3> +<p>首先,安装转换工具:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S ffmpeg +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>ffmpeg</code>命令转换,除了格式转换,<code>ffmpeg</code>还支持很多功能,具体可以查阅<a class="link" href="%22https://ffmpeg.org/documentation.html%22" >文档</a>。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ffmpeg -i <span class="s1">&#39;input.flac&#39;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="s1">&#39;output.mp3&#39;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.flac<span class="p">;</span> <span class="k">do</span> ffmpeg -i <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.flac/.mp3</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>原理同上。</p> +<h3 id="速度优化">速度优化</h3> +<p>使用<code>for</code>循环的方式,所有文件排着队一个一个的被<code>ffmpeg</code>处理。 这种方式固然可以,但效率太低了。 我的运行环境如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"> -<span class="sb">`</span> momo@momo-arch +</span></span><span class="line"><span class="cl"> .o+<span class="sb">`</span> -------------- +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>ooo/ OS: Arch Linux x86_64 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooo: Host: 81AC Lenovo ideapad 720S-15IKB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooooo: Kernel: 6.3.6-arch1-1 +</span></span><span class="line"><span class="cl"> -+oooooo+: Uptime: <span class="m">6</span> hours, <span class="m">59</span> mins +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/:-:++oooo+: Packages: <span class="m">975</span> <span class="o">(</span>pacman<span class="o">)</span>, <span class="m">8</span> <span class="o">(</span>flatpak<span class="o">)</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++/+++++++: Shell: bash 5.1.16 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++++++++++++: Resolution: 1920x1080 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/+++ooooooooooooo/<span class="sb">`</span> DE: Plasma 5.27.5 +</span></span><span class="line"><span class="cl"> ./ooosssso++osssssso+<span class="sb">`</span> WM: kwin +</span></span><span class="line"><span class="cl"> .oossssso-<span class="sb">````</span>/ossssss+<span class="sb">`</span> Theme: <span class="o">[</span>Plasma<span class="o">]</span>, Layan-Light-Solid <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> -osssssso. :ssssssso. Icons: Papirus <span class="o">[</span>Plasma<span class="o">]</span>, Papirus <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> :osssssss/ osssso+++. Terminal: konsole +</span></span><span class="line"><span class="cl"> /ossssssss/ +ssssooo/- CPU: Intel i5-7300HQ <span class="o">(</span>4<span class="o">)</span> @ 3.500GHz +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/ossssso+/:- -:/+osssso+- GPU: Intel HD Graphics <span class="m">630</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+sso+:-<span class="sb">`</span> <span class="sb">`</span>.-/+oso: Memory: 7216MiB / 19554MiB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>++:. <span class="sb">`</span>-/+/ +</span></span><span class="line"><span class="cl"> .<span class="sb">`</span> <span class="sb">`</span>/ +</span></span></code></pre></td></tr></table> +</div> +</div><p>经过测试,处理<code>10</code>个<code>.flac</code>文件所需时间为<code>59</code>秒。 速度慢的原因是单进程串行的处理方式,为了提高速度,可以同时启动多个进程并行处理。</p> +<p>使用终端工具<a class="link" href="%22https://www.gnu.org/software/parallel/sphinx.html%22" >GNU Parallel</a>,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls *.flac <span class="p">|</span> parallel -j4 <span class="s2">&#34;ffmpeg -i {} -ab 320k -map_metadata 0 -id3v2_version 3 {.}.mp3 &amp;&amp; rm {}&#34;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p><code>parallel</code>将从标准输入中读取文件列表,<code>-j</code>指定了并行进程数,<code>{}</code>代表输入文件名,<code>{.}</code>代表没有后缀的输入文件名,其他用法可以<code>man parallel</code>查看。</p> +<p>经过测试,在同样环境下处理同样的<code>.flac</code>文件仅需<code>17</code>秒。</p></description></item><item><title>Archlinux设置挂载硬盘时无需输入密码</title><link>https://chenkeao.github.io/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/</link><pubDate>Mon, 05 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/</guid><description><p>在<code>archlinux</code>上使用<code>udisks2</code>挂载硬盘时需要输入密码,挂载位置为<code>/run/media/$USER</code>. 但是在<code>manjaro</code>上挂载时不需要密码,经过一番搜索,发现是<code>udisk2</code>的配置问题.<br> +解决方法是修改<code>/usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy</code>文件,将其中</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;action</span> <span class="na">id=</span><span class="s">&#34;org.freedesktop.udisks2.filesystem-mount-system&#34;</span><span class="nt">&gt;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>标签下的</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;allow_active&gt;</span>auth_admin_keep<span class="nt">&lt;/allow_active&gt;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>修改为</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;allow_active&gt;</span>yes<span class="nt">&lt;/allow_active&gt;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后重启<code>udisk2</code>即可</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl restart udisks2.service +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考: <a class="link" href="https://bbs.archlinuxcn.org/viewtopic.php?id=4582" target="_blank" rel="noopener" +>https://bbs.archlinuxcn.org/viewtopic.php?id=4582</a></p> +</blockquote></description></item><item><title>Gwenview加载HEIC格式图片</title><link>https://chenkeao.github.io/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/</link><pubDate>Thu, 01 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/</guid><description><p><code>Dolphin</code>中无法加载缩略图,也无法打开图片。</p> +<p>安装<code>kimageformats</code>后解决。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S kimageformats +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考 <a class="link" href="https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/" target="_blank" rel="noopener" +>https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/</a></p> +</blockquote></description></item><item><title>关于</title><link>https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/</guid><description><h3 id="这里有一些代码-散文和照片">这里有一些代码, 散文和照片</h3></description></item><item><title>归档</title><link>https://chenkeao.github.io/archives/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/archives/</guid><description/></item></channel></rss> \ No newline at end of file diff --git "a/kde-global-menu\344\270\216flatpak/index.html" "b/kde-global-menu\344\270\216flatpak/index.html" new file mode 100644 index 0000000..2ab3ea9 --- /dev/null +++ "b/kde-global-menu\344\270\216flatpak/index.html" @@ -0,0 +1,14 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="从 Flatpak 安装的 Obsidian 不显示全局菜单。执行下列命令后解决: 1 2 sudo flatpak override --talk-name=com.canonical.AppMenu.Regist rar md.obsidian.Obsidian"><title>KDE Global Menu与Flatpak</title> +<link rel=canonical href=https://chenkeao.github.io/kde-global-menu%E4%B8%8Eflatpak/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="KDE Global Menu与Flatpak"><meta property="og:description" content="从 Flatpak 安装的 Obsidian 不显示全局菜单。执行下列命令后解决: 1 2 sudo flatpak override --talk-name=com.canonical.AppMenu.Regist rar md.obsidian.Obsidian"><meta property="og:url" content="https://chenkeao.github.io/kde-global-menu%E4%B8%8Eflatpak/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta property="article:published_time" content="2024-01-04T17:42:11+08:00"><meta property="article:modified_time" content="2024-01-04T17:42:11+08:00"><meta name=twitter:title content="KDE Global Menu与Flatpak"><meta name=twitter:description content="从 Flatpak 安装的 Obsidian 不显示全局菜单。执行下列命令后解决: 1 2 sudo flatpak override --talk-name=com.canonical.AppMenu.Regist rar md.obsidian.Obsidian"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li class=current><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/kde-global-menu%E4%B8%8Eflatpak/>KDE Global Menu与Flatpak</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2024-01-04</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer></div></header><section class=article-content><p>从 Flatpak 安装的 Obsidian 不显示全局菜单。执行下列命令后解决:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>sudo flatpak override --talk-name<span class=o>=</span>com.canonical.AppMenu.Regist +</span></span><span class=line><span class=cl>rar md.obsidian.Obsidian +</span></span></code></pre></td></tr></table></div></div></section><footer class=article-footer></footer><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css integrity="sha256-J+iAE0sgH8QSz9hpcDxXIftnj65JEZgNhGcgReTTK9s=" crossorigin=anonymous><script src=https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.js integrity="sha256-InsNdER1b2xUewP+pKCUJpkhiqwHgqiPXDlIk7GzBu4=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/auto-render.min.js integrity="sha256-y39Mpg7V3D4lhBX4x6O0bUqTV4pSrfgwEfGKfxkOdgI=" crossorigin=anonymous defer></script><script>window.addEventListener("DOMContentLoaded",()=>{renderMathInElement(document.querySelector(`.article-content`),{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredClasses:["gist"]})})</script></article><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git "a/linux-zen\344\270\216nvidia/index.html" "b/linux-zen\344\270\216nvidia/index.html" new file mode 100644 index 0000000..ad2e449 --- /dev/null +++ "b/linux-zen\344\270\216nvidia/index.html" @@ -0,0 +1,10 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="prime-run steam命令报错X Error of failed request: BadValue (integer parameter out of range for operation),原因是内核与nvidia驱动不匹配。按照archwiki的说明,安装lin"><title>Linux Zen与Nvidia</title> +<link rel=canonical href=https://chenkeao.github.io/linux-zen%E4%B8%8Envidia/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Linux Zen与Nvidia"><meta property="og:description" content="prime-run steam命令报错X Error of failed request: BadValue (integer parameter out of range for operation),原因是内核与nvidia驱动不匹配。按照archwiki的说明,安装lin"><meta property="og:url" content="https://chenkeao.github.io/linux-zen%E4%B8%8Envidia/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta property="article:published_time" content="2024-01-01T20:17:04+08:00"><meta property="article:modified_time" content="2024-01-01T20:17:04+08:00"><meta name=twitter:title content="Linux Zen与Nvidia"><meta name=twitter:description content="prime-run steam命令报错X Error of failed request: BadValue (integer parameter out of range for operation),原因是内核与nvidia驱动不匹配。按照archwiki的说明,安装lin"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li class=current><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/linux-zen%E4%B8%8Envidia/>Linux Zen与Nvidia</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2024-01-01</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer></div></header><section class=article-content><p><code>prime-run steam</code>命令报错<code>X Error of failed request: BadValue (integer parameter out of range for operation)</code>,原因是内核与<code>nvidia</code>驱动不匹配。按照<code>archwiki</code>的说明,安装<code>linux-zen-headers</code>和<code>nvidia-dkms</code>并添加内核参数<code>CONFIG_DRM_SIMPLEDRM=y</code>后解决。</p></section><footer class=article-footer></footer></article><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git "a/p/gnu-parallel\347\232\204\345\246\231\347\224\250/index.html" "b/p/gnu-parallel\347\232\204\345\246\231\347\224\250/index.html" new file mode 100644 index 0000000..1da00c9 --- /dev/null +++ "b/p/gnu-parallel\347\232\204\345\246\231\347\224\250/index.html" @@ -0,0 +1,44 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Android QQ的图片文件是以下面这种结构保存的,以Cache_开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。 1 2 3"><title>GNU Parallel的妙用</title> +<link rel=canonical href=https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="GNU Parallel的妙用"><meta property="og:description" content="Android QQ的图片文件是以下面这种结构保存的,以Cache_开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。 1 2 3"><meta property="og:url" content="https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Post"><meta property="article:tag" content="shell"><meta property="article:published_time" content="2023-06-08T00:00:00+00:00"><meta property="article:modified_time" content="2023-06-08T00:00:00+00:00"><meta name=twitter:title content="GNU Parallel的妙用"><meta name=twitter:description content="Android QQ的图片文件是以下面这种结构保存的,以Cache_开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。 1 2 3"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><header class=article-category><a href=/categories/programming/ style=background-color:#7eb2ff;color:#fff>编程</a></header><div class=article-title-wrapper><h2 class=article-title><a href=/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/>GNU Parallel的妙用</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-08</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer></div></header><section class=article-content><p><code>Android QQ</code>的图片文件是以下面这种结构保存的,以<code>Cache_</code>开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span><span class=lnt>4 +</span><span class=lnt>5 +</span><span class=lnt>6 +</span><span class=lnt>7 +</span><span class=lnt>8 +</span><span class=lnt>9 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>├── 0a0 +</span></span><span class=line><span class=cl>│ ├── Cache_2783644ca99260a0 +</span></span><span class=line><span class=cl>│ └── Cache_-4dfb57e9a7cec0a0 +</span></span><span class=line><span class=cl>├── 0a6 +</span></span><span class=line><span class=cl>│ ├── Cache_373e35b7b8a290a6 +</span></span><span class=line><span class=cl>│ ├── Cache_-489f6e9c62ea10a6 +</span></span><span class=line><span class=cl>│ └── Cache_57776dc1e17110a6 +</span></span><span class=line><span class=cl>└── 0a7 +</span></span><span class=line><span class=cl> └── Cache_25d732f84bd7d0a7 +</span></span></code></pre></td></tr></table></div></div><p>使用<code>GNU Parallel</code>配合<code>mv</code>可以快速的<code>解散</code>每个二级文件夹,变成以下这种结构。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span><span class=lnt>4 +</span><span class=lnt>5 +</span><span class=lnt>6 +</span><span class=lnt>7 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>. +</span></span><span class=line><span class=cl>├── Cache_25d732f84bd7d0a7 +</span></span><span class=line><span class=cl>├── Cache_2783644ca99260a0 +</span></span><span class=line><span class=cl>├── Cache_373e35b7b8a290a6 +</span></span><span class=line><span class=cl>├── Cache_-489f6e9c62ea10a6 +</span></span><span class=line><span class=cl>├── Cache_-4dfb57e9a7cec0a0 +</span></span><span class=line><span class=cl>└── Cache_57776dc1e17110a6 +</span></span></code></pre></td></tr></table></div></div><p>命令如下:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>find . -name <span class=s2>"*"</span> -type f -print <span class=p>|</span> parallel mv <span class=o>{}</span> ./<span class=o>{</span>/<span class=o>}</span> +</span></span></code></pre></td></tr></table></div></div><blockquote><p>参考: <a class=link href=https://www.myfreax.com/gnu-parallel/ target=_blank rel=noopener>https://www.myfreax.com/gnu-parallel/</a></p></blockquote></section><footer class=article-footer><section class=article-tags><a href=/tags/shell/>shell</a></section></footer></article><aside class=related-content--wrapper><h2 class=section-title>相关文章</h2><div class=related-content><div class="flex article-list--tile"><article><a href=/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/><div class=article-details><h2 class=article-title>使用Shell批量修改文件后缀, 批量格式转换</h2></div></a></article></div></div></aside><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git "a/p/\344\275\277\347\224\250shell\346\211\271\351\207\217\344\277\256\346\224\271\346\226\207\344\273\266\345\220\216\347\274\200-\346\211\271\351\207\217\346\240\274\345\274\217\350\275\254\346\215\242/1.png" "b/p/\344\275\277\347\224\250shell\346\211\271\351\207\217\344\277\256\346\224\271\346\226\207\344\273\266\345\220\216\347\274\200-\346\211\271\351\207\217\346\240\274\345\274\217\350\275\254\346\215\242/1.png" new file mode 100644 index 0000000..eec14e5 Binary files /dev/null and "b/p/\344\275\277\347\224\250shell\346\211\271\351\207\217\344\277\256\346\224\271\346\226\207\344\273\266\345\220\216\347\274\200-\346\211\271\351\207\217\346\240\274\345\274\217\350\275\254\346\215\242/1.png" differ diff --git "a/p/\344\275\277\347\224\250shell\346\211\271\351\207\217\344\277\256\346\224\271\346\226\207\344\273\266\345\220\216\347\274\200-\346\211\271\351\207\217\346\240\274\345\274\217\350\275\254\346\215\242/index.html" "b/p/\344\275\277\347\224\250shell\346\211\271\351\207\217\344\277\256\346\224\271\346\226\207\344\273\266\345\220\216\347\274\200-\346\211\271\351\207\217\346\240\274\345\274\217\350\275\254\346\215\242/index.html" new file mode 100644 index 0000000..59fa50e --- /dev/null +++ "b/p/\344\275\277\347\224\250shell\346\211\271\351\207\217\344\277\256\346\224\271\346\226\207\344\273\266\345\220\216\347\274\200-\346\211\271\351\207\217\346\240\274\345\274\217\350\275\254\346\215\242/index.html" @@ -0,0 +1,64 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="shell脚本是处理这类工作最为简单,快捷的方式。 修改后缀 1 for file in *.原后缀; do mv &#34;$file&#34; &#34;`echo $file | sed s/.原后缀/.新后缀/`&#34;; done 格式转换"><title>使用Shell批量修改文件后缀, 批量格式转换</title> +<link rel=canonical href=https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="使用Shell批量修改文件后缀, 批量格式转换"><meta property="og:description" content="shell脚本是处理这类工作最为简单,快捷的方式。 修改后缀 1 for file in *.原后缀; do mv &#34;$file&#34; &#34;`echo $file | sed s/.原后缀/.新后缀/`&#34;; done 格式转换"><meta property="og:url" content="https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Post"><meta property="article:tag" content="shell"><meta property="article:published_time" content="2023-06-06T00:00:00+00:00"><meta property="article:modified_time" content="2023-06-06T00:00:00+00:00"><meta name=twitter:title content="使用Shell批量修改文件后缀, 批量格式转换"><meta name=twitter:description content="shell脚本是处理这类工作最为简单,快捷的方式。 修改后缀 1 for file in *.原后缀; do mv &#34;$file&#34; &#34;`echo $file | sed s/.原后缀/.新后缀/`&#34;; done 格式转换"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">目录</h2><div class=widget--toc><nav id=TableOfContents><ol><li><a href=#修改后缀>修改后缀</a></li><li><a href=#格式转换>格式转换</a><ol><li><a href=#heic转jpg><code>heic</code>转<code>jpg</code></a></li><li><a href=#flac转mp3><code>flac</code>转<code>mp3</code></a></li><li><a href=#速度优化>速度优化</a></li></ol></li></ol></nav></div></section></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><header class=article-category><a href=/categories/programming/ style=background-color:#7eb2ff;color:#fff>编程</a></header><div class=article-title-wrapper><h2 class=article-title><a href=/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/>使用Shell批量修改文件后缀, 批量格式转换</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-06</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 2 分钟</time></div></footer></div></header><section class=article-content><p><code>shell</code>脚本是处理这类工作最为简单,快捷的方式。</p><h2 id=修改后缀>修改后缀</h2><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=k>for</span> file in *.原后缀<span class=p>;</span> <span class=k>do</span> mv <span class=s2>"</span><span class=nv>$file</span><span class=s2>"</span> <span class=s2>"`echo </span><span class=nv>$file</span><span class=s2> | sed s/.原后缀/.新后缀/`"</span><span class=p>;</span> <span class=k>done</span> +</span></span></code></pre></td></tr></table></div></div><h2 id=格式转换>格式转换</h2><h3 id=heic转jpg><code>heic</code>转<code>jpg</code></h3><p>首先,安装转换工具。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>yay -S libheif +</span></span></code></pre></td></tr></table></div></div><p>然后可以使用<code>heif-convert</code>命令转换。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>heif-convert input.heic output.jpg +</span></span></code></pre></td></tr></table></div></div><p>批量转换,命令如下。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=k>for</span> file in *.heic<span class=p>;</span> <span class=k>do</span> heif-convert <span class=s2>"</span><span class=nv>$file</span><span class=s2>"</span> <span class=si>${</span><span class=nv>file</span><span class=p>/%.heic/.jpg</span><span class=si>}</span> <span class=o>&&</span> rm <span class=s2>"</span><span class=nv>$file</span><span class=s2>"</span><span class=p>;</span> <span class=k>done</span> +</span></span></code></pre></td></tr></table></div></div><p>此命令的原理是根据当前文件夹下的<code>.heic</code>文件生成<code>.jpg</code>文件,如果成功生成则删除原<code>.heic</code>文件,如果未成功则不会删除原文件。 若未能生成<code>.jpg</code>文件的原因是<code>Input file 'filename.heic' is a JPEG image</code>则可以使用批量修改后缀的方法直接将文件的后缀改为<code>.jpg</code>。</p><h3 id=flac转mp3><code>flac</code>转<code>mp3</code></h3><p>首先,安装转换工具:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>yay -S ffmpeg +</span></span></code></pre></td></tr></table></div></div><p>然后可以使用<code>ffmpeg</code>命令转换,除了格式转换,<code>ffmpeg</code>还支持很多功能,具体可以查阅<a class=link href=%22https://ffmpeg.org/documentation.html%22>文档</a>。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>ffmpeg -i <span class=s1>'input.flac'</span> -ab 320k -map_metadata <span class=m>0</span> -id3v2_version <span class=m>3</span> <span class=s1>'output.mp3'</span> +</span></span></code></pre></td></tr></table></div></div><p>批量转换,命令如下:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=k>for</span> file in *.flac<span class=p>;</span> <span class=k>do</span> ffmpeg -i <span class=s2>"</span><span class=nv>$file</span><span class=s2>"</span> -ab 320k -map_metadata <span class=m>0</span> -id3v2_version <span class=m>3</span> <span class=si>${</span><span class=nv>file</span><span class=p>/%.flac/.mp3</span><span class=si>}</span> <span class=o>&&</span> rm <span class=s2>"</span><span class=nv>$file</span><span class=s2>"</span><span class=p>;</span> <span class=k>done</span> +</span></span></code></pre></td></tr></table></div></div><p>原理同上。</p><h3 id=速度优化>速度优化</h3><p>使用<code>for</code>循环的方式,所有文件排着队一个一个的被<code>ffmpeg</code>处理。 这种方式固然可以,但效率太低了。 我的运行环境如下:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt> 1 +</span><span class=lnt> 2 +</span><span class=lnt> 3 +</span><span class=lnt> 4 +</span><span class=lnt> 5 +</span><span class=lnt> 6 +</span><span class=lnt> 7 +</span><span class=lnt> 8 +</span><span class=lnt> 9 +</span><span class=lnt>10 +</span><span class=lnt>11 +</span><span class=lnt>12 +</span><span class=lnt>13 +</span><span class=lnt>14 +</span><span class=lnt>15 +</span><span class=lnt>16 +</span><span class=lnt>17 +</span><span class=lnt>18 +</span><span class=lnt>19 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl> -<span class=sb>`</span> momo@momo-arch +</span></span><span class=line><span class=cl> .o+<span class=sb>`</span> -------------- +</span></span><span class=line><span class=cl> <span class=sb>`</span>ooo/ OS: Arch Linux x86_64 +</span></span><span class=line><span class=cl> <span class=sb>`</span>+oooo: Host: 81AC Lenovo ideapad 720S-15IKB +</span></span><span class=line><span class=cl> <span class=sb>`</span>+oooooo: Kernel: 6.3.6-arch1-1 +</span></span><span class=line><span class=cl> -+oooooo+: Uptime: <span class=m>6</span> hours, <span class=m>59</span> mins +</span></span><span class=line><span class=cl> <span class=sb>`</span>/:-:++oooo+: Packages: <span class=m>975</span> <span class=o>(</span>pacman<span class=o>)</span>, <span class=m>8</span> <span class=o>(</span>flatpak<span class=o>)</span> +</span></span><span class=line><span class=cl> <span class=sb>`</span>/++++/+++++++: Shell: bash 5.1.16 +</span></span><span class=line><span class=cl> <span class=sb>`</span>/++++++++++++++: Resolution: 1920x1080 +</span></span><span class=line><span class=cl> <span class=sb>`</span>/+++ooooooooooooo/<span class=sb>`</span> DE: Plasma 5.27.5 +</span></span><span class=line><span class=cl> ./ooosssso++osssssso+<span class=sb>`</span> WM: kwin +</span></span><span class=line><span class=cl> .oossssso-<span class=sb>````</span>/ossssss+<span class=sb>`</span> Theme: <span class=o>[</span>Plasma<span class=o>]</span>, Layan-Light-Solid <span class=o>[</span>GTK2/3<span class=o>]</span> +</span></span><span class=line><span class=cl> -osssssso. :ssssssso. Icons: Papirus <span class=o>[</span>Plasma<span class=o>]</span>, Papirus <span class=o>[</span>GTK2/3<span class=o>]</span> +</span></span><span class=line><span class=cl> :osssssss/ osssso+++. Terminal: konsole +</span></span><span class=line><span class=cl> /ossssssss/ +ssssooo/- CPU: Intel i5-7300HQ <span class=o>(</span>4<span class=o>)</span> @ 3.500GHz +</span></span><span class=line><span class=cl> <span class=sb>`</span>/ossssso+/:- -:/+osssso+- GPU: Intel HD Graphics <span class=m>630</span> +</span></span><span class=line><span class=cl> <span class=sb>`</span>+sso+:-<span class=sb>`</span> <span class=sb>`</span>.-/+oso: Memory: 7216MiB / 19554MiB +</span></span><span class=line><span class=cl> <span class=sb>`</span>++:. <span class=sb>`</span>-/+/ +</span></span><span class=line><span class=cl> .<span class=sb>`</span> <span class=sb>`</span>/ +</span></span></code></pre></td></tr></table></div></div><p>经过测试,处理<code>10</code>个<code>.flac</code>文件所需时间为<code>59</code>秒。 速度慢的原因是单进程串行的处理方式,为了提高速度,可以同时启动多个进程并行处理。</p><p>使用终端工具<a class=link href=%22https://www.gnu.org/software/parallel/sphinx.html%22>GNU Parallel</a>,命令如下:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>ls *.flac <span class=p>|</span> parallel -j4 <span class=s2>"ffmpeg -i {} -ab 320k -map_metadata 0 -id3v2_version 3 {.}.mp3 && rm {}"</span> +</span></span></code></pre></td></tr></table></div></div><p><code>parallel</code>将从标准输入中读取文件列表,<code>-j</code>指定了并行进程数,<code>{}</code>代表输入文件名,<code>{.}</code>代表没有后缀的输入文件名,其他用法可以<code>man parallel</code>查看。</p><p>经过测试,在同样环境下处理同样的<code>.flac</code>文件仅需<code>17</code>秒。</p></section><footer class=article-footer><section class=article-tags><a href=/tags/shell/>shell</a></section></footer></article><aside class=related-content--wrapper><h2 class=section-title>相关文章</h2><div class=related-content><div class="flex article-list--tile"><article><a href=/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/><div class=article-details><h2 class=article-title>GNU Parallel的妙用</h2></div></a></article></div></div></aside><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1.png" new file mode 100644 index 0000000..6ad0894 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_1024x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_1024x0_resize_box_3.png" new file mode 100644 index 0000000..c659384 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_1024x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_120x120_fill_box_smart1_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_120x120_fill_box_smart1_3.png" new file mode 100644 index 0000000..00a528c Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_120x120_fill_box_smart1_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_1600x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_1600x0_resize_box_3.png" new file mode 100644 index 0000000..f59d9c6 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_1600x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_480x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_480x0_resize_box_3.png" new file mode 100644 index 0000000..2695b55 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_480x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_800x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_800x0_resize_box_3.png" new file mode 100644 index 0000000..73fcb6d Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/1_hu129a27db28398330fc918fa0055f3a51_4101404_800x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2.png" new file mode 100644 index 0000000..1dff7f5 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2_hua905188e55056a5721dc7f083ab834be_333322_1024x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2_hua905188e55056a5721dc7f083ab834be_333322_1024x0_resize_box_3.png" new file mode 100644 index 0000000..3cd2e45 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2_hua905188e55056a5721dc7f083ab834be_333322_1024x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2_hua905188e55056a5721dc7f083ab834be_333322_480x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2_hua905188e55056a5721dc7f083ab834be_333322_480x0_resize_box_3.png" new file mode 100644 index 0000000..226b6a8 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/2_hua905188e55056a5721dc7f083ab834be_333322_480x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3.png" new file mode 100644 index 0000000..cc5b0c7 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_1024x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_1024x0_resize_box_3.png" new file mode 100644 index 0000000..0354c72 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_1024x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_480x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_480x0_resize_box_3.png" new file mode 100644 index 0000000..77f7cf2 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_480x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4.png" new file mode 100644 index 0000000..61281ab Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_1024x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_1024x0_resize_box_3.png" new file mode 100644 index 0000000..df2db5e Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_1024x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_480x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_480x0_resize_box_3.png" new file mode 100644 index 0000000..7d74871 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_480x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5.png" new file mode 100644 index 0000000..10dce39 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_1024x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_1024x0_resize_box_3.png" new file mode 100644 index 0000000..2b538bc Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_1024x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_480x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_480x0_resize_box_3.png" new file mode 100644 index 0000000..d6b8660 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_480x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6.png" new file mode 100644 index 0000000..effc7ce Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6_hue53346c7329f389c465a982e81764bfd_68636_1024x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6_hue53346c7329f389c465a982e81764bfd_68636_1024x0_resize_box_3.png" new file mode 100644 index 0000000..3975632 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6_hue53346c7329f389c465a982e81764bfd_68636_1024x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6_hue53346c7329f389c465a982e81764bfd_68636_480x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6_hue53346c7329f389c465a982e81764bfd_68636_480x0_resize_box_3.png" new file mode 100644 index 0000000..148f4c9 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/6_hue53346c7329f389c465a982e81764bfd_68636_480x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7.png" new file mode 100644 index 0000000..8e7c5c6 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_1024x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_1024x0_resize_box_3.png" new file mode 100644 index 0000000..b619a46 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_1024x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_480x0_resize_box_3.png" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_480x0_resize_box_3.png" new file mode 100644 index 0000000..f2cf860 Binary files /dev/null and "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_480x0_resize_box_3.png" differ diff --git "a/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/index.html" "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/index.html" new file mode 100644 index 0000000..0181eec --- /dev/null +++ "b/p/\351\245\245\350\215\222\350\201\224\346\234\272\347\211\210\344\270\216\345\244\232\345\261\202\344\270\226\347\225\214/index.html" @@ -0,0 +1,230 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="此文全程处于linux环境,阅读此文需具备一些linux使用经验。 解决饥荒卡顿有两个方法,如果你是单人联机玩家,可以添加长路独行模组,开启后"><title>饥荒联机版与多层世界</title> +<link rel=canonical href=https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="饥荒联机版与多层世界"><meta property="og:description" content="此文全程处于linux环境,阅读此文需具备一些linux使用经验。 解决饥荒卡顿有两个方法,如果你是单人联机玩家,可以添加长路独行模组,开启后"><meta property="og:url" content="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Post"><meta property="article:published_time" content="2023-06-09T00:00:00+00:00"><meta property="article:modified_time" content="2023-06-09T00:00:00+00:00"><meta property="og:image" content="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png"><meta name=twitter:title content="饥荒联机版与多层世界"><meta name=twitter:description content="此文全程处于linux环境,阅读此文需具备一些linux使用经验。 解决饥荒卡顿有两个方法,如果你是单人联机玩家,可以添加长路独行模组,开启后"><meta name=twitter:card content="summary_large_image"><meta name=twitter:image content="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">目录</h2><div class=widget--toc><nav id=TableOfContents><ol><li><a href=#饥荒存档的构成>饥荒存档的构成</a></li><li><a href=#在本地运行专用服务器>在本地运行专用服务器</a><ol><li><a href=#准备存档文件>准备存档文件</a></li><li><a href=#准备专用服务器和模组>准备专用服务器和模组</a></li><li><a href=#启动专用服务器>启动专用服务器</a></li></ol></li><li><a href=#在云服务器运行专用服务器>在云服务器运行专用服务器</a></li><li><a href=#多层世界>多层世界</a></li><li><a href=#常见问题>常见问题</a><ol><li><a href=#connecting-anonymously-to-steam-public-retry-retry>Connecting anonymously to Steam Public…: Retry Retry</a></li><li><a href=#服务器启动失败-cluster_tokentxt-do-not-exist>服务器启动失败: cluster_token.txt do not exist</a></li><li><a href=#服务器启动失败-libcurl-gnultsso4>服务器启动失败: libcurl-gnults.so.4</a></li><li><a href=#全部模组没有添加成功>全部模组没有添加成功</a></li><li><a href=#部分模组没有添加成功>部分模组没有添加成功</a></li><li><a href=#游戏大厅内无法搜索到世界>游戏大厅内无法搜索到世界</a></li></ol></li></ol></nav></div></section></aside><main class="main full-width"><article class="has-image main-article"><header class=article-header><div class=article-image><a href=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_800x0_resize_box_3.png srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_800x0_resize_box_3.png 800w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_1600x0_resize_box_3.png 1600w" width=800 height=575 loading=lazy alt="Featured image of post 饥荒联机版与多层世界"></a></div><div class=article-details><header class=article-category><a href=/categories/dontstarve/ style=background-color:#2a9d8f;color:#fff>饥荒</a></header><div class=article-title-wrapper><h2 class=article-title><a href=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/>饥荒联机版与多层世界</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-06-09</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 8 分钟</time></div></footer></div></header><section class=article-content><blockquote><p>此文全程处于<code>linux</code>环境,阅读此文需具备一些<code>linux</code>使用经验。</p></blockquote><p>解决饥荒卡顿有两个方法,如果你是单人联机玩家,可以添加<a class=link href="https://steamcommunity.com/sharedfiles/filedetails/?id=2657513551" target=_blank rel=noopener>长路独行</a>模组,开启后就可以获得与单机版相同的游戏体验,此模组的原理的注意事项可以<a class=link href=https://dont-starve-mod.github.io/zh/dsa_index/ target=_blank rel=noopener>点此查看</a>。 +对于联机玩家,可以搭建专用服务器优化卡顿。饥荒联机版专用服务器 (Don’t Starve Together Dedicated Server) 是由 klei 官方提供的一个工具,购买饥荒联机版后,在<code>Steam</code>的<code>库</code>页面勾选<code>TOOLS</code>后就可以看到了。 +专用服务器可以在云服务器或PC上运行。如果你的电脑配置还可以,并且不要求服务器全天运行,完全可以在自己电脑上搭建专用服务器。 +运行专用服务器每个世界大约需要<code>1G</code>内存,同时运行游戏本身也需要内存,因此内存最好在<code>8G</code>以上。如图1所示,第一个进程是游戏本身,占用了<code>1.2G</code>的内存,第二个进程是专用服务器,占用了<code>995M</code>左右的内存。</p><p><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3.png width=781 height=117 srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_480x0_resize_box_3.png 480w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_1024x0_resize_box_3.png 1024w" loading=lazy alt=图1 class=gallery-image data-flex-grow=667 data-flex-basis=1602px></p><h2 id=饥荒存档的构成>饥荒存档的构成</h2><blockquote><p>使用游戏本身创建的存档最多可以有一个森林和一个洞穴。但是饥荒专用服务器支持一个存档内包含任意多个森林和洞穴。</p></blockquote><p>专用服务器的运行单位是一个世界,而不是一个存档。比如说,一个存档中包括2个森林和2个洞穴,那么就需要启动4个专用服务器的进程实例。当然,你也可以不运行全部的世界,如果你不打算去某个世界,完全可以不启动它。这些进程通过网络通信,由于这种灵活的方式,你完全可以将一个存档中的不同的世界运行在不同的电脑上 (当然一般不需要这么做,除非你的世界太大了以至于一台电脑运行起来吃力)。</p><p>唯一的限制是,每个存档必须有且仅有一个主世界 (Master Shard),所有其他的世界都需要绑定到主世界。为了区分,每个世界都有一个唯一的<code>id</code>,通过给洞穴入口或洞穴出口绑定不同的<code>id</code>,玩家可以通过在多个世界之间穿越。旺达的溯源表也绑定了世界的<code>id</code>,因此可以穿越到不同的世界。如图2所示,这是一个拥有两个森林和两个洞穴的世界。其中一个森林是主世界,箭头代表可以通过洞穴入口或洞穴出口进出另一个世界。</p><p><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png width=4572 height=3284 srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_480x0_resize_box_3.png 480w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_1024x0_resize_box_3.png 1024w" loading=lazy alt=图2 class=gallery-image data-flex-grow=139 data-flex-basis=334px></p><p>这个世界对应的存档结构如下:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span><span class=lnt>4 +</span><span class=lnt>5 +</span><span class=lnt>6 +</span><span class=lnt>7 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>. +</span></span><span class=line><span class=cl>├── <span class=o>[</span>drwxr-xr-x<span class=o>]</span> Master +</span></span><span class=line><span class=cl>├── <span class=o>[</span>drwxr-xr-x<span class=o>]</span> Cave1 +</span></span><span class=line><span class=cl>├── <span class=o>[</span>drwxr-xr-x<span class=o>]</span> Cave2 +</span></span><span class=line><span class=cl>├── <span class=o>[</span>drwxr-xr-x<span class=o>]</span> Forest1 +</span></span><span class=line><span class=cl>├── <span class=o>[</span>-rw-r--r--<span class=o>]</span> cluster.ini +</span></span><span class=line><span class=cl>└── <span class=o>[</span>-rw-r--r--<span class=o>]</span> cluster_token.txt +</span></span></code></pre></td></tr></table></div></div><p>可以看出,每个世界都对应一个文件夹。此外,<code>cluster.ini</code>存放了世界的一些参数设置,<code>cluster_token.txt</code>里存放了用户的身份令牌 (身份令牌的获取参见下一章)。这些就是一个 存档的完整内容。 +也可以查看<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录。如果你在本地创建了存档,那么这个目录下就会有以<code>Cluster_X</code>格式命名的文件夹,其中<code>X</code>是此存档在游戏中显示的位置。如图3所示,我创建了一个存档,那么此文件夹中就有一个<code>Cluster_1</code>。</p><p><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2.png width=1336 height=584 srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_480x0_resize_box_3.png 480w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_1024x0_resize_box_3.png 1024w" loading=lazy alt=图3 class=gallery-image data-flex-grow=228 data-flex-basis=549px></p><p>查看目录结构,可以看出我只添加了一个主世界,没有添加洞穴。只有在专用服务器上运行的存档才需要<code>cluster_token.txt</code>,因此这里没有。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span><span class=lnt>4 +</span><span class=lnt>5 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-fallback data-lang=fallback><span class=line><span class=cl> +</span></span><span class=line><span class=cl>```bash +</span></span><span class=line><span class=cl>Cluster_1 +</span></span><span class=line><span class=cl>├── Master +</span></span><span class=line><span class=cl>└── cluster.ini +</span></span></code></pre></td></tr></table></div></div><h2 id=在本地运行专用服务器>在本地运行专用服务器</h2><h3 id=准备存档文件>准备存档文件</h3><p>在游戏中创建存档,添加好要启用的模组并设置好世界的参数后生成世界。等待世界生成,进入选人物的步骤后,断开连接。</p><blockquote><p>一定要添加洞穴,否则存档无法在专用服务器中运行。</p></blockquote><p>进入<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录,将刚刚创建的存档<code>Cluster_X</code>(<code>X</code>是此存档在游戏中显示的位置)移动到<code>~/.klei/DontStarveTogether/</code>中。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=nb>cd</span> ~/.klei/DontStarveTogether/<span class=nv>$SteamUserID</span>/ +</span></span><span class=line><span class=cl>mv Cluster_X .. +</span></span></code></pre></td></tr></table></div></div><p>使用浏览器打开<a class=link href=https://accounts.klei.com/login target=_blank rel=noopener>Klei Account</a>,登录自己的<code>Klei</code>账号,可以使用<code>Steam</code>登录。登录成功后进入如下页面。</p><p><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4.png width=1904 height=964 srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_480x0_resize_box_3.png 480w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_1024x0_resize_box_3.png 1024w" loading=lazy alt=图4 class=gallery-image data-flex-grow=197 data-flex-basis=474px></p><p>点击导航栏中的<code>游戏</code>,在游戏列表中点击<code>《饥荒:联机版》的游戏服务器</code>,如下图所示。</p><p><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5.png width=1365 height=843 srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_480x0_resize_box_3.png 480w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_1024x0_resize_box_3.png 1024w" loading=lazy alt=图5 class=gallery-image data-flex-grow=161 data-flex-basis=388px></p><p>随便起一个名字,点击<code>添加新服务器</code>,然后复制生成的以<code>pds-g^</code>开头的代码,如下图所示。</p><p><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6.png width=1320 height=565 srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_480x0_resize_box_3.png 480w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_1024x0_resize_box_3.png 1024w" loading=lazy alt=图6 class=gallery-image data-flex-grow=233 data-flex-basis=560px></p><p>在<code>~/.klei/DontStarveTogether/Cluster_X</code>中创建<code>cluster_token.txt</code>文件,内容为刚刚复制的代码。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=nb>echo</span> <span class=s2>"pds-g^..."</span> > cluster_token.txt +</span></span></code></pre></td></tr></table></div></div><p>至此,存档文件就准备好了。</p><h3 id=准备专用服务器和模组>准备专用服务器和模组</h3><p>在<code>Steam</code>中安装<code>Don't Starve Together Dedicated Server</code>,进入安装目录 (安装目录可以在<code>Steam</code>的游戏设置中找到)。 +如果你的存档添加了模组,则需要修改<code>mods</code>文件夹下的<code>dedicated_server_mods_setup.lua</code>文件。专用服务器启动时,会根据这个文件的内容自动更新模组,如果你只在存档中添加了模组但是没有修改这个文件,则模组会添加失败。将需要添加的模组的<code>id</code>以如下这种格式添加到此文件中即可。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-lua data-lang=lua><span class=line><span class=cl><span class=n>ServerModSetup</span><span class=p>(</span><span class=s2>"1438233888"</span><span class=p>)</span> <span class=c1>--多层世界选择器</span> +</span></span><span class=line><span class=cl><span class=n>ServerModSetup</span><span class=p>(</span><span class=s2>"1418746242"</span><span class=p>)</span> <span class=c1>--汉化增强 Chinese++</span> +</span></span><span class=line><span class=cl><span class=n>ServerModSetup</span><span class=p>(</span><span class=s2>"666155465"</span><span class=p>)</span> <span class=c1>--show me</span> +</span></span></code></pre></td></tr></table></div></div><p>模组的<code>id</code>可以通过<code>Steam</code>创意工坊中的链接查看。在<code>Steam</code>中模组的详情页面右击空白处,选择<code>Copy Page URL</code>。链接末尾的<code>?id=</code>后接的就是它的<code>id</code>。例如<code>Show Me</code>的创意工坊链接为<code>https://steamcommunity.com/sharedfiles/filedetails/?id=666155465</code>,其<code>id</code>为<code>666155465</code>。 +除了这种方式,还可以查看此存档中主世界目录中的<code>modoverrides.lua</code>文件,这个文件保存了当前世界启用的模组的设置。格式如下所示,其中<code>workshop-</code>后接的数字就是模组的<code>id</code>。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span><span class=lnt>4 +</span><span class=lnt>5 +</span><span class=lnt>6 +</span><span class=lnt>7 +</span><span class=lnt>8 +</span><span class=lnt>9 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-lua data-lang=lua><span class=line><span class=cl><span class=kr>return</span><span class=p>{</span> +</span></span><span class=line><span class=cl> <span class=p>[</span><span class=s2>"workshop-1418746242"</span><span class=p>]</span><span class=o>=</span><span class=p>{</span> +</span></span><span class=line><span class=cl> <span class=p>[</span><span class=s2>"configuration_options"</span><span class=p>]</span><span class=o>=</span><span class=p>{</span> <span class=p>[</span><span class=s2>"clearfont"</span><span class=p>]</span><span class=o>=</span><span class=kc>true</span><span class=err>,</span> +</span></span><span class=line><span class=cl> <span class=p>[</span><span class=s2>"eventplus"</span><span class=p>]</span><span class=o>=</span><span class=kc>true</span><span class=err>,</span> +</span></span><span class=line><span class=cl> <span class=p>[</span><span class=s2>"extratrans"</span><span class=p>]</span><span class=o>=</span><span class=kc>true</span> +</span></span><span class=line><span class=cl> <span class=p>},</span> +</span></span><span class=line><span class=cl> <span class=p>[</span><span class=s2>"enabled"</span><span class=p>]</span><span class=o>=</span><span class=kc>true</span> +</span></span><span class=line><span class=cl> <span class=p>}</span> +</span></span><span class=line><span class=cl><span class=p>}</span> +</span></span></code></pre></td></tr></table></div></div><p>如下命令会根据<code>modoverrides.lua</code>文件自动生成<code>dedicated_server_mods_setup.lua</code>文件。<code>cd</code>到<code>modoverrides.lua</code>所在目录中执行如下命令,然后将生成的文件复制到<code>专用服务器安装目录/mods</code>文件夹覆盖原有文件即可。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>cat ./modoverrides.lua <span class=p>|</span> grep -E <span class=s1>'\["workshop-[0-9]+"\].*'</span> <span class=p>|</span> sed -r <span class=s1>'s/\["workshop-([0-9]+)"\].*/ServerModSetup("\1")/g'</span> > dedicated_server_mods_setup.lua +</span></span></code></pre></td></tr></table></div></div><h3 id=启动专用服务器>启动专用服务器</h3><p><code>cd</code>到安装目录中的<code>bin64</code>文件夹,执行</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class=s2>"Cluster_X"</span> -monitor_parent_process <span class=nv>$$</span> -shard Caves <span class=p>&</span> +</span></span><span class=line><span class=cl>./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class=s2>"Cluster_X"</span> -monitor_parent_process <span class=nv>$$</span> -shard Master +</span></span></code></pre></td></tr></table></div></div><p><code>-console</code>指定在游戏中启用控制台。 +<code>-cluster</code>指定存档的名字,这个名字和要运行的存档文件夹名对应。 +<code>-shard</code>指定世界碎片的名字。同样,这个名字也要和世界碎片的文件夹名对应。</p><blockquote><p>在<code>cluster.ini</code>中也可以指定一个名称,这个名称是在游戏中玩家看的世界名称。而<code>-cluster</code>指定的只是文件夹的名称,在游戏中是看不到的。</p></blockquote><h2 id=在云服务器运行专用服务器>在云服务器运行专用服务器</h2><p>购买阿里云或腾讯云提供的云服务器,配置选择<code>1核2G</code>或者<code>2核4G</code>即可。安装<code>Debian</code>或<code>Ubuntu</code>操作系统,在安全组中开放<code>10888-10999</code>端口。此处以<code>Debian</code>为例。</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt> 1 +</span><span class=lnt> 2 +</span><span class=lnt> 3 +</span><span class=lnt> 4 +</span><span class=lnt> 5 +</span><span class=lnt> 6 +</span><span class=lnt> 7 +</span><span class=lnt> 8 +</span><span class=lnt> 9 +</span><span class=lnt>10 +</span><span class=lnt>11 +</span><span class=lnt>12 +</span><span class=lnt>13 +</span><span class=lnt>14 +</span><span class=lnt>15 +</span><span class=lnt>16 +</span><span class=lnt>17 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl> _,met<span class=nv>$$$$$gg</span>. momo@debian +</span></span><span class=line><span class=cl> ,g<span class=nv>$$$$$$$$$$$$$$$P</span>. ----------- +</span></span><span class=line><span class=cl> ,g<span class=nv>$$</span>P<span class=s2>" """</span>Y<span class=nv>$$</span>.<span class=s2>". OS: Debian GNU/Linux 11 (bullseye) x86_64 +</span></span></span><span class=line><span class=cl><span class=s2> ,</span><span class=nv>$$</span><span class=s2>P' `</span><span class=nv>$$</span>$<span class=s2>. Host: VirtualBox 1.2 +</span></span></span><span class=line><span class=cl><span class=s2>',</span><span class=nv>$$</span><span class=s2>P ,ggs. `</span><span class=nv>$$</span><span class=s2>b: Kernel: 5.10.0-23-amd64 +</span></span></span><span class=line><span class=cl><span class=s2>`d</span><span class=nv>$$</span><span class=s2>' ,</span><span class=nv>$P</span><span class=s2>"</span><span class=s1>' . $$$ Uptime: 1 min +</span></span></span><span class=line><span class=cl><span class=s1> $$P d$'</span> , <span class=nv>$$</span>P Packages: <span class=m>444</span> <span class=o>(</span>dpkg<span class=o>)</span> +</span></span><span class=line><span class=cl> <span class=nv>$$</span>: <span class=nv>$$</span>. - ,d<span class=nv>$$</span><span class=s1>' Shell: bash 5.1.4 +</span></span></span><span class=line><span class=cl><span class=s1> $$; Y$b._ _,d$P'</span> Resolution: preferred +</span></span><span class=line><span class=cl> Y<span class=nv>$$</span>. <span class=sb>`</span>.<span class=sb>`</span><span class=s2>"Y</span><span class=nv>$$$$</span><span class=s2>P"</span><span class=err>'</span> Terminal: /dev/pts/0 +</span></span><span class=line><span class=cl> <span class=sb>`</span><span class=nv>$$</span>b <span class=s2>"-.__ CPU: Intel i5-7300HQ (2) @ 2.496GHz +</span></span></span><span class=line><span class=cl><span class=s2> `Y</span><span class=nv>$$</span><span class=s2> GPU: 00:02.0 VMware SVGA II Adapter +</span></span></span><span class=line><span class=cl><span class=s2> `Y</span><span class=nv>$$</span><span class=s2>. Memory: 78MiB / 3919MiB +</span></span></span><span class=line><span class=cl><span class=s2> `</span><span class=nv>$$</span><span class=s2>b. +</span></span></span><span class=line><span class=cl><span class=s2> `Y</span><span class=nv>$$</span><span class=s2>b. +</span></span></span><span class=line><span class=cl><span class=s2> `"</span>Y<span class=nv>$b</span>._ +</span></span><span class=line><span class=cl> <span class=sb>`</span><span class=s2>""" +</span></span></span></code></pre></td></tr></table></div></div><ul><li>添加<code>32</code>位支持</li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>sudo dpkg --add-architecture i386 +</span></span><span class=line><span class=cl>sudo apt update <span class=o>&&</span> sudo apt upgrade -y +</span></span></code></pre></td></tr></table></div></div><ul><li>安装依赖</li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>sudo apt install libstdc++6:i386 libgcc1:i386 libcurl4-gnutls-dev:i386 -y +</span></span></code></pre></td></tr></table></div></div><ul><li>安装<code>SteamCMD</code></li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span><span class=lnt>4 +</span><span class=lnt>5 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=c1># 这一步的速度视网络环境而定</span> +</span></span><span class=line><span class=cl>mkdir -p ~/steamcmd/ +</span></span><span class=line><span class=cl><span class=nb>cd</span> ~/steamcmd/ +</span></span><span class=line><span class=cl>wget <span class=s2>"https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz"</span> +</span></span><span class=line><span class=cl>tar -xvzf steamcmd_linux.tar.gz +</span></span></code></pre></td></tr></table></div></div><ul><li>准备存档文件 +这一步骤与上一章中的相同,可以在本地生成存档文件夹,然后上传到服务器。</li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span><span class=lnt>2 +</span><span class=lnt>3 +</span><span class=lnt>4 +</span><span class=lnt>5 +</span><span class=lnt>6 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=c1># 在服务器</span> +</span></span><span class=line><span class=cl>mkdir -p ~/.klei/DoNotStarveTogether +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl><span class=c1># 在本地</span> +</span></span><span class=line><span class=cl><span class=nb>cd</span> ~/.klei/DoNotStarveTogether +</span></span><span class=line><span class=cl>scp -r ./Cluster_X username@xxx.xxx.xxx.xxx:~/.klei/DoNotStarveTogether/ +</span></span></code></pre></td></tr></table></div></div><ul><li>将以下内容写入<code>run_server.sh</code>文件并赋予其执行权限。</li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt> 1 +</span><span class=lnt> 2 +</span><span class=lnt> 3 +</span><span class=lnt> 4 +</span><span class=lnt> 5 +</span><span class=lnt> 6 +</span><span class=lnt> 7 +</span><span class=lnt> 8 +</span><span class=lnt> 9 +</span><span class=lnt>10 +</span><span class=lnt>11 +</span><span class=lnt>12 +</span><span class=lnt>13 +</span><span class=lnt>14 +</span><span class=lnt>15 +</span><span class=lnt>16 +</span><span class=lnt>17 +</span><span class=lnt>18 +</span><span class=lnt>19 +</span><span class=lnt>20 +</span><span class=lnt>21 +</span><span class=lnt>22 +</span><span class=lnt>23 +</span><span class=lnt>24 +</span><span class=lnt>25 +</span><span class=lnt>26 +</span><span class=lnt>27 +</span><span class=lnt>28 +</span><span class=lnt>29 +</span><span class=lnt>30 +</span><span class=lnt>31 +</span><span class=lnt>32 +</span><span class=lnt>33 +</span><span class=lnt>34 +</span><span class=lnt>35 +</span><span class=lnt>36 +</span><span class=lnt>37 +</span><span class=lnt>38 +</span><span class=lnt>39 +</span><span class=lnt>40 +</span><span class=lnt>41 +</span><span class=lnt>42 +</span><span class=lnt>43 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=cp>#!/bin/bash +</span></span></span><span class=line><span class=cl><span class=cp></span> +</span></span><span class=line><span class=cl><span class=nv>steamcmd_dir</span><span class=o>=</span><span class=s2>"</span><span class=nv>$HOME</span><span class=s2>/steamcmd"</span> +</span></span><span class=line><span class=cl><span class=nv>install_dir</span><span class=o>=</span><span class=s2>"</span><span class=nv>$HOME</span><span class=s2>/dontstarvetogether_dedicated_server"</span> +</span></span><span class=line><span class=cl><span class=nv>cluster_name</span><span class=o>=</span><span class=s2>"</span><span class=nv>$1</span><span class=s2>"</span> +</span></span><span class=line><span class=cl><span class=nv>dontstarve_dir</span><span class=o>=</span><span class=s2>"</span><span class=nv>$HOME</span><span class=s2>/.klei/DoNotStarveTogether"</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl><span class=k>function</span> fail<span class=o>()</span> +</span></span><span class=line><span class=cl><span class=o>{</span> +</span></span><span class=line><span class=cl> <span class=nb>echo</span> Error: <span class=s2>"</span><span class=nv>$@</span><span class=s2>"</span> ><span class=p>&</span><span class=m>2</span> +</span></span><span class=line><span class=cl> <span class=nb>exit</span> <span class=m>1</span> +</span></span><span class=line><span class=cl><span class=o>}</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl><span class=k>function</span> check_for_file<span class=o>()</span> +</span></span><span class=line><span class=cl><span class=o>{</span> +</span></span><span class=line><span class=cl> <span class=k>if</span> <span class=o>[</span> ! -e <span class=s2>"</span><span class=nv>$1</span><span class=s2>"</span> <span class=o>]</span><span class=p>;</span> <span class=k>then</span> +</span></span><span class=line><span class=cl> fail <span class=s2>"Missing file: </span><span class=nv>$1</span><span class=s2>"</span> +</span></span><span class=line><span class=cl> <span class=k>fi</span> +</span></span><span class=line><span class=cl><span class=o>}</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl><span class=nb>cd</span> <span class=s2>"</span><span class=nv>$steamcmd_dir</span><span class=s2>"</span> <span class=o>||</span> fail <span class=s2>"Missing </span><span class=nv>$steamcmd_dir</span><span class=s2> directory!"</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl>check_for_file <span class=s2>"steamcmd.sh"</span> +</span></span><span class=line><span class=cl>check_for_file <span class=s2>"</span><span class=nv>$dontstarve_dir</span><span class=s2>/</span><span class=nv>$cluster_name</span><span class=s2>/cluster.ini"</span> +</span></span><span class=line><span class=cl>check_for_file <span class=s2>"</span><span class=nv>$dontstarve_dir</span><span class=s2>/</span><span class=nv>$cluster_name</span><span class=s2>/cluster_token.txt"</span> +</span></span><span class=line><span class=cl>check_for_file <span class=s2>"</span><span class=nv>$dontstarve_dir</span><span class=s2>/</span><span class=nv>$cluster_name</span><span class=s2>/Master/server.ini"</span> +</span></span><span class=line><span class=cl>check_for_file <span class=s2>"</span><span class=nv>$dontstarve_dir</span><span class=s2>/</span><span class=nv>$cluster_name</span><span class=s2>/Caves/server.ini"</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl>./steamcmd.sh +force_install_dir <span class=s2>"</span><span class=nv>$install_dir</span><span class=s2>"</span> +login anonymous +app_update <span class=m>343050</span> validate +quit +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl>check_for_file <span class=s2>"</span><span class=nv>$install_dir</span><span class=s2>/bin64"</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl>cat <span class=s2>"</span><span class=nv>$dontstarve_dir</span><span class=s2>/</span><span class=nv>$cluster_name</span><span class=s2>/Master/modoverrides.lua"</span> <span class=p>|</span> grep -E <span class=s1>'\["workshop-[0-9]+"\].*'</span> <span class=p>|</span> sed -r <span class=s1>'s/\["workshop-([0-9]+)"\].*/ServerModSetup("\1")/g'</span> > <span class=s2>"</span><span class=nv>$install_dir</span><span class=s2>/mods/dedicated_server_mods_setup.lua"</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl><span class=nb>cd</span> <span class=s2>"</span><span class=nv>$install_dir</span><span class=s2>/bin64"</span> <span class=o>||</span> fail +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl><span class=nv>run_shared</span><span class=o>=(</span>./dontstarve_dedicated_server_nullrenderer_x64<span class=o>)</span> +</span></span><span class=line><span class=cl><span class=nv>run_shared</span><span class=o>+=(</span>-console<span class=o>)</span> +</span></span><span class=line><span class=cl><span class=nv>run_shared</span><span class=o>+=(</span>-cluster <span class=s2>"</span><span class=nv>$cluster_name</span><span class=s2>"</span><span class=o>)</span> +</span></span><span class=line><span class=cl><span class=nv>run_shared</span><span class=o>+=(</span>-monitor_parent_process <span class=nv>$$</span><span class=o>)</span> +</span></span><span class=line><span class=cl> +</span></span><span class=line><span class=cl><span class=s2>"</span><span class=si>${</span><span class=nv>run_shared</span><span class=p>[@]</span><span class=si>}</span><span class=s2>"</span> -shard Caves <span class=p>|</span> sed <span class=s1>'s/^/Caves: /'</span> <span class=p>&</span> +</span></span><span class=line><span class=cl><span class=s2>"</span><span class=si>${</span><span class=nv>run_shared</span><span class=p>[@]</span><span class=si>}</span><span class=s2>"</span> -shard Master <span class=p>|</span> sed <span class=s1>'s/^/Master: /'</span> +</span></span></code></pre></td></tr></table></div></div><p>这个脚本是我在<code>Klei</code>官方提供的脚本的基础上优化修改而来。运行时需要提供存档文件夹的名称作为脚本的第一个参数。脚本将会检查存档文件是否完整,使用<code>SteamCMD</code>更新专用服务器并根据存档的模组设置文件<code>modoverrides.lua</code>自动生成<code>dedicated_server_mods_setup.lua</code>文件。</p><ul><li>运行脚本</li></ul><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>./run_server.sh Cluster_X +</span></span></code></pre></td></tr></table></div></div><p>由于第一次运行时要下载专用服务器,速度会比较慢。当终端输出<code>Sim paused</code>时就说明启动完毕,可以在游戏中搜索加入了。</p><blockquote><p>可以使用<code>tmux</code>或<code>screen</code>等工具,这样脚本就可以在后台运行了。</p></blockquote><h2 id=多层世界>多层世界</h2><p>理论上来说,一个存档中可以添加无数个世界。配置多层世界需要修改存档根目录中的<code>cluster.ini</code>和每个世界目录中的<code>server.ini</code>。 +首先看一下的<code>cluster.ini</code>的内容。</p><blockquote><p>TODO 文件内容分析</p></blockquote><p>使用多层世界选择器可以解决给洞穴入口绑定id的麻烦。类似于路由器的工作方式,玩家选择目标世界,由多层世界选择器将玩家送到对应世界,如图7所示。</p><p><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7.png width=5284 height=3284 srcset="/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_480x0_resize_box_3.png 480w, /p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_1024x0_resize_box_3.png 1024w" loading=lazy alt=图7 class=gallery-image data-flex-grow=160 data-flex-basis=386px></p><h2 id=常见问题>常见问题</h2><h3 id=connecting-anonymously-to-steam-public-retry-retry>Connecting anonymously to Steam Public…: Retry Retry</h3><p>无法连接到<code>Steam</code>的服务器,这一般是由于<code>GFW</code>,科学上网即可解决。</p><h3 id=服务器启动失败-cluster_tokentxt-do-not-exist>服务器启动失败: cluster_token.txt do not exist</h3><p>检查<code>cluster_token.txt</code>是否存在,内容是否正确。</p><h3 id=服务器启动失败-libcurl-gnultsso4>服务器启动失败: libcurl-gnults.so.4</h3><p>安装<code>libcurl-gnults</code>。</p><h3 id=全部模组没有添加成功>全部模组没有添加成功</h3><p>查看<code>modoverrides.lua</code>和<code>dedicated_server_mods_setup.lua</code>是否都存在,内容是否正确。</p><h3 id=部分模组没有添加成功>部分模组没有添加成功</h3><p>因为网络原因,有时专用服务器会在下载某些模组时失败。如果运行后发现只有一部分模组,一般重新运行专用服务器即可。</p><h3 id=游戏大厅内无法搜索到世界>游戏大厅内无法搜索到世界</h3><p>可以通过控制台指令<code>c_connect("xxx.xxx.xxx.xxx",10999,"password")</code>加入世界,其中第一个参数是服务器的<code>IP</code>地址,第二个参数是主世界碎片的端口号,第三个参数是世界的密码。</p></section><footer class=article-footer></footer></article><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/page/1/index.html b/page/1/index.html new file mode 100644 index 0000000..18a30c9 --- /dev/null +++ b/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/</title> +<link rel=canonical href=https://chenkeao.github.io/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/"></head></html> \ No newline at end of file diff --git a/page/index.html b/page/index.html new file mode 100644 index 0000000..d11f724 --- /dev/null +++ b/page/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Pages</title> +<link rel=canonical href=https://chenkeao.github.io/page/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Pages"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/page/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Pages"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/page/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title></h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>Pages</h1></div></div></header><aside><h2 class=section-title></h2><div class=subsection-list><div class=article-list--tile><article><a href=/page/tips/><div class=article-details><h2 class=article-title>记录</h2></div></a></article><article><a href=/page/lostnote/><div class=article-details><h2 class=article-title>遗之书</h2></div></a></article></div></div></aside><section class=article-list--compact><article><a href=/%E5%85%B3%E4%BA%8E/><div class=article-details><h2 class=article-title>关于</h2><footer class=article-time><time datetime=0001-01-01T00:00:00Z>0001-01-01</time></footer></div></a></article><article><a href=/archives/><div class=article-details><h2 class=article-title>归档</h2><footer class=article-time><time datetime=0001-01-01T00:00:00Z>0001-01-01</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/page/index.xml b/page/index.xml new file mode 100644 index 0000000..294cd7e --- /dev/null +++ b/page/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pages on 陈默的BLOG</title><link>https://chenkeao.github.io/page/</link><description>Recent content in Pages on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Thu, 04 Jan 2024 17:42:11 +0800</lastBuildDate><atom:link href="https://chenkeao.github.io/page/index.xml" rel="self" type="application/rss+xml"/><item><title>关于</title><link>https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/</guid><description><h3 id="这里有一些代码-散文和照片">这里有一些代码, 散文和照片</h3></description></item><item><title>归档</title><link>https://chenkeao.github.io/archives/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/archives/</guid><description/></item></channel></rss> \ No newline at end of file diff --git a/page/lostnote/index.html b/page/lostnote/index.html new file mode 100644 index 0000000..8850f6a --- /dev/null +++ b/page/lostnote/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>遗之书</title> +<link rel=canonical href=https://chenkeao.github.io/page/lostnote/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="遗之书"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/page/lostnote/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="遗之书"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/page/lostnote/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li class=current><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title>Pages</h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>遗之书</h1></div></div></header><section class=article-list--compact><article><a href=/%E6%97%A5%E8%AE%B0/><div class=article-details><h2 class=article-title>日记</h2><footer class=article-time><time datetime=2023-07-09T00:00:00Z>2023-07-09</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/page/lostnote/index.xml b/page/lostnote/index.xml new file mode 100644 index 0000000..44636fb --- /dev/null +++ b/page/lostnote/index.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>遗之书 on 陈默的BLOG</title><link>https://chenkeao.github.io/page/lostnote/</link><description>Recent content in 遗之书 on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Sun, 09 Jul 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/page/lostnote/index.xml" rel="self" type="application/rss+xml"/><item><title>日记</title><link>https://chenkeao.github.io/%E6%97%A5%E8%AE%B0/</link><pubDate>Sun, 09 Jul 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/%E6%97%A5%E8%AE%B0/</guid><description><p>已经凌晨两点了,我却睡不着。最近总想写点什么,写一些从内容上来说不是遗书,从作用上来说却是遗书的内容。若是意外来临,我骤然离去,也能留下些话给在乎我的人,或者即使没有死去,但不再有从前的意识,也能看着我的外表读读我写的话。</p> +<p>我打算写很多,也打算写给很多人看,没有什么固定的主题,也没有哪句话算作完结,我可能会写到自己的喜好,喜欢的书,喜欢的电影,喜欢的事。或者会写到一些故事,让我印象深刻的故事。又或者一些感受,一些期望,一些牢骚。若是我能长寿,愿我可以写成一本书,只是那时候恐怕已无人愿意为了我翻阅这本书。若你为怀念我来阅读此文,切勿感伤,我希望世界上多一些欢笑,而不是痛苦。至少在现在,我二十三岁的时候,我相信做人最幸福的事情就是从未出生过,苦难如同真空中的以太,幸福则如同一颗新星,昙花一现。这并非悲观,正因为此,我相信人生的意义在于增加世界上的欢乐,让每个人可以尽量幸福的走完一生。在满溢痛苦的世界上制造更多的痛苦是愚蠢的。可理想总是理想,没有人可以只生产欢乐。当我意识到这世界充满不幸的时候,我已经经历了很多,有时候是我自己造成的,有些时候我也是受害者,有时候它就在那里,没有什么人是罪魁祸首,它就在那,在必经之路上等待你,避无可避。</p> +<p>居安思危,每当我心中感到幸福时,都不由的开始担心,因为我知道幸福一定是短暂的,不知道这一次会是 怎么样的走向不幸。每当我看到美景,欣赏之余一定会感到无尽的惋惜,惋惜无论怎么做都无法将其定格。每当从一场恍若隔世的梦中醒来,我总是尝试用文字记录下那片刻所想,可回头再看时就只有平淡的情节,再也无法体会那种感受。以至于有时我会怀疑,是否是睡着时穿越到了另一个平行宇宙?经历了另一种截然不同的可能?那样触手可及又那样遥远无期,像是来自另一个世界的另一个自己。</p> +<p>幸运的是,我还能用文字记录下这个世界中的我的所思所想,写下现在的自己。如果我能有幸一直活着,未来我可以和曾经的自己的对话,如果不能,他人也可以和那个曾经活着的我对话。我想写一篇篇散文,或者是一篇篇日记。如果写得多了,他日可以整理成册;如果写得少了,往后某天看到也是一段回忆。</p></description></item></channel></rss> \ No newline at end of file diff --git a/page/lostnote/page/1/index.html b/page/lostnote/page/1/index.html new file mode 100644 index 0000000..988fd58 --- /dev/null +++ b/page/lostnote/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/page/lostnote/</title> +<link rel=canonical href=https://chenkeao.github.io/page/lostnote/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/page/lostnote/"></head></html> \ No newline at end of file diff --git a/page/page/1/index.html b/page/page/1/index.html new file mode 100644 index 0000000..1427b51 --- /dev/null +++ b/page/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/page/</title> +<link rel=canonical href=https://chenkeao.github.io/page/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/page/"></head></html> \ No newline at end of file diff --git a/page/tips/index.html b/page/tips/index.html new file mode 100644 index 0000000..b6efbc6 --- /dev/null +++ b/page/tips/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>记录</title> +<link rel=canonical href=https://chenkeao.github.io/page/tips/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="记录"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/page/tips/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="记录"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/page/tips/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li class=current><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title>Pages</h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>记录</h1></div></div></header><section class=article-list--compact><article><a href=/kde-global-menu%E4%B8%8Eflatpak/><div class=article-details><h2 class=article-title>KDE Global Menu与Flatpak</h2><footer class=article-time><time datetime=2024-01-04T17:42:11+08:00>2024-01-04</time></footer></div></a></article><article><a href=/linux-zen%E4%B8%8Envidia/><div class=article-details><h2 class=article-title>Linux Zen与Nvidia</h2><footer class=article-time><time datetime=2024-01-01T20:17:04+08:00>2024-01-01</time></footer></div></a></article><article><a href=/wayland-and-anki/><div class=article-details><h2 class=article-title>Wayland与Anki</h2><footer class=article-time><time datetime=2023-12-31T00:00:00Z>2023-12-31</time></footer></div></a></article><article><a href=/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/><div class=article-details><h2 class=article-title>Archlinux设置挂载硬盘时无需输入密码</h2><footer class=article-time><time datetime=2023-06-05T00:00:00Z>2023-06-05</time></footer></div></a></article><article><a href=/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/><div class=article-details><h2 class=article-title>Gwenview加载HEIC格式图片</h2><footer class=article-time><time datetime=2023-06-01T00:00:00Z>2023-06-01</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/page/tips/index.xml b/page/tips/index.xml new file mode 100644 index 0000000..1037f3f --- /dev/null +++ b/page/tips/index.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>记录 on 陈默的BLOG</title><link>https://chenkeao.github.io/page/tips/</link><description>Recent content in 记录 on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Thu, 04 Jan 2024 17:42:11 +0800</lastBuildDate><atom:link href="https://chenkeao.github.io/page/tips/index.xml" rel="self" type="application/rss+xml"/><item><title>KDE Global Menu与Flatpak</title><link>https://chenkeao.github.io/kde-global-menu%E4%B8%8Eflatpak/</link><pubDate>Thu, 04 Jan 2024 17:42:11 +0800</pubDate><guid>https://chenkeao.github.io/kde-global-menu%E4%B8%8Eflatpak/</guid><description><p>从 Flatpak 安装的 Obsidian 不显示全局菜单。执行下列命令后解决:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo flatpak override --talk-name<span class="o">=</span>com.canonical.AppMenu.Regist +</span></span><span class="line"><span class="cl">rar md.obsidian.Obsidian +</span></span></code></pre></td></tr></table> +</div> +</div></description></item><item><title>Linux Zen与Nvidia</title><link>https://chenkeao.github.io/linux-zen%E4%B8%8Envidia/</link><pubDate>Mon, 01 Jan 2024 20:17:04 +0800</pubDate><guid>https://chenkeao.github.io/linux-zen%E4%B8%8Envidia/</guid><description><p><code>prime-run steam</code>命令报错<code>X Error of failed request: BadValue (integer parameter out of range for operation)</code>,原因是内核与<code>nvidia</code>驱动不匹配。按照<code>archwiki</code>的说明,安装<code>linux-zen-headers</code>和<code>nvidia-dkms</code>并添加内核参数<code>CONFIG_DRM_SIMPLEDRM=y</code>后解决。</p></description></item><item><title>Wayland与Anki</title><link>https://chenkeao.github.io/wayland-and-anki/</link><pubDate>Sun, 31 Dec 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/wayland-and-anki/</guid><description><p>为了使用<code>Waydroid</code>不得已换<code>X11</code>为<code>Wayland</code>,随之问题就来了。基于<code>Qt6</code>的<code>Anki</code>似乎与<code>Wayland</code>兼容的不太好,无法在<code>KDE</code>中使用全局菜单,并且<code>Goldendict</code>的<code>Ctrl+c+c</code>粘贴板查词功能在<code>Anki</code>里也无法使用了。 +Google上搜索了一番后发现可以用<code>WAYLAND_DISPLAY=&quot;&quot;</code>环境变量强制<code>Anki</code>使用<code>X11</code>解决。使用后果然没有上述问题了,但是出现了新的问题:<code>fcitx</code>无法在<code>Anki</code>里使用了。略微思考后,我想起来我遵从<code>Wayland</code>的建议删掉了在<code>/etc/environment</code>全局设置的<code>QT_IM_MODULE=fcitx</code>。这个问题官方的建议也提及了,可以单独为<code>Anki</code>设置环境变量,设置后问题果然解决。启动命令:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nv">WAYLAND_DISPLAY</span><span class="o">=</span> <span class="nv">QT_IM_MODULE</span><span class="o">=</span>fcitx Anki +</span></span></code></pre></td></tr></table> +</div> +</div></description></item><item><title>Archlinux设置挂载硬盘时无需输入密码</title><link>https://chenkeao.github.io/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/</link><pubDate>Mon, 05 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/</guid><description><p>在<code>archlinux</code>上使用<code>udisks2</code>挂载硬盘时需要输入密码,挂载位置为<code>/run/media/$USER</code>. 但是在<code>manjaro</code>上挂载时不需要密码,经过一番搜索,发现是<code>udisk2</code>的配置问题.<br> +解决方法是修改<code>/usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy</code>文件,将其中</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;action</span> <span class="na">id=</span><span class="s">&#34;org.freedesktop.udisks2.filesystem-mount-system&#34;</span><span class="nt">&gt;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>标签下的</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;allow_active&gt;</span>auth_admin_keep<span class="nt">&lt;/allow_active&gt;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>修改为</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;allow_active&gt;</span>yes<span class="nt">&lt;/allow_active&gt;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后重启<code>udisk2</code>即可</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl restart udisks2.service +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考: <a class="link" href="https://bbs.archlinuxcn.org/viewtopic.php?id=4582" target="_blank" rel="noopener" +>https://bbs.archlinuxcn.org/viewtopic.php?id=4582</a></p> +</blockquote></description></item><item><title>Gwenview加载HEIC格式图片</title><link>https://chenkeao.github.io/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/</link><pubDate>Thu, 01 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/</guid><description><p><code>Dolphin</code>中无法加载缩略图,也无法打开图片。</p> +<p>安装<code>kimageformats</code>后解决。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S kimageformats +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考 <a class="link" href="https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/" target="_blank" rel="noopener" +>https://www.reddit.com/r/kde/comments/s4bres/heifheic_support_in_dolphingwenview/</a></p> +</blockquote></description></item></channel></rss> \ No newline at end of file diff --git a/page/tips/page/1/index.html b/page/tips/page/1/index.html new file mode 100644 index 0000000..f4a79e3 --- /dev/null +++ b/page/tips/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/page/tips/</title> +<link rel=canonical href=https://chenkeao.github.io/page/tips/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/page/tips/"></head></html> \ No newline at end of file diff --git a/post/index.html b/post/index.html new file mode 100644 index 0000000..ad24f74 --- /dev/null +++ b/post/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Posts</title> +<link rel=canonical href=https://chenkeao.github.io/post/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Posts"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/post/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Posts"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/post/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title></h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>Posts</h1></div></div></header><section class=article-list--compact><article><a href=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/><div class=article-details><h2 class=article-title>饥荒联机版与多层世界</h2><footer class=article-time><time datetime=2023-06-09T00:00:00Z>2023-06-09</time></footer></div><div class=article-image><img src=/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_120x120_fill_box_smart1_3.png width=120 height=120 alt=饥荒联机版与多层世界 loading=lazy></div></a></article><article><a href=/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/><div class=article-details><h2 class=article-title>GNU Parallel的妙用</h2><footer class=article-time><time datetime=2023-06-08T00:00:00Z>2023-06-08</time></footer></div></a></article><article><a href=/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/><div class=article-details><h2 class=article-title>使用Shell批量修改文件后缀, 批量格式转换</h2><footer class=article-time><time datetime=2023-06-06T00:00:00Z>2023-06-06</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/post/index.xml b/post/index.xml new file mode 100644 index 0000000..6c687c6 --- /dev/null +++ b/post/index.xml @@ -0,0 +1,646 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on 陈默的BLOG</title><link>https://chenkeao.github.io/post/</link><description>Recent content in Posts on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Fri, 09 Jun 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/post/index.xml" rel="self" type="application/rss+xml"/><item><title>饥荒联机版与多层世界</title><link>https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/</link><pubDate>Fri, 09 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/</guid><description><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png" alt="Featured image of post 饥荒联机版与多层世界" /><blockquote> +<p>此文全程处于<code>linux</code>环境,阅读此文需具备一些<code>linux</code>使用经验。</p> +</blockquote> +<p>解决饥荒卡顿有两个方法,如果你是单人联机玩家,可以添加<a class="link" href="https://steamcommunity.com/sharedfiles/filedetails/?id=2657513551" target="_blank" rel="noopener" +>长路独行</a>模组,开启后就可以获得与单机版相同的游戏体验,此模组的原理的注意事项可以<a class="link" href="https://dont-starve-mod.github.io/zh/dsa_index/" target="_blank" rel="noopener" +>点此查看</a>。 +对于联机玩家,可以搭建专用服务器优化卡顿。饥荒联机版专用服务器 (Don&rsquo;t Starve Together Dedicated Server) 是由 klei 官方提供的一个工具,购买饥荒联机版后,在<code>Steam</code>的<code>库</code>页面勾选<code>TOOLS</code>后就可以看到了。 +专用服务器可以在云服务器或PC上运行。如果你的电脑配置还可以,并且不要求服务器全天运行,完全可以在自己电脑上搭建专用服务器。 +运行专用服务器每个世界大约需要<code>1G</code>内存,同时运行游戏本身也需要内存,因此内存最好在<code>8G</code>以上。如图1所示,第一个进程是游戏本身,占用了<code>1.2G</code>的内存,第二个进程是专用服务器,占用了<code>995M</code>左右的内存。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3.png" +width="781" +height="117" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/3_hub0fc093e096e20aca2e2c890ea4add1b_22733_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图1" +class="gallery-image" +data-flex-grow="667" +data-flex-basis="1602px" +></p> +<h2 id="饥荒存档的构成">饥荒存档的构成</h2> +<blockquote> +<p>使用游戏本身创建的存档最多可以有一个森林和一个洞穴。但是饥荒专用服务器支持一个存档内包含任意多个森林和洞穴。</p> +</blockquote> +<p>专用服务器的运行单位是一个世界,而不是一个存档。比如说,一个存档中包括2个森林和2个洞穴,那么就需要启动4个专用服务器的进程实例。当然,你也可以不运行全部的世界,如果你不打算去某个世界,完全可以不启动它。这些进程通过网络通信,由于这种灵活的方式,你完全可以将一个存档中的不同的世界运行在不同的电脑上 (当然一般不需要这么做,除非你的世界太大了以至于一台电脑运行起来吃力)。</p> +<p>唯一的限制是,每个存档必须有且仅有一个主世界 (Master Shard),所有其他的世界都需要绑定到主世界。为了区分,每个世界都有一个唯一的<code>id</code>,通过给洞穴入口或洞穴出口绑定不同的<code>id</code>,玩家可以通过在多个世界之间穿越。旺达的溯源表也绑定了世界的<code>id</code>,因此可以穿越到不同的世界。如图2所示,这是一个拥有两个森林和两个洞穴的世界。其中一个森林是主世界,箭头代表可以通过洞穴入口或洞穴出口进出另一个世界。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1.png" +width="4572" +height="3284" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/1_hu129a27db28398330fc918fa0055f3a51_4101404_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图2" +class="gallery-image" +data-flex-grow="139" +data-flex-basis="334px" +></p> +<p>这个世界对应的存档结构如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">. +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Master +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Cave1 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Cave2 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>drwxr-xr-x<span class="o">]</span> Forest1 +</span></span><span class="line"><span class="cl">├── <span class="o">[</span>-rw-r--r--<span class="o">]</span> cluster.ini +</span></span><span class="line"><span class="cl">└── <span class="o">[</span>-rw-r--r--<span class="o">]</span> cluster_token.txt +</span></span></code></pre></td></tr></table> +</div> +</div><p>可以看出,每个世界都对应一个文件夹。此外,<code>cluster.ini</code>存放了世界的一些参数设置,<code>cluster_token.txt</code>里存放了用户的身份令牌 (身份令牌的获取参见下一章)。这些就是一个 存档的完整内容。 +也可以查看<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录。如果你在本地创建了存档,那么这个目录下就会有以<code>Cluster_X</code>格式命名的文件夹,其中<code>X</code>是此存档在游戏中显示的位置。如图3所示,我创建了一个存档,那么此文件夹中就有一个<code>Cluster_1</code>。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2.png" +width="1336" +height="584" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/2_hua905188e55056a5721dc7f083ab834be_333322_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图3" +class="gallery-image" +data-flex-grow="228" +data-flex-basis="549px" +></p> +<p>查看目录结构,可以看出我只添加了一个主世界,没有添加洞穴。只有在专用服务器上运行的存档才需要<code>cluster_token.txt</code>,因此这里没有。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">```bash +</span></span><span class="line"><span class="cl">Cluster_1 +</span></span><span class="line"><span class="cl">├── Master +</span></span><span class="line"><span class="cl">└── cluster.ini +</span></span></code></pre></td></tr></table> +</div> +</div><h2 id="在本地运行专用服务器">在本地运行专用服务器</h2> +<h3 id="准备存档文件">准备存档文件</h3> +<p>在游戏中创建存档,添加好要启用的模组并设置好世界的参数后生成世界。等待世界生成,进入选人物的步骤后,断开连接。</p> +<blockquote> +<p>一定要添加洞穴,否则存档无法在专用服务器中运行。</p> +</blockquote> +<p>进入<code>~/.klei/DontStarveTogether/$SteamUserID/</code>目录,将刚刚创建的存档<code>Cluster_X</code>(<code>X</code>是此存档在游戏中显示的位置)移动到<code>~/.klei/DontStarveTogether/</code>中。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> ~/.klei/DontStarveTogether/<span class="nv">$SteamUserID</span>/ +</span></span><span class="line"><span class="cl">mv Cluster_X .. +</span></span></code></pre></td></tr></table> +</div> +</div><p>使用浏览器打开<a class="link" href="https://accounts.klei.com/login" target="_blank" rel="noopener" +>Klei Account</a>,登录自己的<code>Klei</code>账号,可以使用<code>Steam</code>登录。登录成功后进入如下页面。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4.png" +width="1904" +height="964" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/4_hu6d7f48c7bff81cb748dc4a4b316f3125_585321_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图4" +class="gallery-image" +data-flex-grow="197" +data-flex-basis="474px" +></p> +<p>点击导航栏中的<code>游戏</code>,在游戏列表中点击<code>《饥荒:联机版》的游戏服务器</code>,如下图所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5.png" +width="1365" +height="843" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/5_hu4f0c45e2e0a01f549dcc1512e47803e0_1046886_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图5" +class="gallery-image" +data-flex-grow="161" +data-flex-basis="388px" +></p> +<p>随便起一个名字,点击<code>添加新服务器</code>,然后复制生成的以<code>pds-g^</code>开头的代码,如下图所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6.png" +width="1320" +height="565" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/6_hue53346c7329f389c465a982e81764bfd_68636_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图6" +class="gallery-image" +data-flex-grow="233" +data-flex-basis="560px" +></p> +<p>在<code>~/.klei/DontStarveTogether/Cluster_X</code>中创建<code>cluster_token.txt</code>文件,内容为刚刚复制的代码。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;pds-g^...&#34;</span> &gt; cluster_token.txt +</span></span></code></pre></td></tr></table> +</div> +</div><p>至此,存档文件就准备好了。</p> +<h3 id="准备专用服务器和模组">准备专用服务器和模组</h3> +<p>在<code>Steam</code>中安装<code>Don't Starve Together Dedicated Server</code>,进入安装目录 (安装目录可以在<code>Steam</code>的游戏设置中找到)。 +如果你的存档添加了模组,则需要修改<code>mods</code>文件夹下的<code>dedicated_server_mods_setup.lua</code>文件。专用服务器启动时,会根据这个文件的内容自动更新模组,如果你只在存档中添加了模组但是没有修改这个文件,则模组会添加失败。将需要添加的模组的<code>id</code>以如下这种格式添加到此文件中即可。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;1438233888&#34;</span><span class="p">)</span> <span class="c1">--多层世界选择器</span> +</span></span><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;1418746242&#34;</span><span class="p">)</span> <span class="c1">--汉化增强 Chinese++</span> +</span></span><span class="line"><span class="cl"><span class="n">ServerModSetup</span><span class="p">(</span><span class="s2">&#34;666155465&#34;</span><span class="p">)</span> <span class="c1">--show me</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>模组的<code>id</code>可以通过<code>Steam</code>创意工坊中的链接查看。在<code>Steam</code>中模组的详情页面右击空白处,选择<code>Copy Page URL</code>。链接末尾的<code>?id=</code>后接的就是它的<code>id</code>。例如<code>Show Me</code>的创意工坊链接为<code>https://steamcommunity.com/sharedfiles/filedetails/?id=666155465</code>,其<code>id</code>为<code>666155465</code>。 +除了这种方式,还可以查看此存档中主世界目录中的<code>modoverrides.lua</code>文件,这个文件保存了当前世界启用的模组的设置。格式如下所示,其中<code>workshop-</code>后接的数字就是模组的<code>id</code>。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span><span class="lnt">9 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="cl"><span class="kr">return</span><span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;workshop-1418746242&#34;</span><span class="p">]</span><span class="o">=</span><span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;configuration_options&#34;</span><span class="p">]</span><span class="o">=</span><span class="p">{</span> <span class="p">[</span><span class="s2">&#34;clearfont&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span><span class="err">,</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;eventplus&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span><span class="err">,</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;extratrans&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span> +</span></span><span class="line"><span class="cl"> <span class="p">},</span> +</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">&#34;enabled&#34;</span><span class="p">]</span><span class="o">=</span><span class="kc">true</span> +</span></span><span class="line"><span class="cl"> <span class="p">}</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>如下命令会根据<code>modoverrides.lua</code>文件自动生成<code>dedicated_server_mods_setup.lua</code>文件。<code>cd</code>到<code>modoverrides.lua</code>所在目录中执行如下命令,然后将生成的文件复制到<code>专用服务器安装目录/mods</code>文件夹覆盖原有文件即可。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat ./modoverrides.lua <span class="p">|</span> grep -E <span class="s1">&#39;\[&#34;workshop-[0-9]+&#34;\].*&#39;</span> <span class="p">|</span> sed -r <span class="s1">&#39;s/\[&#34;workshop-([0-9]+)&#34;\].*/ServerModSetup(&#34;\1&#34;)/g&#39;</span> &gt; dedicated_server_mods_setup.lua +</span></span></code></pre></td></tr></table> +</div> +</div><h3 id="启动专用服务器">启动专用服务器</h3> +<p><code>cd</code>到安装目录中的<code>bin64</code>文件夹,执行</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class="s2">&#34;Cluster_X&#34;</span> -monitor_parent_process <span class="nv">$$</span> -shard Caves <span class="p">&amp;</span> +</span></span><span class="line"><span class="cl">./dontstarve_dedicated_server_nullrenderer_x64 -console -cluster <span class="s2">&#34;Cluster_X&#34;</span> -monitor_parent_process <span class="nv">$$</span> -shard Master +</span></span></code></pre></td></tr></table> +</div> +</div><p><code>-console</code>指定在游戏中启用控制台。 +<code>-cluster</code>指定存档的名字,这个名字和要运行的存档文件夹名对应。 +<code>-shard</code>指定世界碎片的名字。同样,这个名字也要和世界碎片的文件夹名对应。</p> +<blockquote> +<p>在<code>cluster.ini</code>中也可以指定一个名称,这个名称是在游戏中玩家看的世界名称。而<code>-cluster</code>指定的只是文件夹的名称,在游戏中是看不到的。</p> +</blockquote> +<h2 id="在云服务器运行专用服务器">在云服务器运行专用服务器</h2> +<p>购买阿里云或腾讯云提供的云服务器,配置选择<code>1核2G</code>或者<code>2核4G</code>即可。安装<code>Debian</code>或<code>Ubuntu</code>操作系统,在安全组中开放<code>10888-10999</code>端口。此处以<code>Debian</code>为例。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"> _,met<span class="nv">$$$$$gg</span>. momo@debian +</span></span><span class="line"><span class="cl"> ,g<span class="nv">$$$$$$$$$$$$$$$P</span>. ----------- +</span></span><span class="line"><span class="cl"> ,g<span class="nv">$$</span>P<span class="s2">&#34; &#34;&#34;&#34;</span>Y<span class="nv">$$</span>.<span class="s2">&#34;. OS: Debian GNU/Linux 11 (bullseye) x86_64 +</span></span></span><span class="line"><span class="cl"><span class="s2"> ,</span><span class="nv">$$</span><span class="s2">P&#39; `</span><span class="nv">$$</span>$<span class="s2">. Host: VirtualBox 1.2 +</span></span></span><span class="line"><span class="cl"><span class="s2">&#39;,</span><span class="nv">$$</span><span class="s2">P ,ggs. `</span><span class="nv">$$</span><span class="s2">b: Kernel: 5.10.0-23-amd64 +</span></span></span><span class="line"><span class="cl"><span class="s2">`d</span><span class="nv">$$</span><span class="s2">&#39; ,</span><span class="nv">$P</span><span class="s2">&#34;</span><span class="s1">&#39; . $$$ Uptime: 1 min +</span></span></span><span class="line"><span class="cl"><span class="s1"> $$P d$&#39;</span> , <span class="nv">$$</span>P Packages: <span class="m">444</span> <span class="o">(</span>dpkg<span class="o">)</span> +</span></span><span class="line"><span class="cl"> <span class="nv">$$</span>: <span class="nv">$$</span>. - ,d<span class="nv">$$</span><span class="s1">&#39; Shell: bash 5.1.4 +</span></span></span><span class="line"><span class="cl"><span class="s1"> $$; Y$b._ _,d$P&#39;</span> Resolution: preferred +</span></span><span class="line"><span class="cl"> Y<span class="nv">$$</span>. <span class="sb">`</span>.<span class="sb">`</span><span class="s2">&#34;Y</span><span class="nv">$$$$</span><span class="s2">P&#34;</span><span class="err">&#39;</span> Terminal: /dev/pts/0 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span><span class="nv">$$</span>b <span class="s2">&#34;-.__ CPU: Intel i5-7300HQ (2) @ 2.496GHz +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2"> GPU: 00:02.0 VMware SVGA II Adapter +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2">. Memory: 78MiB / 3919MiB +</span></span></span><span class="line"><span class="cl"><span class="s2"> `</span><span class="nv">$$</span><span class="s2">b. +</span></span></span><span class="line"><span class="cl"><span class="s2"> `Y</span><span class="nv">$$</span><span class="s2">b. +</span></span></span><span class="line"><span class="cl"><span class="s2"> `&#34;</span>Y<span class="nv">$b</span>._ +</span></span><span class="line"><span class="cl"> <span class="sb">`</span><span class="s2">&#34;&#34;&#34; +</span></span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>添加<code>32</code>位支持</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dpkg --add-architecture i386 +</span></span><span class="line"><span class="cl">sudo apt update <span class="o">&amp;&amp;</span> sudo apt upgrade -y +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>安装依赖</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install libstdc++6:i386 libgcc1:i386 libcurl4-gnutls-dev:i386 -y +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>安装<code>SteamCMD</code></li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 这一步的速度视网络环境而定</span> +</span></span><span class="line"><span class="cl">mkdir -p ~/steamcmd/ +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ~/steamcmd/ +</span></span><span class="line"><span class="cl">wget <span class="s2">&#34;https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz&#34;</span> +</span></span><span class="line"><span class="cl">tar -xvzf steamcmd_linux.tar.gz +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>准备存档文件 +这一步骤与上一章中的相同,可以在本地生成存档文件夹,然后上传到服务器。</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 在服务器</span> +</span></span><span class="line"><span class="cl">mkdir -p ~/.klei/DoNotStarveTogether +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="c1"># 在本地</span> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ~/.klei/DoNotStarveTogether +</span></span><span class="line"><span class="cl">scp -r ./Cluster_X username@xxx.xxx.xxx.xxx:~/.klei/DoNotStarveTogether/ +</span></span></code></pre></td></tr></table> +</div> +</div><ul> +<li>将以下内容写入<code>run_server.sh</code>文件并赋予其执行权限。</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span><span class="lnt">20 +</span><span class="lnt">21 +</span><span class="lnt">22 +</span><span class="lnt">23 +</span><span class="lnt">24 +</span><span class="lnt">25 +</span><span class="lnt">26 +</span><span class="lnt">27 +</span><span class="lnt">28 +</span><span class="lnt">29 +</span><span class="lnt">30 +</span><span class="lnt">31 +</span><span class="lnt">32 +</span><span class="lnt">33 +</span><span class="lnt">34 +</span><span class="lnt">35 +</span><span class="lnt">36 +</span><span class="lnt">37 +</span><span class="lnt">38 +</span><span class="lnt">39 +</span><span class="lnt">40 +</span><span class="lnt">41 +</span><span class="lnt">42 +</span><span class="lnt">43 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/bin/bash +</span></span></span><span class="line"><span class="cl"><span class="cp"></span> +</span></span><span class="line"><span class="cl"><span class="nv">steamcmd_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/steamcmd&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">install_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/dontstarvetogether_dedicated_server&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">cluster_name</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span> +</span></span><span class="line"><span class="cl"><span class="nv">dontstarve_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$HOME</span><span class="s2">/.klei/DoNotStarveTogether&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="k">function</span> fail<span class="o">()</span> +</span></span><span class="line"><span class="cl"><span class="o">{</span> +</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> Error: <span class="s2">&#34;</span><span class="nv">$@</span><span class="s2">&#34;</span> &gt;<span class="p">&amp;</span><span class="m">2</span> +</span></span><span class="line"><span class="cl"> <span class="nb">exit</span> <span class="m">1</span> +</span></span><span class="line"><span class="cl"><span class="o">}</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="k">function</span> check_for_file<span class="o">()</span> +</span></span><span class="line"><span class="cl"><span class="o">{</span> +</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">[</span> ! -e <span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> +</span></span><span class="line"><span class="cl"> fail <span class="s2">&#34;Missing file: </span><span class="nv">$1</span><span class="s2">&#34;</span> +</span></span><span class="line"><span class="cl"> <span class="k">fi</span> +</span></span><span class="line"><span class="cl"><span class="o">}</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="s2">&#34;</span><span class="nv">$steamcmd_dir</span><span class="s2">&#34;</span> <span class="o">||</span> fail <span class="s2">&#34;Missing </span><span class="nv">$steamcmd_dir</span><span class="s2"> directory!&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;steamcmd.sh&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/cluster.ini&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/cluster_token.txt&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Master/server.ini&#34;</span> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Caves/server.ini&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">./steamcmd.sh +force_install_dir <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">&#34;</span> +login anonymous +app_update <span class="m">343050</span> validate +quit +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">check_for_file <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/bin64&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl">cat <span class="s2">&#34;</span><span class="nv">$dontstarve_dir</span><span class="s2">/</span><span class="nv">$cluster_name</span><span class="s2">/Master/modoverrides.lua&#34;</span> <span class="p">|</span> grep -E <span class="s1">&#39;\[&#34;workshop-[0-9]+&#34;\].*&#39;</span> <span class="p">|</span> sed -r <span class="s1">&#39;s/\[&#34;workshop-([0-9]+)&#34;\].*/ServerModSetup(&#34;\1&#34;)/g&#39;</span> &gt; <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/mods/dedicated_server_mods_setup.lua&#34;</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="s2">&#34;</span><span class="nv">$install_dir</span><span class="s2">/bin64&#34;</span> <span class="o">||</span> fail +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">=(</span>./dontstarve_dedicated_server_nullrenderer_x64<span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-console<span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-cluster <span class="s2">&#34;</span><span class="nv">$cluster_name</span><span class="s2">&#34;</span><span class="o">)</span> +</span></span><span class="line"><span class="cl"><span class="nv">run_shared</span><span class="o">+=(</span>-monitor_parent_process <span class="nv">$$</span><span class="o">)</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="s2">&#34;</span><span class="si">${</span><span class="nv">run_shared</span><span class="p">[@]</span><span class="si">}</span><span class="s2">&#34;</span> -shard Caves <span class="p">|</span> sed <span class="s1">&#39;s/^/Caves: /&#39;</span> <span class="p">&amp;</span> +</span></span><span class="line"><span class="cl"><span class="s2">&#34;</span><span class="si">${</span><span class="nv">run_shared</span><span class="p">[@]</span><span class="si">}</span><span class="s2">&#34;</span> -shard Master <span class="p">|</span> sed <span class="s1">&#39;s/^/Master: /&#39;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>这个脚本是我在<code>Klei</code>官方提供的脚本的基础上优化修改而来。运行时需要提供存档文件夹的名称作为脚本的第一个参数。脚本将会检查存档文件是否完整,使用<code>SteamCMD</code>更新专用服务器并根据存档的模组设置文件<code>modoverrides.lua</code>自动生成<code>dedicated_server_mods_setup.lua</code>文件。</p> +<ul> +<li>运行脚本</li> +</ul> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./run_server.sh Cluster_X +</span></span></code></pre></td></tr></table> +</div> +</div><p>由于第一次运行时要下载专用服务器,速度会比较慢。当终端输出<code>Sim paused</code>时就说明启动完毕,可以在游戏中搜索加入了。</p> +<blockquote> +<p>可以使用<code>tmux</code>或<code>screen</code>等工具,这样脚本就可以在后台运行了。</p> +</blockquote> +<h2 id="多层世界">多层世界</h2> +<p>理论上来说,一个存档中可以添加无数个世界。配置多层世界需要修改存档根目录中的<code>cluster.ini</code>和每个世界目录中的<code>server.ini</code>。 +首先看一下的<code>cluster.ini</code>的内容。</p> +<blockquote> +<p>TODO 文件内容分析</p> +</blockquote> +<p>使用多层世界选择器可以解决给洞穴入口绑定id的麻烦。类似于路由器的工作方式,玩家选择目标世界,由多层世界选择器将玩家送到对应世界,如图7所示。</p> +<p><img src="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7.png" +width="5284" +height="3284" +srcset="https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_480x0_resize_box_3.png 480w, https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/7_hub9ddbe05c447590298c2ccb1462200a5_4144239_1024x0_resize_box_3.png 1024w" +loading="lazy" +alt="图7" +class="gallery-image" +data-flex-grow="160" +data-flex-basis="386px" +></p> +<h2 id="常见问题">常见问题</h2> +<h3 id="connecting-anonymously-to-steam-public-retry-retry">Connecting anonymously to Steam Public&hellip;: Retry Retry</h3> +<p>无法连接到<code>Steam</code>的服务器,这一般是由于<code>GFW</code>,科学上网即可解决。</p> +<h3 id="服务器启动失败-cluster_tokentxt-do-not-exist">服务器启动失败: cluster_token.txt do not exist</h3> +<p>检查<code>cluster_token.txt</code>是否存在,内容是否正确。</p> +<h3 id="服务器启动失败-libcurl-gnultsso4">服务器启动失败: libcurl-gnults.so.4</h3> +<p>安装<code>libcurl-gnults</code>。</p> +<h3 id="全部模组没有添加成功">全部模组没有添加成功</h3> +<p>查看<code>modoverrides.lua</code>和<code>dedicated_server_mods_setup.lua</code>是否都存在,内容是否正确。</p> +<h3 id="部分模组没有添加成功">部分模组没有添加成功</h3> +<p>因为网络原因,有时专用服务器会在下载某些模组时失败。如果运行后发现只有一部分模组,一般重新运行专用服务器即可。</p> +<h3 id="游戏大厅内无法搜索到世界">游戏大厅内无法搜索到世界</h3> +<p>可以通过控制台指令<code>c_connect(&quot;xxx.xxx.xxx.xxx&quot;,10999,&quot;password&quot;)</code>加入世界,其中第一个参数是服务器的<code>IP</code>地址,第二个参数是主世界碎片的端口号,第三个参数是世界的密码。</p></description></item><item><title>GNU Parallel的妙用</title><link>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</link><pubDate>Thu, 08 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</guid><description><p><code>Android QQ</code>的图片文件是以下面这种结构保存的,以<code>Cache_</code>开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span><span class="lnt">9 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">├── 0a0 +</span></span><span class="line"><span class="cl">│ ├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">│ └── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">├── 0a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">│ └── Cache_57776dc1e17110a6 +</span></span><span class="line"><span class="cl">└── 0a7 +</span></span><span class="line"><span class="cl"> └── Cache_25d732f84bd7d0a7 +</span></span></code></pre></td></tr></table> +</div> +</div><p>使用<code>GNU Parallel</code>配合<code>mv</code>可以快速的<code>解散</code>每个二级文件夹,变成以下这种结构。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">. +</span></span><span class="line"><span class="cl">├── Cache_25d732f84bd7d0a7 +</span></span><span class="line"><span class="cl">├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">├── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">└── Cache_57776dc1e17110a6 +</span></span></code></pre></td></tr></table> +</div> +</div><p>命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">find . -name <span class="s2">&#34;*&#34;</span> -type f -print <span class="p">|</span> parallel mv <span class="o">{}</span> ./<span class="o">{</span>/<span class="o">}</span> +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考: <a class="link" href="https://www.myfreax.com/gnu-parallel/" target="_blank" rel="noopener" +>https://www.myfreax.com/gnu-parallel/</a></p> +</blockquote></description></item><item><title>使用Shell批量修改文件后缀, 批量格式转换</title><link>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</link><pubDate>Tue, 06 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</guid><description><p><code>shell</code>脚本是处理这类工作最为简单,快捷的方式。</p> +<h2 id="修改后缀">修改后缀</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.原后缀<span class="p">;</span> <span class="k">do</span> mv <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="s2">&#34;`echo </span><span class="nv">$file</span><span class="s2"> | sed s/.原后缀/.新后缀/`&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><h2 id="格式转换">格式转换</h2> +<h3 id="heic转jpg"><code>heic</code>转<code>jpg</code></h3> +<p>首先,安装转换工具。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S libheif +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>heif-convert</code>命令转换。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">heif-convert input.heic output.jpg +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.heic<span class="p">;</span> <span class="k">do</span> heif-convert <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.heic/.jpg</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>此命令的原理是根据当前文件夹下的<code>.heic</code>文件生成<code>.jpg</code>文件,如果成功生成则删除原<code>.heic</code>文件,如果未成功则不会删除原文件。 若未能生成<code>.jpg</code>文件的原因是<code>Input file 'filename.heic' is a JPEG image</code>则可以使用批量修改后缀的方法直接将文件的后缀改为<code>.jpg</code>。</p> +<h3 id="flac转mp3"><code>flac</code>转<code>mp3</code></h3> +<p>首先,安装转换工具:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S ffmpeg +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>ffmpeg</code>命令转换,除了格式转换,<code>ffmpeg</code>还支持很多功能,具体可以查阅<a class="link" href="%22https://ffmpeg.org/documentation.html%22" >文档</a>。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ffmpeg -i <span class="s1">&#39;input.flac&#39;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="s1">&#39;output.mp3&#39;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.flac<span class="p">;</span> <span class="k">do</span> ffmpeg -i <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.flac/.mp3</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>原理同上。</p> +<h3 id="速度优化">速度优化</h3> +<p>使用<code>for</code>循环的方式,所有文件排着队一个一个的被<code>ffmpeg</code>处理。 这种方式固然可以,但效率太低了。 我的运行环境如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"> -<span class="sb">`</span> momo@momo-arch +</span></span><span class="line"><span class="cl"> .o+<span class="sb">`</span> -------------- +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>ooo/ OS: Arch Linux x86_64 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooo: Host: 81AC Lenovo ideapad 720S-15IKB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooooo: Kernel: 6.3.6-arch1-1 +</span></span><span class="line"><span class="cl"> -+oooooo+: Uptime: <span class="m">6</span> hours, <span class="m">59</span> mins +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/:-:++oooo+: Packages: <span class="m">975</span> <span class="o">(</span>pacman<span class="o">)</span>, <span class="m">8</span> <span class="o">(</span>flatpak<span class="o">)</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++/+++++++: Shell: bash 5.1.16 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++++++++++++: Resolution: 1920x1080 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/+++ooooooooooooo/<span class="sb">`</span> DE: Plasma 5.27.5 +</span></span><span class="line"><span class="cl"> ./ooosssso++osssssso+<span class="sb">`</span> WM: kwin +</span></span><span class="line"><span class="cl"> .oossssso-<span class="sb">````</span>/ossssss+<span class="sb">`</span> Theme: <span class="o">[</span>Plasma<span class="o">]</span>, Layan-Light-Solid <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> -osssssso. :ssssssso. Icons: Papirus <span class="o">[</span>Plasma<span class="o">]</span>, Papirus <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> :osssssss/ osssso+++. Terminal: konsole +</span></span><span class="line"><span class="cl"> /ossssssss/ +ssssooo/- CPU: Intel i5-7300HQ <span class="o">(</span>4<span class="o">)</span> @ 3.500GHz +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/ossssso+/:- -:/+osssso+- GPU: Intel HD Graphics <span class="m">630</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+sso+:-<span class="sb">`</span> <span class="sb">`</span>.-/+oso: Memory: 7216MiB / 19554MiB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>++:. <span class="sb">`</span>-/+/ +</span></span><span class="line"><span class="cl"> .<span class="sb">`</span> <span class="sb">`</span>/ +</span></span></code></pre></td></tr></table> +</div> +</div><p>经过测试,处理<code>10</code>个<code>.flac</code>文件所需时间为<code>59</code>秒。 速度慢的原因是单进程串行的处理方式,为了提高速度,可以同时启动多个进程并行处理。</p> +<p>使用终端工具<a class="link" href="%22https://www.gnu.org/software/parallel/sphinx.html%22" >GNU Parallel</a>,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls *.flac <span class="p">|</span> parallel -j4 <span class="s2">&#34;ffmpeg -i {} -ab 320k -map_metadata 0 -id3v2_version 3 {.}.mp3 &amp;&amp; rm {}&#34;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p><code>parallel</code>将从标准输入中读取文件列表,<code>-j</code>指定了并行进程数,<code>{}</code>代表输入文件名,<code>{.}</code>代表没有后缀的输入文件名,其他用法可以<code>man parallel</code>查看。</p> +<p>经过测试,在同样环境下处理同样的<code>.flac</code>文件仅需<code>17</code>秒。</p></description></item></channel></rss> \ No newline at end of file diff --git a/post/page/1/index.html b/post/page/1/index.html new file mode 100644 index 0000000..fb10a30 --- /dev/null +++ b/post/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/post/</title> +<link rel=canonical href=https://chenkeao.github.io/post/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/post/"></head></html> \ No newline at end of file diff --git a/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css b/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css new file mode 100644 index 0000000..d010dcc --- /dev/null +++ b/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css @@ -0,0 +1,10 @@ +/*!* Hugo Theme Stack +* +* @author: Jimmy Cai +* @website: https://jimmycai.com +* @link: https://github.com/CaiJimmy/hugo-theme-stack*/:root{--main-top-padding:35px;--body-background:#f5f5fa;--accent-color:#34495e;--accent-color-darker:#2c3e50;--accent-color-text:#fff;--body-text-color:#707070;--tag-border-radius:4px;--section-separation:40px;--scrollbar-thumb:hsl(0, 0%, 85%);--scrollbar-track:var(--body-background)}@media(min-width:1280px){:root{--main-top-padding:50px}}:root[data-scheme=dark]{--body-background:#303030;--accent-color:#ecf0f1;--accent-color-darker:#bdc3c7;--accent-color-text:#000;--body-text-color:rgba(255, 255, 255, 0.7);--scrollbar-thumb:hsl(0, 0%, 40%);--scrollbar-track:var(--body-background)}:root{--sys-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue";--zh-font-family:"PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei";--base-font-family:"Lato", var(--sys-font-family), var(--zh-font-family), sans-serif;--code-font-family:Menlo, Monaco, Consolas, "Courier New", var(--zh-font-family), monospace}:root{--card-background:#fff;--card-background-selected:#eaeaea;--card-text-color-main:#000;--card-text-color-secondary:#747474;--card-text-color-tertiary:#767676;--card-separator-color:rgba(218, 218, 218, 0.5);--card-border-radius:10px;--card-padding:20px;--small-card-padding:25px 20px}@media(min-width:768px){:root{--card-padding:25px}}@media(min-width:1280px){:root{--card-padding:30px}}@media(min-width:768px){:root{--small-card-padding:25px}}:root[data-scheme=dark]{--card-background:#424242;--card-background-selected:rgba(255, 255, 255, 0.16);--card-text-color-main:rgba(255, 255, 255, 0.9);--card-text-color-secondary:rgba(255, 255, 255, 0.7);--card-text-color-tertiary:rgba(255, 255, 255, 0.5);--card-separator-color:rgba(255, 255, 255, 0.12)}:root{--article-font-family:var(--base-font-family);--article-font-size:1.6rem;--article-line-height:1.85}@media(min-width:768px){:root{--article-font-size:1.7rem}}:root{--blockquote-border-size:4px;--blockquote-background-color:rgb(248 248 248);--heading-border-size:4px;--link-background-color:189, 195, 199;--link-background-opacity:0.5;--link-background-opacity-hover:0.7;--pre-background-color:#272822;--pre-text-color:#f8f8f2;--code-background-color:rgba(0, 0, 0, 0.12);--code-text-color:#808080;--table-border-color:#dadada;--tr-even-background-color:#efefee;--kbd-border-color:#dadada}:root[data-scheme=dark]{--code-background-color:#272822;--code-text-color:rgba(255, 255, 255, 0.9);--table-border-color:#717171;--tr-even-background-color:#545454;--blockquote-background-color:rgb(75 75 75)}:root{--shadow-l1:0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04);--shadow-l2:0px 10px 20px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04);--shadow-l3:0px 10px 20px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04);--shadow-l4:0px 24px 32px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), + 0px 0px 1px rgba(0, 0, 0, 0.04)}[data-scheme=light]{--pre-text-color:#272822;--pre-background-color:#fafafa}[data-scheme=light] .chroma{color:#272822;background-color:#fafafa}[data-scheme=light] .chroma .err{color:#960050}[data-scheme=light] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}[data-scheme=light] .chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:100%;display:block}[data-scheme=light] .chroma .lntable>tbody{display:block;width:100%}[data-scheme=light] .chroma .lntable>tbody>tr{display:flex;width:100%}[data-scheme=light] .chroma .lntable>tbody>tr>td:last-child{overflow-x:auto}[data-scheme=light] .chroma .hl{display:block;width:100%;background-color:#ffc}[data-scheme=light] .chroma .lnt{margin-right:.4em;padding:0 .4em;color:#7f7f7f;display:block}[data-scheme=light] .chroma .ln{margin-right:.4em;padding:0 .4em;color:#7f7f7f}[data-scheme=light] .chroma .k{color:#00a8c8}[data-scheme=light] .chroma .kc{color:#00a8c8}[data-scheme=light] .chroma .kd{color:#00a8c8}[data-scheme=light] .chroma .kn{color:#f92672}[data-scheme=light] .chroma .kp{color:#00a8c8}[data-scheme=light] .chroma .kr{color:#00a8c8}[data-scheme=light] .chroma .kt{color:#00a8c8}[data-scheme=light] .chroma .n{color:#111}[data-scheme=light] .chroma .na{color:#75af00}[data-scheme=light] .chroma .nb{color:#111}[data-scheme=light] .chroma .bp{color:#111}[data-scheme=light] .chroma .nc{color:#75af00}[data-scheme=light] .chroma .no{color:#00a8c8}[data-scheme=light] .chroma .nd{color:#75af00}[data-scheme=light] .chroma .ni{color:#111}[data-scheme=light] .chroma .ne{color:#75af00}[data-scheme=light] .chroma .nf{color:#75af00}[data-scheme=light] .chroma .fm{color:#111}[data-scheme=light] .chroma .nl{color:#111}[data-scheme=light] .chroma .nn{color:#111}[data-scheme=light] .chroma .nx{color:#75af00}[data-scheme=light] .chroma .py{color:#111}[data-scheme=light] .chroma .nt{color:#f92672}[data-scheme=light] .chroma .nv{color:#111}[data-scheme=light] .chroma .vc{color:#111}[data-scheme=light] .chroma .vg{color:#111}[data-scheme=light] .chroma .vi{color:#111}[data-scheme=light] .chroma .vm{color:#111}[data-scheme=light] .chroma .l{color:#ae81ff}[data-scheme=light] .chroma .ld{color:#d88200}[data-scheme=light] .chroma .s{color:#d88200}[data-scheme=light] .chroma .sa{color:#d88200}[data-scheme=light] .chroma .sb{color:#d88200}[data-scheme=light] .chroma .sc{color:#d88200}[data-scheme=light] .chroma .dl{color:#d88200}[data-scheme=light] .chroma .sd{color:#d88200}[data-scheme=light] .chroma .s2{color:#d88200}[data-scheme=light] .chroma .se{color:#ae81ff}[data-scheme=light] .chroma .sh{color:#d88200}[data-scheme=light] .chroma .si{color:#d88200}[data-scheme=light] .chroma .sx{color:#d88200}[data-scheme=light] .chroma .sr{color:#d88200}[data-scheme=light] .chroma .s1{color:#d88200}[data-scheme=light] .chroma .ss{color:#d88200}[data-scheme=light] .chroma .m{color:#ae81ff}[data-scheme=light] .chroma .mb{color:#ae81ff}[data-scheme=light] .chroma .mf{color:#ae81ff}[data-scheme=light] .chroma .mh{color:#ae81ff}[data-scheme=light] .chroma .mi{color:#ae81ff}[data-scheme=light] .chroma .il{color:#ae81ff}[data-scheme=light] .chroma .mo{color:#ae81ff}[data-scheme=light] .chroma .o{color:#f92672}[data-scheme=light] .chroma .ow{color:#f92672}[data-scheme=light] .chroma .p{color:#111}[data-scheme=light] .chroma .c{color:#75715e}[data-scheme=light] .chroma .ch{color:#75715e}[data-scheme=light] .chroma .cm{color:#75715e}[data-scheme=light] .chroma .c1{color:#75715e}[data-scheme=light] .chroma .cs{color:#75715e}[data-scheme=light] .chroma .cp{color:#75715e}[data-scheme=light] .chroma .cpf{color:#75715e}[data-scheme=light] .chroma .gd{color:#f92672}[data-scheme=light] .chroma .ge{font-style:italic}[data-scheme=light] .chroma .gi{color:#75af00}[data-scheme=light] .chroma .gs{font-weight:700}[data-scheme=light] .chroma .gu{color:#75715e}[data-scheme=dark]{--pre-text-color:#f8f8f2;--pre-background-color:#272822}[data-scheme=dark] .chroma{color:#f8f8f2;background-color:#272822}[data-scheme=dark] .chroma .err{color:#bb0064}[data-scheme=dark] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}[data-scheme=dark] .chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:100%;display:block}[data-scheme=dark] .chroma .lntable>tbody{display:block;width:100%}[data-scheme=dark] .chroma .lntable>tbody>tr{display:flex;width:100%}[data-scheme=dark] .chroma .lntable>tbody>tr>td:last-child{overflow-x:auto}[data-scheme=dark] .chroma .hl{display:block;width:100%;background-color:#ffc}[data-scheme=dark] .chroma .lnt{margin-right:.4em;padding:0 .4em;color:#7f7f7f;display:block}[data-scheme=dark] .chroma .ln{margin-right:.4em;padding:0 .4em;color:#7f7f7f}[data-scheme=dark] .chroma .k{color:#66d9ef}[data-scheme=dark] .chroma .kc{color:#66d9ef}[data-scheme=dark] .chroma .kd{color:#66d9ef}[data-scheme=dark] .chroma .kn{color:#f92672}[data-scheme=dark] .chroma .kp{color:#66d9ef}[data-scheme=dark] .chroma .kr{color:#66d9ef}[data-scheme=dark] .chroma .kt{color:#66d9ef}[data-scheme=dark] .chroma .n{color:#f8f8f2}[data-scheme=dark] .chroma .na{color:#a6e22e}[data-scheme=dark] .chroma .nb{color:#f8f8f2}[data-scheme=dark] .chroma .bp{color:#f8f8f2}[data-scheme=dark] .chroma .nc{color:#a6e22e}[data-scheme=dark] .chroma .no{color:#66d9ef}[data-scheme=dark] .chroma .nd{color:#a6e22e}[data-scheme=dark] .chroma .ni{color:#f8f8f2}[data-scheme=dark] .chroma .ne{color:#a6e22e}[data-scheme=dark] .chroma .nf{color:#a6e22e}[data-scheme=dark] .chroma .fm{color:#f8f8f2}[data-scheme=dark] .chroma .nl{color:#f8f8f2}[data-scheme=dark] .chroma .nn{color:#f8f8f2}[data-scheme=dark] .chroma .nx{color:#a6e22e}[data-scheme=dark] .chroma .py{color:#f8f8f2}[data-scheme=dark] .chroma .nt{color:#f92672}[data-scheme=dark] .chroma .nv{color:#f8f8f2}[data-scheme=dark] .chroma .vc{color:#f8f8f2}[data-scheme=dark] .chroma .vg{color:#f8f8f2}[data-scheme=dark] .chroma .vi{color:#f8f8f2}[data-scheme=dark] .chroma .vm{color:#f8f8f2}[data-scheme=dark] .chroma .l{color:#ae81ff}[data-scheme=dark] .chroma .ld{color:#e6db74}[data-scheme=dark] .chroma .s{color:#e6db74}[data-scheme=dark] .chroma .sa{color:#e6db74}[data-scheme=dark] .chroma .sb{color:#e6db74}[data-scheme=dark] .chroma .sc{color:#e6db74}[data-scheme=dark] .chroma .dl{color:#e6db74}[data-scheme=dark] .chroma .sd{color:#e6db74}[data-scheme=dark] .chroma .s2{color:#e6db74}[data-scheme=dark] .chroma .se{color:#ae81ff}[data-scheme=dark] .chroma .sh{color:#e6db74}[data-scheme=dark] .chroma .si{color:#e6db74}[data-scheme=dark] .chroma .sx{color:#e6db74}[data-scheme=dark] .chroma .sr{color:#e6db74}[data-scheme=dark] .chroma .s1{color:#e6db74}[data-scheme=dark] .chroma .ss{color:#e6db74}[data-scheme=dark] .chroma .m{color:#ae81ff}[data-scheme=dark] .chroma .mb{color:#ae81ff}[data-scheme=dark] .chroma .mf{color:#ae81ff}[data-scheme=dark] .chroma .mh{color:#ae81ff}[data-scheme=dark] .chroma .mi{color:#ae81ff}[data-scheme=dark] .chroma .il{color:#ae81ff}[data-scheme=dark] .chroma .mo{color:#ae81ff}[data-scheme=dark] .chroma .o{color:#f92672}[data-scheme=dark] .chroma .ow{color:#f92672}[data-scheme=dark] .chroma .p{color:#f8f8f2}[data-scheme=dark] .chroma .c{color:#75715e}[data-scheme=dark] .chroma .ch{color:#75715e}[data-scheme=dark] .chroma .cm{color:#75715e}[data-scheme=dark] .chroma .c1{color:#75715e}[data-scheme=dark] .chroma .cs{color:#75715e}[data-scheme=dark] .chroma .cp{color:#75715e}[data-scheme=dark] .chroma .cpf{color:#75715e}[data-scheme=dark] .chroma .gd{color:#f92672}[data-scheme=dark] .chroma .ge{font-style:italic}[data-scheme=dark] .chroma .gi{color:#a6e22e}[data-scheme=dark] .chroma .gs{font-weight:700}[data-scheme=dark] .chroma .gu{color:#75715e}:root{--menu-icon-separation:40px;--container-padding:15px;--widget-separation:var(--section-separation)}.container{margin-left:auto;margin-right:auto}.container .left-sidebar{order:-3;max-width:var(--left-sidebar-max-width)}.container .right-sidebar{order:-1;max-width:var(--right-sidebar-max-width)}@media(min-width:1024px){.container .right-sidebar{display:flex}}@media(min-width:768px){.container.extended{max-width:1024px;--left-sidebar-max-width:25%;--right-sidebar-max-width:30%}}@media(min-width:1024px){.container.extended{max-width:1280px;--left-sidebar-max-width:20%;--right-sidebar-max-width:30%}}@media(min-width:1280px){.container.extended{max-width:1536px;--left-sidebar-max-width:15%;--right-sidebar-max-width:25%}}@media(min-width:768px){.container.compact{--left-sidebar-max-width:25%;max-width:768px}}@media(min-width:1024px){.container.compact{max-width:1024px;--left-sidebar-max-width:20%}}@media(min-width:1280px){.container.compact{max-width:1280px}}.flex{display:flex;flex-direction:row}.flex.column{flex-direction:column}.flex.on-phone--column{flex-direction:column}@media(min-width:768px){.flex.on-phone--column{flex-direction:unset}}.flex .full-width{width:100%}main.main{order:-2;min-width:0;max-width:100%;flex-grow:1;display:flex;flex-direction:column;gap:var(--section-separation)}@media(min-width:768px){main.main{padding-top:var(--main-top-padding)}}.main-container{min-height:100vh;align-items:flex-start;padding:0 15px;gap:var(--section-separation);padding-top:var(--main-top-padding)}@media(min-width:768px){.main-container{padding:0 20px}}/*!normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}/*!* Hamburgers +* @description Tasty CSS-animated hamburgers +* @author Jonathan Suh @jonsuh +* @site https://jonsuh.com/hamburgers +* @link https://github.com/jonsuh/hamburgers*/.hamburger{padding-top:10px;display:inline-block;cursor:pointer;transition-property:opacity,filter;transition-duration:.15s;transition-timing-function:linear;font:inherit;color:inherit;text-transform:none;background-color:transparent;border:0;margin:0;overflow:visible}.hamburger:hover{opacity:.7}.hamburger.is-active:hover{opacity:.7}.hamburger.is-active .hamburger-inner,.hamburger.is-active .hamburger-inner::before,.hamburger.is-active .hamburger-inner::after{background-color:#000}.hamburger-box{width:30px;height:24px;display:inline-block;position:relative}.hamburger-inner{display:block;top:50%;margin-top:-2px}.hamburger-inner,.hamburger-inner::before,.hamburger-inner::after{width:30px;height:2px;background-color:var(--card-text-color-main);border-radius:4px;position:absolute;transition-property:transform;transition-duration:.15s;transition-timing-function:ease}.hamburger-inner::before,.hamburger-inner::after{content:"";display:block}.hamburger-inner::before{top:-10px}.hamburger-inner::after{bottom:-10px}.hamburger--spin .hamburger-inner{transition-duration:.22s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.hamburger--spin .hamburger-inner::before{transition:top .1s .25s ease-in,opacity .1s ease-in}.hamburger--spin .hamburger-inner::after{transition:bottom .1s .25s ease-in,transform .22s cubic-bezier(.55,.055,.675,.19)}.hamburger--spin.is-active .hamburger-inner{transform:rotate(225deg);transition-delay:.12s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.hamburger--spin.is-active .hamburger-inner::before{top:0;opacity:0;transition:top .1s ease-out,opacity .1s .12s ease-out}.hamburger--spin.is-active .hamburger-inner::after{bottom:0;transform:rotate(-90deg);transition:bottom .1s ease-out,transform .22s .12s cubic-bezier(.215,.61,.355,1)}#toggle-menu{background:0 0;border:none;position:absolute;right:0;top:0;z-index:2;cursor:pointer;outline:none}[dir=rtl] #toggle-menu{left:0;right:auto}@media(min-width:768px){#toggle-menu{display:none}}#toggle-menu.is-active .hamburger-inner,#toggle-menu.is-active .hamburger-inner::before,#toggle-menu.is-active .hamburger-inner::after{background-color:var(--accent-color)}.menu{padding-left:0;list-style:none;flex-direction:column;overflow-y:auto;flex-grow:1;font-size:1.4rem;background-color:var(--card-background);box-shadow:var(--shadow-l1);display:none;margin:0 calc(var(--container-padding) * -1);padding:30px}@media(min-width:1280px){.menu{padding:15px 0}}.menu,.menu .menu-bottom-section{gap:30px}@media(min-width:1280px){.menu,.menu .menu-bottom-section{gap:25px}}.menu.show{display:flex}@media(min-width:768px){.menu{align-items:flex-end;display:flex;background-color:transparent;padding:0;box-shadow:none;margin:0}}.menu li{position:relative;vertical-align:middle;padding:0}@media(min-width:768px){.menu li{width:100%}}.menu li svg{stroke:currentColor;stroke-width:1.33;width:20px;height:20px}.menu li a{height:100%;display:inline-flex;align-items:center;color:var(--body-text-color);gap:var(--menu-icon-separation)}.menu li span{flex:1}.menu li.current a{color:var(--accent-color);font-weight:700}.menu .menu-bottom-section{margin-top:auto;display:flex;flex-direction:column;width:100%}.social-menu{list-style:none;padding:0;margin:0;display:flex;flex-direction:row;gap:10px}.social-menu svg{width:24px;height:24px;stroke:var(--body-text-color);stroke-width:1.33}.article-list{display:flex;flex-direction:column;gap:var(--section-separation)}.article-list article{display:flex;flex-direction:column;background-color:var(--card-background);box-shadow:var(--shadow-l1);border-radius:var(--card-border-radius);overflow:hidden;transition:box-shadow .3s ease}.article-list article:hover{box-shadow:var(--shadow-l2)}.article-list article .article-image img{width:100%;height:150px;object-fit:cover}@media(min-width:768px){.article-list article .article-image img{height:200px}}@media(min-width:1280px){.article-list article .article-image img{height:250px}}.article-list article:nth-child(5n+1) .article-category a{background:#8ea885;color:#fff}.article-list article:nth-child(5n+2) .article-category a{background:#df7988;color:#fff}.article-list article:nth-child(5n+3) .article-category a{background:#0177b8;color:#fff}.article-list article:nth-child(5n+4) .article-category a{background:#ffb900;color:#fff}.article-list article:nth-child(5n+5) .article-category a{background:#6b69d6;color:#fff}.article-details{display:flex;flex-direction:column;justify-content:center;padding:var(--card-padding);gap:15px}.article-title{font-family:var(--article-font-family);font-weight:600;margin:0;color:var(--card-text-color-main);font-size:2.2rem}@media(min-width:1280px){.article-title{font-size:2.4rem}}.article-title a{color:var(--card-text-color-main)}.article-title a:hover{color:var(--card-text-color-main)}.article-subtitle{font-weight:400;color:var(--card-text-color-secondary);line-height:1.5;margin:0;font-size:1.75rem}@media(min-width:1280px){.article-subtitle{font-size:2rem}}.article-title-wrapper{display:flex;flex-direction:column;gap:8px}.article-time,.article-translations{display:flex;color:var(--card-text-color-tertiary);gap:15px}.article-time svg,.article-translations svg{vertical-align:middle;width:20px;height:20px;stroke-width:1.33;flex-shrink:0}.article-time time,.article-time a,.article-translations time,.article-translations a{font-size:1.4rem;color:var(--card-text-color-tertiary)}.article-time>div,.article-translations>div{display:inline-flex;align-items:center;gap:15px}.article-time{flex-wrap:wrap}.article-translations>div{flex-wrap:wrap}.article-category,.article-tags{display:flex;gap:10px}.article-category a,.article-tags a{color:var(--accent-color-text);background-color:var(--accent-color);padding:8px 16px;border-radius:var(--tag-border-radius);display:inline-block;font-size:1.4rem;transition:background-color .5s ease}.article-category a:hover,.article-tags a:hover{color:var(--accent-color-text);background-color:var(--accent-color-darker)}.article-list--compact{border-radius:var(--card-border-radius);box-shadow:var(--shadow-l1);background-color:var(--card-background);--image-size:50px}@media(min-width:768px){.article-list--compact{--image-size:60px}}.article-list--compact article>a{display:flex;align-items:center;padding:var(--small-card-padding);gap:15px}.article-list--compact article:not(:last-of-type){border-bottom:1.5px solid var(--card-separator-color)}.article-list--compact article .article-details{flex-grow:1;padding:0;min-height:var(--image-size);gap:10px}.article-list--compact article .article-title{margin:0;font-size:1.6rem}@media(min-width:768px){.article-list--compact article .article-title{font-size:1.8rem}}.article-list--compact article .article-image img{width:var(--image-size);height:var(--image-size);object-fit:cover}.article-list--compact article .article-time{font-size:1.4rem}.article-list--compact article .article-preview{font-size:1.4rem;color:var(--card-text-color-tertiary);margin-top:10px;line-height:1.5}.article-list--tile article{border-radius:var(--card-border-radius);overflow:hidden;position:relative;height:350px;width:250px;box-shadow:var(--shadow-l1);transition:box-shadow .3s ease;background-color:var(--card-background)}.article-list--tile article:hover{box-shadow:var(--shadow-l2)}.article-list--tile article.has-image .article-details{background-color:rgba(0,0,0,.25)}.article-list--tile article.has-image .article-title{color:#fff}.article-list--tile article .article-image{position:absolute;top:0;left:0;width:100%;height:100%}.article-list--tile article .article-image img{width:100%;height:100%;object-fit:cover}.article-list--tile article .article-details{border-radius:var(--card-border-radius);position:relative;height:100%;width:100%;display:flex;flex-direction:column;justify-content:flex-end;z-index:2;padding:15px}@media(min-width:640px){.article-list--tile article .article-details{padding:20px}}.article-list--tile article .article-title{font-size:2rem;font-weight:500;color:var(--card-text-color-main)}@media(min-width:640px){.article-list--tile article .article-title{font-size:2.2rem}}.widget{display:flex;flex-direction:column}.widget .widget-icon svg{width:32px;height:32px;stroke-width:1.6;color:var(--body-text-color)}.tagCloud .tagCloud-tags{display:flex;flex-wrap:wrap;gap:10px}.tagCloud .tagCloud-tags a{background:var(--card-background);box-shadow:var(--shadow-l1);border-radius:var(--tag-border-radius);padding:8px 20px;color:var(--card-text-color-main);font-size:1.4rem;transition:box-shadow .3s ease}.tagCloud .tagCloud-tags a:hover{box-shadow:var(--shadow-l2)}.widget.archives .widget-archive--list{border-radius:var(--card-border-radius);box-shadow:var(--shadow-l1);background-color:var(--card-background)}.widget.archives .archives-year:not(:last-of-type){border-bottom:1.5px solid var(--card-separator-color)}.widget.archives .archives-year a{font-size:1.4rem;padding:18px 25px;display:flex}.widget.archives .archives-year a span.year{flex:1;color:var(--card-text-color-main);font-weight:700}.widget.archives .archives-year a span.count{color:var(--card-text-color-tertiary)}footer.site-footer{padding:20px 0 var(--section-separation);font-size:1.4rem;line-height:1.75}footer.site-footer:before{content:"";display:block;height:3px;width:50px;background:var(--body-text-color);margin-bottom:20px}footer.site-footer .copyright{color:var(--accent-color);font-weight:700;margin-bottom:5px}footer.site-footer .powerby{color:var(--body-text-color);font-weight:400;font-size:1.2rem}footer.site-footer .powerby a{color:var(--body-text-color)}.pagination{display:flex;background-color:var(--card-background);box-shadow:var(--shadow-l1);border-radius:var(--card-border-radius);overflow:hidden;flex-wrap:wrap}.pagination .page-link{padding:16px 32px;display:inline-flex;color:var(--card-text-color-secondary)}.pagination .page-link.current{font-weight:700;background-color:var(--card-background-selected);color:var(--card-text-color-main)}@media(min-width:768px){.sidebar.sticky{position:sticky}}.left-sidebar{display:flex;flex-direction:column;flex-shrink:0;align-self:stretch;gap:var(--sidebar-element-separation);max-width:none;width:100%;position:relative;--sidebar-avatar-size:100px;--sidebar-element-separation:20px;--emoji-size:40px;--emoji-font-size:20px}@media(min-width:768px){.left-sidebar{width:auto;padding-top:var(--main-top-padding);padding-bottom:var(--main-top-padding);max-height:100vh}}@media(min-width:1536px){.left-sidebar{--sidebar-avatar-size:120px;--sidebar-element-separation:25px;--emoji-size:40px}}.left-sidebar.sticky{top:0}.left-sidebar.compact{--sidebar-avatar-size:80px;--emoji-size:30px;--emoji-font-size:15px}@media(min-width:1024px){.left-sidebar.compact header{flex-direction:row}}.left-sidebar.compact header .site-meta{gap:5px}.left-sidebar.compact header .site-name{font-size:1.4rem}@media(min-width:1536px){.left-sidebar.compact header .site-name{font-size:1.75rem}}.left-sidebar.compact header .site-description{font-size:1.4rem}.right-sidebar{width:100%;display:none;flex-direction:column;gap:var(--widget-separation)}.right-sidebar.sticky{top:0}@media(min-width:1024px){.right-sidebar{padding-top:var(--main-top-padding);padding-bottom:var(--main-top-padding)}}.sidebar header{z-index:1;transition:box-shadow .5s ease;display:flex;flex-direction:column;gap:var(--sidebar-element-separation)}@media(min-width:768px){.sidebar header{padding:0}}.sidebar header .site-avatar{position:relative;margin:0;width:var(--sidebar-avatar-size);height:var(--sidebar-avatar-size);flex-shrink:0}.sidebar header .site-avatar .site-logo{width:100%;height:100%;border-radius:100%;box-shadow:var(--shadow-l1)}.sidebar header .site-avatar .emoji{position:absolute;width:var(--emoji-size);height:var(--emoji-size);line-height:var(--emoji-size);border-radius:100%;bottom:0;right:0;text-align:center;font-size:var(--emoji-font-size);background-color:var(--card-background);box-shadow:var(--shadow-l2)}.sidebar header .site-meta{display:flex;flex-direction:column;gap:10px;justify-content:center}.sidebar header .site-name{color:var(--accent-color);margin:0;font-size:1.6rem}@media(min-width:1536px){.sidebar header .site-name{font-size:1.8rem}}.sidebar header .site-description{color:var(--body-text-color);font-weight:400;margin:0;font-size:1.4rem}@media(min-width:1536px){.sidebar header .site-description{font-size:1.6rem}}[data-scheme=dark] #dark-mode-toggle{color:var(--accent-color);font-weight:700}[data-scheme=dark] #dark-mode-toggle .icon-tabler-toggle-left{display:none}[data-scheme=dark] #dark-mode-toggle .icon-tabler-toggle-right{display:unset}#dark-mode-toggle{margin-top:auto;color:var(--body-text-color);display:flex;align-items:center;cursor:pointer;gap:var(--menu-icon-separation)}#dark-mode-toggle .icon-tabler-toggle-right{display:none}#i18n-switch{color:var(--body-text-color);display:inline-flex;align-content:center;gap:var(--menu-icon-separation)}#i18n-switch select{border:0;background-color:transparent;color:var(--body-text-color)}#i18n-switch select option{color:var(--card-text-color-main);background-color:var(--card-background)}html{font-size:62.5%;overflow-y:scroll}*{box-sizing:border-box}body{background:var(--body-background);margin:0;font-family:var(--base-font-family);font-size:1.6rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb)transparent}::-webkit-scrollbar{height:auto}::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb)}::-webkit-scrollbar-track{background-color:transparent}.article-page.hide-sidebar-sm .left-sidebar{display:none}@media(min-width:768px){.article-page.hide-sidebar-sm .left-sidebar{display:inherit}}.article-page .main-article{background:var(--card-background);border-radius:var(--card-border-radius);box-shadow:var(--shadow-l1);overflow:hidden}.article-page .main-article .article-header .article-image img{height:auto;width:100%;max-height:50vh;object-fit:cover}.article-page .main-article .article-header .article-details{padding:var(--card-padding);padding-bottom:0}.article-page .main-article .article-content{margin:var(--card-padding)0;color:var(--card-text-color-main)}.article-page .main-article .article-content .footnotes{font-family:var(--base-font-family)}.article-page .main-article .article-content img{max-width:100%;height:auto}.article-page .main-article .article-footer{margin:var(--card-padding);margin-top:0}.article-page .main-article .article-footer section:not(:first-child){margin-top:var(--card-padding)}.article-page .main-article .article-footer section{color:var(--card-text-color-tertiary);text-transform:uppercase;display:flex;align-items:center;font-size:1.4rem;gap:15px}.article-page .main-article .article-footer section svg{width:20px;height:20px;stroke-width:1.33}.article-page .main-article .article-footer .article-tags{flex-wrap:wrap;text-transform:unset}.article-page .main-article .article-footer .article-copyright a,.article-page .main-article .article-footer .article-lastmod a{color:var(--body-text-color)}.article-page .main-article .article-footer .article-copyright a.link,.article-page .main-article .article-footer .article-lastmod a.link{box-shadow:unset}.widget--toc{background-color:var(--card-background);border-radius:var(--card-border-radius);box-shadow:var(--shadow-l1);display:flex;flex-direction:column;color:var(--card-text-color-main);overflow:hidden}.widget--toc ::-webkit-scrollbar-thumb{background-color:var(--card-separator-color)}.widget--toc #TableOfContents{overflow-x:auto;max-height:75vh}.widget--toc #TableOfContents ol,.widget--toc #TableOfContents ul{margin:0;padding:0}.widget--toc #TableOfContents ol{list-style-type:none;counter-reset:item}.widget--toc #TableOfContents ol li a:first-of-type::before{counter-increment:item;content:counters(item,".")". ";font-weight:700;margin-right:5px}.widget--toc #TableOfContents>ul{padding:0 1em}.widget--toc #TableOfContents li{margin:15px 0 15px 20px;padding:5px}.widget--toc #TableOfContents li>ol,.widget--toc #TableOfContents li>ul{margin-top:10px;padding-left:10px;margin-bottom:-5px}.widget--toc #TableOfContents li>ol>li:last-child,.widget--toc #TableOfContents li>ul>li:last-child{margin-bottom:0}.widget--toc #TableOfContents li.active-class>a{border-left:var(--heading-border-size)solid var(--accent-color);font-weight:700}.widget--toc #TableOfContents ul li.active-class>a{display:block}.widget--toc #TableOfContents>ul>li.active-class>a{margin-left:calc(-25px - 1em);padding-left:calc(25px + 1em - var(--heading-border-size))}.widget--toc #TableOfContents>ol>li.active-class>a{margin-left:calc(-9px - 1em);padding-left:calc(9px + 1em - var(--heading-border-size));display:block}.widget--toc #TableOfContents>ul>li>ul>li.active-class>a{margin-left:calc(-60px - 1em);padding-left:calc(60px + 1em - var(--heading-border-size))}.widget--toc #TableOfContents>ol>li>ol>li.active-class>a{margin-left:calc(-44px - 1em);padding-left:calc(44px + 1em - var(--heading-border-size));display:block}.widget--toc #TableOfContents>ul>li>ul>li>ul>li.active-class>a{margin-left:calc(-95px - 1em);padding-left:calc(95px + 1em - var(--heading-border-size))}.widget--toc #TableOfContents>ol>li>ol>li>ol>li.active-class>a{margin-left:calc(-79px - 1em);padding-left:calc(79px + 1em - var(--heading-border-size));display:block}.widget--toc #TableOfContents>ul>li>ul>li>ul>li>ul>li.active-class>a{margin-left:calc(-130px - 1em);padding-left:calc(130px + 1em - var(--heading-border-size))}.widget--toc #TableOfContents>ol>li>ol>li>ol>li>ol>li.active-class>a{margin-left:calc(-114px - 1em);padding-left:calc(114px + 1em - var(--heading-border-size));display:block}.widget--toc #TableOfContents>ul>li>ul>li>ul>li>ul>li>ul>li.active-class>a{margin-left:calc(-165px - 1em);padding-left:calc(165px + 1em - var(--heading-border-size))}.widget--toc #TableOfContents>ol>li>ol>li>ol>li>ol>li>ol>li.active-class>a{margin-left:calc(-149px - 1em);padding-left:calc(149px + 1em - var(--heading-border-size));display:block}.related-content{overflow-x:auto;padding-bottom:15px}.related-content>.flex{float:left}.related-content article{margin-right:15px;flex-shrink:0;overflow:hidden;width:250px;height:150px}.related-content article .article-title{font-size:1.8rem;margin:0}.related-content article.has-image .article-details{padding:20px;background:linear-gradient(0deg,rgba(0,0,0,.25) 0%,rgba(0,0,0,.75) 100%)}.article-content{font-family:var(--article-font-family);font-size:var(--article-font-size);padding:0 var(--card-padding);line-height:var(--article-line-height)}.article-content>p{margin:1.5em 0}.article-content h1,.article-content h2,.article-content h3,.article-content h4,.article-content h5,.article-content h6{margin-inline-start:calc((var(--card-padding)) * -1);padding-inline-start:calc(var(--card-padding) - var(--heading-border-size));border-inline-start:var(--heading-border-size)solid var(--accent-color)}.article-content figure{text-align:center}.article-content figure figcaption{font-size:1.4rem;color:var(--card-text-color-secondary)}.article-content blockquote{position:relative;margin:1.5em 0;border-inline-start:var(--blockquote-border-size)solid var(--card-separator-color);padding:15px calc(var(--card-padding) - var(--blockquote-border-size));background-color:var(--blockquote-background-color)}.article-content blockquote .cite{display:block;text-align:right;font-size:.75em}.article-content blockquote .cite a{text-decoration:underline}.article-content hr{width:100px;margin:40px auto;background:var(--card-text-color-tertiary);height:2px;border:0;opacity:.55}.article-content code{color:var(--code-text-color);background-color:var(--code-background-color);padding:2px 4px;border-radius:var(--tag-border-radius);font-family:var(--code-font-family)}.article-content a,.article-content code{word-break:break-word}.article-content .gallery{position:relative;display:flex;flex-direction:row;justify-content:center;margin:1.5em 0;gap:10px}.article-content .gallery figure{margin:0}.article-content pre{overflow-x:auto;display:block;background-color:var(--pre-background-color);color:var(--pre-text-color);font-family:var(--code-font-family);line-height:1.428571429;word-break:break-all;padding:var(--card-padding)}[dir=rtl] .article-content pre{direction:ltr}.article-content pre code{color:unset;border:none;background:0 0;padding:0}.article-content .highlight{background-color:var(--pre-background-color);padding:var(--card-padding);position:relative}.article-content .highlight:hover .copyCodeButton{opacity:1}[dir=rtl] .article-content .highlight{direction:ltr}.article-content .highlight pre{margin:initial;padding:0;margin:0;width:auto}.article-content .copyCodeButton{position:absolute;top:calc(var(--card-padding));right:calc(var(--card-padding));background:var(--card-background);border:none;box-shadow:var(--shadow-l2);border-radius:var(--tag-border-radius);padding:8px 16px;color:var(--card-text-color-main);cursor:pointer;font-size:14px;opacity:0;transition:opacity .3s ease}.article-content .table-wrapper{padding:0 var(--card-padding);overflow-x:auto;display:block}.article-content table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:1.5em;font-size:.96em}.article-content th,.article-content td{text-align:left;padding:4px 8px 4px 10px;border:1px solid var(--table-border-color)}.article-content td{vertical-align:top}.article-content tr:nth-child(even){background-color:var(--tr-even-background-color)}.article-content .twitter-tweet{color:var(--card-text-color-main)}.article-content .video-wrapper{position:relative;width:100%;height:0;padding-bottom:56.25%;overflow:hidden}.article-content .video-wrapper>iframe,.article-content .video-wrapper>video{position:absolute;width:100%;height:100%;left:0;top:0;border:0}.article-content .gitlab-embed-snippets{margin:0!important}.article-content .gitlab-embed-snippets .file-holder.snippet-file-content{margin-block-end:0!important;margin-block-start:0!important;margin-left:calc((var(--card-padding)) * -1)!important;margin-right:calc((var(--card-padding)) * -1)!important;padding:0 var(--card-padding)!important}.article-content blockquote,.article-content figure,.article-content .highlight,.article-content pre,.article-content .gallery,.article-content .video-wrapper,.article-content .table-wrapper,.article-content .s_video_simple{margin-left:calc((var(--card-padding)) * -1);margin-right:calc((var(--card-padding)) * -1);width:calc(100% + var(--card-padding) * 2)}.article-content .katex-display>.katex{overflow-x:auto;overflow-y:hidden}.article-content kbd{border:1px solid var(--kbd-border-color);font-weight:700;font-size:.9em;line-height:1;padding:2px 4px;border-radius:4px;display:inline-block}.section-card{border-radius:var(--card-border-radius);background-color:var(--card-background);padding:var(--small-card-padding);box-shadow:var(--shadow-l1);display:flex;align-items:center;gap:20px;--separation:15px}.section-card .section-term{font-size:2.2rem;margin:0;color:var(--card-text-color-main)}.section-card .section-description{font-weight:400;color:var(--card-text-color-secondary);font-size:1.6rem;margin:0}.section-card .section-details{flex-grow:1;display:flex;flex-direction:column;gap:8px}.section-card .section-image img{width:60px;height:60px}.section-card .section-count{color:var(--card-text-color-tertiary);font-size:1.4rem;margin:0;font-weight:700;text-transform:uppercase}.subsection-list{overflow-x:auto}.subsection-list .article-list--tile{display:flex;padding-bottom:15px}.subsection-list .article-list--tile article{width:250px;height:150px;margin-right:20px;flex-shrink:0}.subsection-list .article-list--tile article .article-title{margin:0;font-size:1.8rem}.subsection-list .article-list--tile article .article-details{padding:20px}.not-found-card{background-color:var(--card-background);box-shadow:var(--shadow-l1);border-radius:var(--card-border-radius);padding:var(--card-padding)}.search-form{position:relative;--button-size:80px}.search-form.widget{--button-size:60px}.search-form.widget label{font-size:1.3rem;top:10px}.search-form.widget input{font-size:1.5rem;padding:30px 20px 15px}.search-form p{position:relative;margin:0}.search-form label{position:absolute;top:15px;inset-inline-start:20px;font-size:1.4rem;color:var(--card-text-color-tertiary)}.search-form input{padding:40px 20px 20px;border-radius:var(--card-border-radius);background-color:var(--card-background);box-shadow:var(--shadow-l1);color:var(--card-text-color-main);width:100%;border:0;-webkit-appearance:none;transition:box-shadow .3s ease;font-size:1.8rem}.search-form input:focus{outline:0;box-shadow:var(--shadow-l2)}.search-form button{position:absolute;inset-inline-end:0;top:0;height:100%;width:var(--button-size);cursor:pointer;background-color:transparent;border:0;padding:0 10px}.search-form button:focus{outline:0}.search-form button:focus svg{stroke-width:2;color:var(--accent-color)}.search-form button svg{color:var(--card-text-color-secondary);stroke-width:1.33;transition:all .3s ease;width:20px;height:20px}a{text-decoration:none;color:var(--accent-color)}a:hover{color:var(--accent-color-darker)}a.link{box-shadow:0 -2px rgba(var(--link-background-color),var(--link-background-opacity))inset;transition:all .3s ease}a.link:hover{box-shadow:0 calc(-1rem * var(--article-line-height))rgba(var(--link-background-color),var(--link-background-opacity-hover))inset}.section-title{text-transform:uppercase;margin-top:0;margin-bottom:10px;display:block;font-size:1.6rem;font-weight:700;color:var(--body-text-color)}.section-title a{color:var(--body-text-color)}.article-content{text-align:justify}body,.article-content,.article-title{font-family:noto serif sc,noto serif}.container{margin-left:auto;margin-right:auto}.container.extended{}@media(min-width:768px){.container.extended{max-width:1024px;--left-sidebar-max-width:25%;--right-sidebar-max-width:30%}}@media(min-width:1024px){.container.extended{max-width:1280px;--left-sidebar-max-width:25%;--right-sidebar-max-width:22%}}@media(min-width:768px){.container.compact{--left-sidebar-max-width:25%;max-width:768px}}@media(min-width:1024px){.container.compact{max-width:1024px;--left-sidebar-max-width:20%}}@media(min-width:1280px){.container.compact{max-width:1280px}} \ No newline at end of file diff --git a/site.webmanifest b/site.webmanifest new file mode 100644 index 0000000..8bb8939 --- /dev/null +++ b/site.webmanifest @@ -0,0 +1 @@ +{"background_color":"#ffffff","display":"standalone","icons":[{"sizes":"192x192","src":"/android-chrome-192x192.png","type":"image/png"},{"sizes":"512x512","src":"/android-chrome-512x512.png","type":"image/png"}],"name":"","short_name":"","theme_color":"#ffffff"} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..f91e3c0 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://chenkeao.github.io/zh-cn/sitemap.xml</loc><lastmod>2024-01-04T17:42:11+08:00</lastmod></sitemap><sitemap><loc>https://chenkeao.github.io/en/sitemap.xml</loc><lastmod>2022-03-06T00:00:00+00:00</lastmod></sitemap></sitemapindex> \ No newline at end of file diff --git a/tags/index.html b/tags/index.html new file mode 100644 index 0000000..4f6f9b7 --- /dev/null +++ b/tags/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Tags</title> +<link rel=canonical href=https://chenkeao.github.io/tags/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Tags"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/tags/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Tags"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/tags/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title></h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>Tags</h1></div></div></header><section class=article-list--compact><article><a href=/tags/shell/><div class=article-details><h2 class=article-title>shell</h2><footer class=article-time><time datetime=2023-06-08T00:00:00Z>2023-06-08</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/tags/index.xml b/tags/index.xml new file mode 100644 index 0000000..fe5faa3 --- /dev/null +++ b/tags/index.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tags on 陈默的BLOG</title><link>https://chenkeao.github.io/tags/</link><description>Recent content in Tags on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Thu, 08 Jun 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/tags/index.xml" rel="self" type="application/rss+xml"/><item><title>shell</title><link>https://chenkeao.github.io/tags/shell/</link><pubDate>Thu, 08 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/tags/shell/</guid><description/></item></channel></rss> \ No newline at end of file diff --git a/tags/page/1/index.html b/tags/page/1/index.html new file mode 100644 index 0000000..d46152d --- /dev/null +++ b/tags/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/tags/</title> +<link rel=canonical href=https://chenkeao.github.io/tags/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/tags/"></head></html> \ No newline at end of file diff --git a/tags/shell/index.html b/tags/shell/index.html new file mode 100644 index 0000000..31ed99c --- /dev/null +++ b/tags/shell/index.html @@ -0,0 +1,7 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Nothing happened to me"><title>Tag: shell - 陈默的BLOG</title> +<link rel=canonical href=https://chenkeao.github.io/tags/shell/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Tag: shell - 陈默的BLOG"><meta property="og:description" content="Nothing happened to me"><meta property="og:url" content="https://chenkeao.github.io/tags/shell/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="website"><meta property="og:updated_time" content=" 2024-01-04T17:42:11+08:00 "><meta name=twitter:title content="Tag: shell - 陈默的BLOG"><meta name=twitter:description content="Nothing happened to me"><link rel=alternate type=application/rss+xml href=https://chenkeao.github.io/tags/shell/index.xml><link rel="shortcut icon" href=/favicon.ico></head><body><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg></div><h2 class="widget-title section-title">归档</h2><div class=widget-archive--list><div class=archives-year><a href=/archives/#2023><span class=year>2023</span> +<span class=count>3</span></a></div></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">分类</h2><div class=tagCloud-tags><a href=/categories/programming/ class=font_size_2>编程 +</a><a href=/categories/dontstarve/ class=font_size_1>饥荒</a></div></section><section class="widget tagCloud"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11 3l9 9a1.5 1.5.0 010 2l-6 6a1.5 1.5.0 01-2 0L3 11V7a4 4 0 014-4h4"/><circle cx="9" cy="9" r="2"/></svg></div><h2 class="widget-title section-title">标签云</h2><div class=tagCloud-tags><a href=/tags/shell/ class=font_size_2>shell</a></div></section></aside><main class="main full-width"><header><h3 class=section-title>Tags</h3><div class=section-card><div class=section-details><h3 class=section-count></h3><h1 class=section-term>shell</h1></div></div></header><section class=article-list--compact><article><a href=/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/><div class=article-details><h2 class=article-title>GNU Parallel的妙用</h2><footer class=article-time><time datetime=2023-06-08T00:00:00Z>2023-06-08</time></footer></div></a></article><article><a href=/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/><div class=article-details><h2 class=article-title>使用Shell批量修改文件后缀, 批量格式转换</h2><footer class=article-time><time datetime=2023-06-06T00:00:00Z>2023-06-06</time></footer></div></a></article></section><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/tags/shell/index.xml b/tags/shell/index.xml new file mode 100644 index 0000000..4a21b8d --- /dev/null +++ b/tags/shell/index.xml @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>shell on 陈默的BLOG</title><link>https://chenkeao.github.io/tags/shell/</link><description>Recent content in shell on 陈默的BLOG</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Thu, 08 Jun 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://chenkeao.github.io/tags/shell/index.xml" rel="self" type="application/rss+xml"/><item><title>GNU Parallel的妙用</title><link>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</link><pubDate>Thu, 08 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</guid><description><p><code>Android QQ</code>的图片文件是以下面这种结构保存的,以<code>Cache_</code>开头的文件就是图片。这种结构在浏览时要分别点进每个文件夹才能看到图片,很不方便。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span><span class="lnt">9 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">├── 0a0 +</span></span><span class="line"><span class="cl">│ ├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">│ └── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">├── 0a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">│ ├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">│ └── Cache_57776dc1e17110a6 +</span></span><span class="line"><span class="cl">└── 0a7 +</span></span><span class="line"><span class="cl"> └── Cache_25d732f84bd7d0a7 +</span></span></code></pre></td></tr></table> +</div> +</div><p>使用<code>GNU Parallel</code>配合<code>mv</code>可以快速的<code>解散</code>每个二级文件夹,变成以下这种结构。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">. +</span></span><span class="line"><span class="cl">├── Cache_25d732f84bd7d0a7 +</span></span><span class="line"><span class="cl">├── Cache_2783644ca99260a0 +</span></span><span class="line"><span class="cl">├── Cache_373e35b7b8a290a6 +</span></span><span class="line"><span class="cl">├── Cache_-489f6e9c62ea10a6 +</span></span><span class="line"><span class="cl">├── Cache_-4dfb57e9a7cec0a0 +</span></span><span class="line"><span class="cl">└── Cache_57776dc1e17110a6 +</span></span></code></pre></td></tr></table> +</div> +</div><p>命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">find . -name <span class="s2">&#34;*&#34;</span> -type f -print <span class="p">|</span> parallel mv <span class="o">{}</span> ./<span class="o">{</span>/<span class="o">}</span> +</span></span></code></pre></td></tr></table> +</div> +</div><blockquote> +<p>参考: <a class="link" href="https://www.myfreax.com/gnu-parallel/" target="_blank" rel="noopener" +>https://www.myfreax.com/gnu-parallel/</a></p> +</blockquote></description></item><item><title>使用Shell批量修改文件后缀, 批量格式转换</title><link>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</link><pubDate>Tue, 06 Jun 2023 00:00:00 +0000</pubDate><guid>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</guid><description><p><code>shell</code>脚本是处理这类工作最为简单,快捷的方式。</p> +<h2 id="修改后缀">修改后缀</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.原后缀<span class="p">;</span> <span class="k">do</span> mv <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="s2">&#34;`echo </span><span class="nv">$file</span><span class="s2"> | sed s/.原后缀/.新后缀/`&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><h2 id="格式转换">格式转换</h2> +<h3 id="heic转jpg"><code>heic</code>转<code>jpg</code></h3> +<p>首先,安装转换工具。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S libheif +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>heif-convert</code>命令转换。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">heif-convert input.heic output.jpg +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.heic<span class="p">;</span> <span class="k">do</span> heif-convert <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.heic/.jpg</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>此命令的原理是根据当前文件夹下的<code>.heic</code>文件生成<code>.jpg</code>文件,如果成功生成则删除原<code>.heic</code>文件,如果未成功则不会删除原文件。 若未能生成<code>.jpg</code>文件的原因是<code>Input file 'filename.heic' is a JPEG image</code>则可以使用批量修改后缀的方法直接将文件的后缀改为<code>.jpg</code>。</p> +<h3 id="flac转mp3"><code>flac</code>转<code>mp3</code></h3> +<p>首先,安装转换工具:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">yay -S ffmpeg +</span></span></code></pre></td></tr></table> +</div> +</div><p>然后可以使用<code>ffmpeg</code>命令转换,除了格式转换,<code>ffmpeg</code>还支持很多功能,具体可以查阅<a class="link" href="%22https://ffmpeg.org/documentation.html%22" >文档</a>。</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ffmpeg -i <span class="s1">&#39;input.flac&#39;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="s1">&#39;output.mp3&#39;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>批量转换,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">for</span> file in *.flac<span class="p">;</span> <span class="k">do</span> ffmpeg -i <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span> -ab 320k -map_metadata <span class="m">0</span> -id3v2_version <span class="m">3</span> <span class="si">${</span><span class="nv">file</span><span class="p">/%.flac/.mp3</span><span class="si">}</span> <span class="o">&amp;&amp;</span> rm <span class="s2">&#34;</span><span class="nv">$file</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">done</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p>原理同上。</p> +<h3 id="速度优化">速度优化</h3> +<p>使用<code>for</code>循环的方式,所有文件排着队一个一个的被<code>ffmpeg</code>处理。 这种方式固然可以,但效率太低了。 我的运行环境如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"> -<span class="sb">`</span> momo@momo-arch +</span></span><span class="line"><span class="cl"> .o+<span class="sb">`</span> -------------- +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>ooo/ OS: Arch Linux x86_64 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooo: Host: 81AC Lenovo ideapad 720S-15IKB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+oooooo: Kernel: 6.3.6-arch1-1 +</span></span><span class="line"><span class="cl"> -+oooooo+: Uptime: <span class="m">6</span> hours, <span class="m">59</span> mins +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/:-:++oooo+: Packages: <span class="m">975</span> <span class="o">(</span>pacman<span class="o">)</span>, <span class="m">8</span> <span class="o">(</span>flatpak<span class="o">)</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++/+++++++: Shell: bash 5.1.16 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/++++++++++++++: Resolution: 1920x1080 +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/+++ooooooooooooo/<span class="sb">`</span> DE: Plasma 5.27.5 +</span></span><span class="line"><span class="cl"> ./ooosssso++osssssso+<span class="sb">`</span> WM: kwin +</span></span><span class="line"><span class="cl"> .oossssso-<span class="sb">````</span>/ossssss+<span class="sb">`</span> Theme: <span class="o">[</span>Plasma<span class="o">]</span>, Layan-Light-Solid <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> -osssssso. :ssssssso. Icons: Papirus <span class="o">[</span>Plasma<span class="o">]</span>, Papirus <span class="o">[</span>GTK2/3<span class="o">]</span> +</span></span><span class="line"><span class="cl"> :osssssss/ osssso+++. Terminal: konsole +</span></span><span class="line"><span class="cl"> /ossssssss/ +ssssooo/- CPU: Intel i5-7300HQ <span class="o">(</span>4<span class="o">)</span> @ 3.500GHz +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>/ossssso+/:- -:/+osssso+- GPU: Intel HD Graphics <span class="m">630</span> +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>+sso+:-<span class="sb">`</span> <span class="sb">`</span>.-/+oso: Memory: 7216MiB / 19554MiB +</span></span><span class="line"><span class="cl"> <span class="sb">`</span>++:. <span class="sb">`</span>-/+/ +</span></span><span class="line"><span class="cl"> .<span class="sb">`</span> <span class="sb">`</span>/ +</span></span></code></pre></td></tr></table> +</div> +</div><p>经过测试,处理<code>10</code>个<code>.flac</code>文件所需时间为<code>59</code>秒。 速度慢的原因是单进程串行的处理方式,为了提高速度,可以同时启动多个进程并行处理。</p> +<p>使用终端工具<a class="link" href="%22https://www.gnu.org/software/parallel/sphinx.html%22" >GNU Parallel</a>,命令如下:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls *.flac <span class="p">|</span> parallel -j4 <span class="s2">&#34;ffmpeg -i {} -ab 320k -map_metadata 0 -id3v2_version 3 {.}.mp3 &amp;&amp; rm {}&#34;</span> +</span></span></code></pre></td></tr></table> +</div> +</div><p><code>parallel</code>将从标准输入中读取文件列表,<code>-j</code>指定了并行进程数,<code>{}</code>代表输入文件名,<code>{.}</code>代表没有后缀的输入文件名,其他用法可以<code>man parallel</code>查看。</p> +<p>经过测试,在同样环境下处理同样的<code>.flac</code>文件仅需<code>17</code>秒。</p></description></item></channel></rss> \ No newline at end of file diff --git a/tags/shell/page/1/index.html b/tags/shell/page/1/index.html new file mode 100644 index 0000000..516ff8f --- /dev/null +++ b/tags/shell/page/1/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io/tags/shell/</title> +<link rel=canonical href=https://chenkeao.github.io/tags/shell/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io/tags/shell/"></head></html> \ No newline at end of file diff --git a/ts/main.js b/ts/main.js new file mode 100644 index 0000000..91ab333 --- /dev/null +++ b/ts/main.js @@ -0,0 +1,11 @@ +(()=>{var g=class e{galleryUID;items=[];constructor(t,r=1){if(window.PhotoSwipe==null||window.PhotoSwipeUI_Default==null){console.error("PhotoSwipe lib not loaded.");return}this.galleryUID=r,e.createGallery(t),this.loadItems(t),this.bindClick()}loadItems(t){this.items=[];let r=t.querySelectorAll("figure.gallery-image");for(let i of r){let n=i.querySelector("figcaption"),o=i.querySelector("img"),s={w:parseInt(o.getAttribute("width")),h:parseInt(o.getAttribute("height")),src:o.src,msrc:o.getAttribute("data-thumb")||o.src,el:i};n&&(s.title=n.innerHTML),this.items.push(s)}}static createGallery(t){let r=t.querySelectorAll("img.gallery-image");for(let o of Array.from(r)){let s=o.closest("p");if(!s||!t.contains(s)||(s.textContent.trim()==""&&s.classList.add("no-text"),!s.classList.contains("no-text")))continue;let d=o.parentElement.tagName=="A",m=o,a=document.createElement("figure");if(a.style.setProperty("flex-grow",o.getAttribute("data-flex-grow")||"1"),a.style.setProperty("flex-basis",o.getAttribute("data-flex-basis")||"0"),d&&(m=o.parentElement),m.parentElement.insertBefore(a,m),a.appendChild(m),o.hasAttribute("alt")){let l=document.createElement("figcaption");l.innerText=o.getAttribute("alt"),a.appendChild(l)}if(!d){a.className="gallery-image";let l=document.createElement("a");l.href=o.src,l.setAttribute("target","_blank"),o.parentNode.insertBefore(l,o),l.appendChild(o)}}let i=t.querySelectorAll("figure.gallery-image"),n=[];for(let o of i)n.length?o.previousElementSibling===n[n.length-1]?n.push(o):n.length&&(e.wrap(n),n=[o]):n=[o];n.length>0&&e.wrap(n)}static wrap(t){let r=document.createElement("div");r.className="gallery";let i=t[0].parentNode,n=t[0];i.insertBefore(r,n);for(let o of t)r.appendChild(o)}open(t){let r=document.querySelector(".pswp");new window.PhotoSwipe(r,window.PhotoSwipeUI_Default,this.items,{index:t,galleryUID:this.galleryUID,getThumbBoundsFn:n=>{let o=this.items[n].el.getElementsByTagName("img")[0],s=window.pageYOffset||document.documentElement.scrollTop,c=o.getBoundingClientRect();return{x:c.left,y:c.top+s,w:c.width}}}).init()}bindClick(){for(let[t,r]of this.items.entries())r.el.querySelector("a").addEventListener("click",n=>{n.preventDefault(),this.open(t)})}},b=g;var u={};if(localStorage.hasOwnProperty("StackColorsCache"))try{u=JSON.parse(localStorage.getItem("StackColorsCache"))}catch{u={}}async function S(e,t,r){if(!e)return await Vibrant.from(r).getPalette();if(!u.hasOwnProperty(e)||u[e].hash!==t){let i=await Vibrant.from(r).getPalette();u[e]={hash:t,Vibrant:{hex:i.Vibrant.hex,rgb:i.Vibrant.rgb,bodyTextColor:i.Vibrant.bodyTextColor},DarkMuted:{hex:i.DarkMuted.hex,rgb:i.DarkMuted.rgb,bodyTextColor:i.DarkMuted.bodyTextColor}},localStorage.setItem("StackColorsCache",JSON.stringify(u))}return u[e]}var D=(e,t=500)=>{e.classList.add("transiting"),e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height="0",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0",window.setTimeout(()=>{e.classList.remove("show"),e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("transiting")},t)},q=(e,t=500)=>{e.classList.add("transiting"),e.style.removeProperty("display"),e.classList.add("show");let r=e.offsetHeight;e.style.overflow="hidden",e.style.height="0",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0",e.offsetHeight,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=r+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("transiting")},t)},B=(e,t=500)=>window.getComputedStyle(e).display==="none"?q(e,t):D(e,t);function v(){let e=document.getElementById("toggle-menu");e&&e.addEventListener("click",()=>{document.getElementById("main-menu").classList.contains("transiting")||(document.body.classList.toggle("show-menu"),B(document.getElementById("main-menu"),300),e.classList.toggle("is-active"))})}function N(e,t,r){var i=document.createElement(e);for(let n in t)if(n&&t.hasOwnProperty(n)){let o=t[n];n=="dangerouslySetInnerHTML"?i.innerHTML=o.__html:o===!0?i.setAttribute(n,n):o!==!1&&o!=null&&i.setAttribute(n,o.toString())}for(let n=2;n<arguments.length;n++){let o=arguments[n];o&&i.appendChild(o.nodeType==null?document.createTextNode(o.toString()):o)}return i}var w=N;var y=class{localStorageKey="StackColorScheme";currentScheme;systemPreferScheme;constructor(t){this.bindMatchMedia(),this.currentScheme=this.getSavedScheme(),this.dispatchEvent(document.documentElement.dataset.scheme),t&&this.bindClick(t),document.body.style.transition==""&&document.body.style.setProperty("transition","background-color .3s ease")}saveScheme(){localStorage.setItem(this.localStorageKey,this.currentScheme)}bindClick(t){t.addEventListener("click",r=>{this.isDark()?this.currentScheme="light":this.currentScheme="dark",this.setBodyClass(),this.currentScheme==this.systemPreferScheme&&(this.currentScheme="auto"),this.saveScheme()})}isDark(){return this.currentScheme=="dark"||this.currentScheme=="auto"&&this.systemPreferScheme=="dark"}dispatchEvent(t){let r=new CustomEvent("onColorSchemeChange",{detail:t});window.dispatchEvent(r)}setBodyClass(){this.isDark()?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light",this.dispatchEvent(document.documentElement.dataset.scheme)}getSavedScheme(){let t=localStorage.getItem(this.localStorageKey);return t=="light"||t=="dark"||t=="auto"?t:"auto"}bindMatchMedia(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{t.matches?this.systemPreferScheme="dark":this.systemPreferScheme="light",this.setBodyClass()})}},E=y;function p(e){let t;return()=>{t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>e())}}var O=".article-content h1[id], .article-content h2[id], .article-content h3[id], .article-content h4[id], .article-content h5[id], .article-content h6[id]",T="#TableOfContents",L="#TableOfContents li",k="active-class";function V(e,t){let r=e.querySelector("a").offsetHeight,i=e.offsetTop-t.offsetHeight/2+r/2-t.offsetTop;i<0&&(i=0),t.scrollTo({top:i,behavior:"smooth"})}function U(e){let t={};return e.forEach(r=>{let n=r.querySelector("a").getAttribute("href");n.startsWith("#")&&(t[n.slice(1)]=r)}),t}function C(e){let t=[];return e.forEach(r=>{t.push({id:r.id,offset:r.offsetTop})}),t.sort((r,i)=>r.offset-i.offset),t}function M(){let e=document.querySelectorAll(O);if(!e){console.warn("No header matched query",e);return}let t=document.querySelector(T);if(!t){console.warn("No toc matched query",T);return}let r=document.querySelectorAll(L);if(!r){console.warn("No navigation matched query",L);return}let i=C(e),n=!1;t.addEventListener("mouseenter",p(()=>n=!0)),t.addEventListener("mouseleave",p(()=>n=!1));let o,s=U(r);function c(){let m=document.documentElement.scrollTop||document.body.scrollTop,a;i.forEach(f=>{m>=f.offset-20&&(a=document.getElementById(f.id))});let l;a&&(l=s[a.id]),a&&!l?console.debug("No link found for section",a):l!==o&&(o&&o.classList.remove(k),l&&(l.classList.add(k),n||V(l,t)),o=l)}window.addEventListener("scroll",p(c));function d(){i=C(e),c()}window.addEventListener("resize",p(d))}var $="a[href]";function P(){document.querySelectorAll($).forEach(e=>{e.getAttribute("href").startsWith("#")&&e.addEventListener("click",r=>{r.preventDefault();let i=decodeURI(e.getAttribute("href").substring(1)),n=document.getElementById(i),o=n.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top;window.history.pushState({},"",e.getAttribute("href")),scrollTo({top:o,behavior:"smooth"})})})}var x={init:()=>{v();let e=document.querySelector(".article-content");e&&(new b(e),P(),M());let t=document.querySelector(".article-list--tile");t&&new IntersectionObserver(async(s,c)=>{s.forEach(d=>{if(!d.isIntersecting)return;c.unobserve(d.target),d.target.querySelectorAll("article.has-image").forEach(async a=>{let l=a.querySelector("img"),f=l.src,H=l.getAttribute("data-key"),I=l.getAttribute("data-hash"),A=a.querySelector(".article-details"),h=await S(H,I,f);A.style.background=` + linear-gradient(0deg, + rgba(${h.DarkMuted.rgb[0]}, ${h.DarkMuted.rgb[1]}, ${h.DarkMuted.rgb[2]}, 0.5) 0%, + rgba(${h.Vibrant.rgb[0]}, ${h.Vibrant.rgb[1]}, ${h.Vibrant.rgb[2]}, 0.75) 100%)`})})}).observe(t);let r=document.querySelectorAll(".article-content div.highlight"),i="Copy",n="Copied!";r.forEach(o=>{let s=document.createElement("button");s.innerHTML=i,s.classList.add("copyCodeButton"),o.appendChild(s);let c=o.querySelector("code[data-lang]");c&&s.addEventListener("click",()=>{navigator.clipboard.writeText(c.textContent).then(()=>{s.textContent=n,setTimeout(()=>{s.textContent=i},1e3)}).catch(d=>{alert(d),console.log("Something went wrong",d)})})}),new E(document.getElementById("dark-mode-toggle"))}};window.addEventListener("load",()=>{setTimeout(function(){x.init()},0)});window.Stack=x;window.createElement=w;})(); +/*! +* Hugo Theme Stack +* +* @author: Jimmy Cai +* @website: https://jimmycai.com +* @link: https://github.com/CaiJimmy/hugo-theme-stack +*/ diff --git a/ts/search.js b/ts/search.js new file mode 100644 index 0000000..e22d8ef --- /dev/null +++ b/ts/search.js @@ -0,0 +1 @@ +(()=>{var m={"&":"&","<":"<",">":">",'"':""","\u2026":"…"};function T(l){return m[l]||l}function d(l){return l.replace(/[&<>"]/g,T)}function w(l){return l.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}var g=class l{data;form;input;list;resultTitle;resultTitleTemplate;constructor({form:t,input:e,list:r,resultTitle:o,resultTitleTemplate:n}){this.form=t,this.input=e,this.list=r,this.resultTitle=o,this.resultTitleTemplate=n,this.handleQueryString(),this.bindQueryStringChange(),this.bindSearchForm()}static processMatches(t,e,r=!0,o=140,n=20){e.sort((a,s)=>a.start-s.start);let h=0,i=0,c=0,u=[];for(;h<e.length;){let a=e[h];r&&a.start-n>i?(u.push(`${d(t.substring(i,i+n))} [...] `),u.push(`${d(t.substring(a.start-n,a.start))}`),c+=n*2):(u.push(d(t.substring(i,a.start))),c+=a.start-i);let s=h+1,p=a.end;for(;s<e.length&&e[s].start<=p;)p=Math.max(e[s].end,p),++s;if(u.push(`<mark>${d(t.substring(a.start,p))}</mark>`),c+=p-a.start,h=s,i=p,r&&c>o)break}if(i<t.length){let a=t.length;r&&(a=Math.min(a,i+n)),u.push(`${d(t.substring(i,a))}`),r&&a!=t.length&&u.push(" [...]")}return u.join("")}async searchKeywords(t){let e=await this.getData(),r=[],o=new RegExp(t.filter((n,h,i)=>(i[h]=w(n),n.trim()!=="")).join("|"),"gi");for(let n of e){let h=[],i=[],c={...n,preview:"",matchCount:0},u=n.content.matchAll(o);for(let s of Array.from(u))i.push({start:s.index,end:s.index+s[0].length});let a=n.title.matchAll(o);for(let s of Array.from(a))h.push({start:s.index,end:s.index+s[0].length});h.length>0&&(c.title=l.processMatches(c.title,h,!1)),i.length>0?c.preview=l.processMatches(c.content,i):c.preview=d(c.content.substring(0,140)),c.matchCount=h.length+i.length,c.matchCount>0&&r.push(c)}return r.sort((n,h)=>h.matchCount-n.matchCount)}async doSearch(t){let e=performance.now(),r=await this.searchKeywords(t);this.clear();for(let n of r)this.list.append(l.render(n));let o=performance.now();this.resultTitle.innerText=this.generateResultTitle(r.length,((o-e)/1e3).toPrecision(1))}generateResultTitle(t,e){return this.resultTitleTemplate.replace("#PAGES_COUNT",t).replace("#TIME_SECONDS",e)}async getData(){if(!this.data){let t=this.form.dataset.json;this.data=await fetch(t).then(r=>r.json());let e=new DOMParser;for(let r of this.data)r.content=e.parseFromString(r.content,"text/html").body.innerText}return this.data}bindSearchForm(){let t="",e=r=>{r.preventDefault();let o=this.input.value.trim();if(l.updateQueryString(o,!0),o==="")return t="",this.clear();t!==o&&(t=o,this.doSearch(o.split(" ")))};this.input.addEventListener("input",e),this.input.addEventListener("compositionend",e)}clear(){this.list.innerHTML="",this.resultTitle.innerText=""}bindQueryStringChange(){window.addEventListener("popstate",t=>{this.handleQueryString()})}handleQueryString(){let e=new URL(window.location.toString()).searchParams.get("keyword");this.input.value=e,e?this.doSearch(e.split(" ")):this.clear()}static updateQueryString(t,e=!1){let r=new URL(window.location.toString());t===""?r.searchParams.delete("keyword"):r.searchParams.set("keyword",t),e?window.history.replaceState("","",r.toString()):window.history.pushState("","",r.toString())}static render(t){return createElement("article",null,createElement("a",{href:t.permalink},createElement("div",{class:"article-details"},createElement("h2",{class:"article-title",dangerouslySetInnerHTML:{__html:t.title}}),createElement("section",{class:"article-preview",dangerouslySetInnerHTML:{__html:t.preview}})),t.image&&createElement("div",{class:"article-image"},createElement("img",{src:t.image,loading:"lazy"}))))}};window.addEventListener("load",()=>{setTimeout(function(){let l=document.querySelector(".search-form"),t=l.querySelector("input"),e=document.querySelector(".search-result--list"),r=document.querySelector(".search-result--title");new g({form:l,input:t,list:e,resultTitle:r,resultTitleTemplate:window.searchResultTitleTemplate})},0)});var f=g;})(); diff --git a/wayland-and-anki/index.html b/wayland-and-anki/index.html new file mode 100644 index 0000000..f9ddd46 --- /dev/null +++ b/wayland-and-anki/index.html @@ -0,0 +1,13 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="为了使用Waydroid不得已换X11为Wayland,随之问题就来了。基于Qt6的Anki似乎与Wayland兼容的不太好,无法在KDE中"><title>Wayland与Anki</title> +<link rel=canonical href=https://chenkeao.github.io/wayland-and-anki/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="Wayland与Anki"><meta property="og:description" content="为了使用Waydroid不得已换X11为Wayland,随之问题就来了。基于Qt6的Anki似乎与Wayland兼容的不太好,无法在KDE中"><meta property="og:url" content="https://chenkeao.github.io/wayland-and-anki/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta property="article:published_time" content="2023-12-31T00:00:00+00:00"><meta property="article:modified_time" content="2023-12-31T00:00:00+00:00"><meta name=twitter:title content="Wayland与Anki"><meta name=twitter:description content="为了使用Waydroid不得已换X11为Wayland,随之问题就来了。基于Qt6的Anki似乎与Wayland兼容的不太好,无法在KDE中"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li class=current><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/wayland-and-anki/>Wayland与Anki</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-12-31</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer></div></header><section class=article-content><p>为了使用<code>Waydroid</code>不得已换<code>X11</code>为<code>Wayland</code>,随之问题就来了。基于<code>Qt6</code>的<code>Anki</code>似乎与<code>Wayland</code>兼容的不太好,无法在<code>KDE</code>中使用全局菜单,并且<code>Goldendict</code>的<code>Ctrl+c+c</code>粘贴板查词功能在<code>Anki</code>里也无法使用了。 +Google上搜索了一番后发现可以用<code>WAYLAND_DISPLAY=""</code>环境变量强制<code>Anki</code>使用<code>X11</code>解决。使用后果然没有上述问题了,但是出现了新的问题:<code>fcitx</code>无法在<code>Anki</code>里使用了。略微思考后,我想起来我遵从<code>Wayland</code>的建议删掉了在<code>/etc/environment</code>全局设置的<code>QT_IM_MODULE=fcitx</code>。这个问题官方的建议也提及了,可以单独为<code>Anki</code>设置环境变量,设置后问题果然解决。启动命令:</p><div class=highlight><div class=chroma><table class=lntable><tr><td class=lntd><pre tabindex=0 class=chroma><code><span class=lnt>1 +</span></code></pre></td><td class=lntd><pre tabindex=0 class=chroma><code class=language-shell data-lang=shell><span class=line><span class=cl><span class=nv>WAYLAND_DISPLAY</span><span class=o>=</span> <span class=nv>QT_IM_MODULE</span><span class=o>=</span>fcitx Anki +</span></span></code></pre></td></tr></table></div></div></section><footer class=article-footer></footer></article><div id=gitalk-container></div><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css><script src=https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js></script><script src=https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js></script><script>const gitalk=new Gitalk({clientID:"f2a85a008ac7f0051f7c",clientSecret:"e2ddd4b1fbb431f43b3f2a97c2ff476e5ec385b5",repo:"blog_comments",owner:"chenkeao",admin:["chenkeao"],distractionFreeMode:!1,id:md5(location.pathname)});(function(){if(["localhost","127.0.0.1"].indexOf(window.location.hostname)!=-1){document.getElementById("gitalk-container").innerHTML="Gitalk comments not available by default when the website is previewed locally.";return}gitalk.render("gitalk-container")})()</script><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git a/zh-cn/index.html b/zh-cn/index.html new file mode 100644 index 0000000..77b6428 --- /dev/null +++ b/zh-cn/index.html @@ -0,0 +1,2 @@ +<!doctype html><html lang=zh-cn><head><title>https://chenkeao.github.io</title> +<link rel=canonical href=https://chenkeao.github.io><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://chenkeao.github.io"></head></html> \ No newline at end of file diff --git a/zh-cn/sitemap.xml b/zh-cn/sitemap.xml new file mode 100644 index 0000000..38360be --- /dev/null +++ b/zh-cn/sitemap.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://chenkeao.github.io/</loc><lastmod>2024-01-04T17:42:11+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/"/></url><url><loc>https://chenkeao.github.io/kde-global-menu%E4%B8%8Eflatpak/</loc><lastmod>2024-01-04T17:42:11+08:00</lastmod></url><url><loc>https://chenkeao.github.io/page/</loc><lastmod>2024-01-04T17:42:11+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/page/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/page/"/></url><url><loc>https://chenkeao.github.io/page/tips/</loc><lastmod>2024-01-04T17:42:11+08:00</lastmod></url><url><loc>https://chenkeao.github.io/linux-zen%E4%B8%8Envidia/</loc><lastmod>2024-01-01T20:17:04+08:00</lastmod></url><url><loc>https://chenkeao.github.io/wayland-and-anki/</loc><lastmod>2023-12-31T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/%E6%97%A5%E8%AE%B0/</loc><lastmod>2023-07-09T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/page/lostnote/</loc><lastmod>2023-07-09T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/categories/</loc><lastmod>2023-06-09T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/categories/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/categories/"/></url><url><loc>https://chenkeao.github.io/post/</loc><lastmod>2023-06-09T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/categories/dontstarve/</loc><lastmod>2023-06-09T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/p/%E9%A5%A5%E8%8D%92%E8%81%94%E6%9C%BA%E7%89%88%E4%B8%8E%E5%A4%9A%E5%B1%82%E4%B8%96%E7%95%8C/</loc><lastmod>2023-06-09T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/p/gnu-parallel%E7%9A%84%E5%A6%99%E7%94%A8/</loc><lastmod>2023-06-08T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/tags/shell/</loc><lastmod>2023-06-08T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/tags/</loc><lastmod>2023-06-08T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/tags/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/tags/"/></url><url><loc>https://chenkeao.github.io/categories/programming/</loc><lastmod>2023-06-08T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/p/%E4%BD%BF%E7%94%A8shell%E6%89%B9%E9%87%8F%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%E5%90%8E%E7%BC%80-%E6%89%B9%E9%87%8F%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2/</loc><lastmod>2023-06-06T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/archlinux%E8%AE%BE%E7%BD%AE%E6%8C%82%E8%BD%BD%E7%A1%AC%E7%9B%98%E6%97%B6%E6%97%A0%E9%9C%80%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81/</loc><lastmod>2023-06-05T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/gwenview%E5%8A%A0%E8%BD%BDheic%E6%A0%BC%E5%BC%8F%E5%9B%BE%E7%89%87/</loc><lastmod>2023-06-01T00:00:00+00:00</lastmod></url><url><loc>https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/</loc><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/about/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/"/></url><url><loc>https://chenkeao.github.io/archives/</loc><xhtml:link rel="alternate" hreflang="en" href="https://chenkeao.github.io/en/archives/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://chenkeao.github.io/archives/"/></url><url><loc>https://chenkeao.github.io/categories/photography/</loc></url></urlset> \ No newline at end of file diff --git "a/\345\205\263\344\272\216/index.html" "b/\345\205\263\344\272\216/index.html" new file mode 100644 index 0000000..bdd1406 --- /dev/null +++ "b/\345\205\263\344\272\216/index.html" @@ -0,0 +1,10 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="这里有一些代码, 散文和照片"><title>关于</title> +<link rel=canonical href=https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="关于"><meta property="og:description" content="这里有一些代码, 散文和照片"><meta property="og:url" content="https://chenkeao.github.io/%E5%85%B3%E4%BA%8E/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta name=twitter:title content="关于"><meta name=twitter:description content="这里有一些代码, 散文和照片"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li class=current><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><aside class="sidebar right-sidebar sticky"><section class="widget archives"><div class=widget-icon><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><line x1="5" y1="9" x2="19" y2="9"/><line x1="5" y1="15" x2="19" y2="15"/><line x1="11" y1="4" x2="7" y2="20"/><line x1="17" y1="4" x2="13" y2="20"/></svg></div><h2 class="widget-title section-title">目录</h2><div class=widget--toc><nav id=TableOfContents><ol><li><ol><li><a href=#这里有一些代码-散文和照片>这里有一些代码, 散文和照片</a></li></ol></li></ol></nav></div></section></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/%E5%85%B3%E4%BA%8E/>关于</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 1 分钟</time></div></footer><footer class=article-translations><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><div><a href=https://chenkeao.github.io/en/about/ class=link>English</a></div></footer></div></header><section class=article-content><h3 id=这里有一些代码-散文和照片>这里有一些代码, 散文和照片</h3></section><footer class=article-footer></footer></article><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file diff --git "a/\346\227\245\350\256\260/index.html" "b/\346\227\245\350\256\260/index.html" new file mode 100644 index 0000000..dd3645f --- /dev/null +++ "b/\346\227\245\350\256\260/index.html" @@ -0,0 +1,10 @@ +<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="已经凌晨两点了,我却睡不着。最近总想写点什么,写一些从内容上来说不是遗书,从作用上来说却是遗书的内容。若是意外来临,我骤然离去,也能留下些话"><title>日记</title> +<link rel=canonical href=https://chenkeao.github.io/%E6%97%A5%E8%AE%B0/><link rel=stylesheet href=/scss/style.min.44ce0723828d639139005b0a7ef1191e9adbb5ff45bbed3e3f1d9586aea9a146.css><meta property="og:title" content="日记"><meta property="og:description" content="已经凌晨两点了,我却睡不着。最近总想写点什么,写一些从内容上来说不是遗书,从作用上来说却是遗书的内容。若是意外来临,我骤然离去,也能留下些话"><meta property="og:url" content="https://chenkeao.github.io/%E6%97%A5%E8%AE%B0/"><meta property="og:site_name" content="陈默的BLOG"><meta property="og:type" content="article"><meta property="article:section" content="Page"><meta property="article:published_time" content="2023-07-09T00:00:00+00:00"><meta property="article:modified_time" content="2023-07-09T00:00:00+00:00"><meta name=twitter:title content="日记"><meta name=twitter:description content="已经凌晨两点了,我却睡不着。最近总想写点什么,写一些从内容上来说不是遗书,从作用上来说却是遗书的内容。若是意外来临,我骤然离去,也能留下些话"><link rel="shortcut icon" href=/favicon.ico></head><body class=article-page><script>(function(){const e="StackColorScheme";localStorage.getItem(e)||localStorage.setItem(e,"auto")})()</script><script>(function(){const t="StackColorScheme",e=localStorage.getItem(t),n=window.matchMedia("(prefers-color-scheme: dark)").matches===!0;e=="dark"||e==="auto"&&n?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light"})()</script><div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky"><button class="hamburger hamburger--spin" type=button id=toggle-menu aria-label=切换菜单> +<span class=hamburger-box><span class=hamburger-inner></span></span></button><header><figure class=site-avatar><a href=/><img src=/img/avatar_hu41e05ff0a3d0bdc18e4419f594189a83_61687_300x0_resize_q75_box.jpg width=300 height=300 class=site-logo loading=lazy alt=Avatar></a></figure><div class=site-meta><h1 class=site-name><a href=/>陈默的BLOG</a></h1><h2 class=site-description>Nothing happened to me</h2></div></header><ol class=menu id=main-menu><li><a href=/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path d="M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/><path d="M9 21v-6a2 2 0 012-2h2a2 2 0 012 2v6"/></svg><span>首页</span></a></li><li><a href=/archives/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><rect x="3" y="4" width="18" height="4" rx="2"/><path d="M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8"/><line x1="10" y1="12" x2="14" y2="12"/></svg><span>归档</span></a></li><li><a href=/page/tips/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-infinity" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M9.828 9.172a4 4 0 100 5.656A10 10 0 0012 12a10 10 0 012.172-2.828 4 4 0 110 5.656A10 10 0 0112 12 10 10 0 009.828 9.172"/></svg><span>记录</span></a></li><li><a href=/%E5%85%B3%E4%BA%8E/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="7" r="4"/><path d="M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2"/></svg><span>关于</span></a></li><li class=current><a href=/page/lostnote/><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><span>遗之书</span></a></li><div class=menu-bottom-section><li id=i18n-switch><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-language" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7"/><path d="M9 3v2c0 4.418-2.239 8-5 8"/><path d="M5 9c-.003 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4-9 4 9"/><path d="M19.1 18h-6.2"/></svg><select name=language onchange="window.location.href=this.selectedOptions[0].value"><option value=https://chenkeao.github.io/ selected>中文</option><option value=https://chenkeao.github.io/en/>English</option></select></li><li id=dark-mode-toggle><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="8" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="16" cy="12" r="2"/><rect x="2" y="6" width="20" height="12" rx="6"/></svg><span>暗色模式</span></li></div></ol></aside><main class="main full-width"><article class=main-article><header class=article-header><div class=article-details><div class=article-title-wrapper><h2 class=article-title><a href=/%E6%97%A5%E8%AE%B0/>日记</a></h2></div><footer class=article-time><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><path d="M11.795 21H5a2 2 0 01-2-2V7a2 2 0 012-2h12a2 2 0 012 2v4"/><circle cx="18" cy="18" r="4"/><path d="M15 3v4"/><path d="M7 3v4"/><path d="M3 11h16"/><path d="M18 16.496V18l1 1"/></svg><time class=article-time--published>2023-07-09</time></div><div><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z"/><circle cx="12" cy="12" r="9"/><polyline points="12 7 12 12 15 15"/></svg><time class=article-time--reading>阅读时长: 2 分钟</time></div></footer></div></header><section class=article-content><p>已经凌晨两点了,我却睡不着。最近总想写点什么,写一些从内容上来说不是遗书,从作用上来说却是遗书的内容。若是意外来临,我骤然离去,也能留下些话给在乎我的人,或者即使没有死去,但不再有从前的意识,也能看着我的外表读读我写的话。</p><p>我打算写很多,也打算写给很多人看,没有什么固定的主题,也没有哪句话算作完结,我可能会写到自己的喜好,喜欢的书,喜欢的电影,喜欢的事。或者会写到一些故事,让我印象深刻的故事。又或者一些感受,一些期望,一些牢骚。若是我能长寿,愿我可以写成一本书,只是那时候恐怕已无人愿意为了我翻阅这本书。若你为怀念我来阅读此文,切勿感伤,我希望世界上多一些欢笑,而不是痛苦。至少在现在,我二十三岁的时候,我相信做人最幸福的事情就是从未出生过,苦难如同真空中的以太,幸福则如同一颗新星,昙花一现。这并非悲观,正因为此,我相信人生的意义在于增加世界上的欢乐,让每个人可以尽量幸福的走完一生。在满溢痛苦的世界上制造更多的痛苦是愚蠢的。可理想总是理想,没有人可以只生产欢乐。当我意识到这世界充满不幸的时候,我已经经历了很多,有时候是我自己造成的,有些时候我也是受害者,有时候它就在那里,没有什么人是罪魁祸首,它就在那,在必经之路上等待你,避无可避。</p><p>居安思危,每当我心中感到幸福时,都不由的开始担心,因为我知道幸福一定是短暂的,不知道这一次会是 怎么样的走向不幸。每当我看到美景,欣赏之余一定会感到无尽的惋惜,惋惜无论怎么做都无法将其定格。每当从一场恍若隔世的梦中醒来,我总是尝试用文字记录下那片刻所想,可回头再看时就只有平淡的情节,再也无法体会那种感受。以至于有时我会怀疑,是否是睡着时穿越到了另一个平行宇宙?经历了另一种截然不同的可能?那样触手可及又那样遥远无期,像是来自另一个世界的另一个自己。</p><p>幸运的是,我还能用文字记录下这个世界中的我的所思所想,写下现在的自己。如果我能有幸一直活着,未来我可以和曾经的自己的对话,如果不能,他人也可以和那个曾经活着的我对话。我想写一篇篇散文,或者是一篇篇日记。如果写得多了,他日可以整理成册;如果写得少了,往后某天看到也是一段回忆。</p></section><footer class=article-footer></footer></article><footer class=site-footer><section class=copyright>© +2023 - +2024 陈默的BLOG</section><section class=powerby>Built with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a><br>主题 <b><a href=https://github.com/CaiJimmy/hugo-theme-stack target=_blank rel=noopener data-version=3.21.0>Stack</a></b> 由 <a href=https://jimmycai.com target=_blank rel=noopener>Jimmy</a> 设计</section></footer><div class=pswp tabindex=-1 role=dialog aria-hidden=true><div class=pswp__bg></div><div class=pswp__scroll-wrap><div class=pswp__container><div class=pswp__item></div><div class=pswp__item></div><div class=pswp__item></div></div><div class="pswp__ui pswp__ui--hidden"><div class=pswp__top-bar><div class=pswp__counter></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> +<button class="pswp__button pswp__button--share" title=Share></button> +<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> +<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class=pswp__preloader><div class=pswp__preloader__icn><div class=pswp__preloader__cut><div class=pswp__preloader__donut></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class=pswp__share-tooltip></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> +</button> +<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class=pswp__caption><div class=pswp__caption__center></div></div></div></div></div><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=" crossorigin=anonymous defer></script><script src=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=" crossorigin=anonymous defer></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css crossorigin=anonymous><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css crossorigin=anonymous></main></div><script src=https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=" crossorigin=anonymous></script><script type=text/javascript src=/ts/main.js defer></script><script>(function(){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap",e.type="text/css",e.rel="stylesheet";const t=document.createElement("link");t.href="https://fonts.googleapis.com/css?family=Noto+Serif&display=swap",t.type="text/css",t.rel="stylesheet",document.head.appendChild(e),document.head.appendChild(t)})()</script></body></html> \ No newline at end of file