{"id":339,"date":"2024-09-21T18:07:26","date_gmt":"2024-09-21T10:07:26","guid":{"rendered":"https:\/\/www.tys.fun\/?p=339"},"modified":"2025-01-27T01:50:31","modified_gmt":"2025-01-26T17:50:31","slug":"%e5%88%a9%e7%94%a8%e9%97%b2%e7%bd%ae%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%8c%e6%88%90zotero%e6%89%a9%e5%ae%b9","status":"publish","type":"post","link":"https:\/\/tys.fun\/?p=339","title":{"rendered":"\u5229\u7528\u95f2\u7f6e\u670d\u52a1\u5668\u5b8c\u6210Zotero\u6269\u5bb9"},"content":{"rendered":"<h2>Zotero \u597d\u7528\uff0c\u4f46\u514d\u8d39\u4e91\u4e0d\u592a\u591f\u7528<\/h2>\n<p>\u4f17\u6240\u5468\u77e5\uff0cZotero \u4f5c\u4e3a\u4e00\u6b3e\u597d\u7528\u3001\u5f00\u6e90\u7684\u6587\u732e\u7ba1\u7406\u5de5\u5177\uff0c\u8fd8\u80fd\u5b89\u88c5\u5404\u79cd\u63d2\u4ef6\u6ee1\u8db3\u81ea\u5df1\u7684\u4e2a\u6027\u5316\u9700\u6c42\uff0c\u53ef\u4ee5\u8bf4\u662f\u4e00\u76f4\u5e7f\u53d7\u79d1\u7814<del>\u6c11\u5de5<\/del>\u4eba\u58eb\u7684\u559c\u7231\u3002\u4f46\u662f\u5427\uff0c300 MiB \u7684\u514d\u8d39\u540c\u6b65\u7a7a\u95f4\u5bf9\u4e8e<del>\u6709\u6536\u96c6\u7656<\/del>\u535a\u89c8\u7fa4\u6587\u7684\u4eba\u6765\u8bf4\u8fd8\u662f\u6709\u70b9\u4e0d\u592a\u591f\u7528\uff0c\u867d\u8bf4\u5b98\u65b9 3 GiB\u7684\u7a7a\u95f4\u53ea\u8981 20 USD \u6bcf\u5e74\uff0c\u4f46\u60f3\u60f3\u81ea\u5df1\u6709\u90a3\u4e48\u591a\u7684\u4e91\u670d\u52a1\u8fd8\u6ca1\u7528\u4e0a\uff0c\u8fd9\u94b1\u82b1\u7684\u591a\u5c11\u6709\u70b9\u4e0d\u8212\u670d\uff0c\u597d\u5728 Zotero \u652f\u6301\u4f7f\u7528 WebDAV \u534f\u8bae\u8fdb\u884c\u540c\u6b65\uff0c\u8fd9\u5c31\u6709\u4e86\u5f88\u5927\u7684\u53d1\u6325\u7a7a\u95f4\u3002<\/p>\n<h2>\u81ea\u5efa or \u5546\u4e1a\u670d\u52a1<\/h2>\n<p>\u8bf4\u5b9e\u8bdd\uff0c\u4e00\u822c\u80fd\u770b\u5230\u6211\u8fd9\u535a\u5ba2\u7684\u4eba\u5e94\u8be5\u90fd\u662f\u8df3\u8fc7\u8fd9\u4e2a\u9009\u62e9\uff0c\u76f4\u63a5\u770b\u81ea\u5efa\u6559\u7a0b\u4e86\uff0c\u4f46\u5176\u5b9e\u6210\u719f\u7684\u4e91\u76d8\u670d\u52a1\u662f\u5f88\u7701\u5fc3\u7684\uff0c\u5982\u679c\u5728\u7528\u7684\u7f51\u76d8\u652f\u6301\u4f7f\u7528 WebDAV\uff08\u56fd\u5185\u597d\u50cf\u53ea\u6709\u575a\u679c\u4e91\uff0c\u4ee5\u524d iCloud \u4e5f\u53ef\u4ee5\u73b0\u5728\u4e0d\u884c\u4e86\uff0cdropbox\u3001teracloud\u3001box\u5e94\u8be5\u53ef\u4ee5\uff09\uff0c\u76f4\u63a5\u4f7f\u7528\u633a\u597d\u7684\u3002\u4e0d\u8fc7\u4e0d\u63a8\u8350\u5c06\u6570\u636e\u5e93\u76f4\u63a5\u653e\u5165 OneDrive\/iCloud \u4e91\u76d8\u7b49\u7684\u884c\u4e3a\uff0c\u5b98\u65b9\u8bf4\u8fd9\u6837\u6709\u53ef\u80fd\u4f1a\u635f\u574f\u6570\u636e\u5e93\u3002\u5982\u679c\u4f60\u548c\u6211\u4e00\u6837\u6ca1\u6709\u5728\u7528\u8fd9\u4e9b\u7f51\u76d8\u7684\u670d\u52a1\uff0c\u4e14\u5177\u6709\u4e00\u5b9a\u7684\u6298\u817e\u80fd\u529b\u548c\u95f2\u7f6e\u7684\u4e91\u7aef\u8d44\u6e90\uff0c\u5c31\u8fdb\u5165\u6b63\u7247\u5427\u3002<\/p>\n<h2>Web \u670d\u52a1\u5668<\/h2>\n<p>\u5176\u5b9e\u53ea\u9700\u8981\u4f7f\u7528 WebDAV \u7684\u8bdd\u6709\u4e0d\u5c11\u670d\u52a1\u7aef\u662f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7684\uff0c\u4f46\u5f80\u5f80\u670d\u52a1\u5668\u4e0a\u90fd\u6709\u4e00\u4e9b\u5176\u4ed6\u7684\u7f51\u9875\u670d\u52a1\uff0c\u6240\u4ee5\u8fd8\u662f\u9700\u8981\u7c7b\u4f3c Apache\u3001Nginx\u3001Caddy \u8fd9\u7c7b Web Server \u7684\u3002\u6211\u7528\u8fc7 Nginx \u548c Caddy\uff0c\u73b0\u5728\u611f\u89c9 Caddy \u8fd9\u4e2a\u4e1c\u897f\u914d\u7f6e\u8d77\u6765\u771f\u662f\u6bd4 Nginx \u65b9\u4fbf\u592a\u591a\u4e86\uff0c\u8bc1\u4e66\u4e0d\u7528\u81ea\u5df1\u7ba1\uff0c\u5404\u79cd\u8bbe\u7f6e\u4e5f\u76f8\u5bf9\u76f4\u89c2\u4e00\u4e9b\uff0c\u4f46\u662f\u6bd4\u8f83\u9ebb\u70e6\u7684\u5730\u65b9\u5728\u4e8e\u6a21\u5757\uff0c\u4e0d\u5c11\u65f6\u5019\u90fd\u8981\u501f\u52a9\u4e8e XCaddy\uff0c\u800c Nginx \u7684\u5f88\u591a\u6a21\u5757\u90fd\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5\uff0c\u65b9\u4fbf\u4e00\u70b9\uff0c\u8fd9\u4e2a\u9009\u62e9\u5168\u770b\u4e2a\u4eba\u504f\u597d\u3002<br \/>\n\u672c\u6587\u4e3b\u8981\u8bb0\u5f55\u4f7f\u7528 Caddy \u7684\u8fc7\u7a0b\uff0cNginx \u7684\u6709\u7a7a\u518d\u8bf4\uff08\uff09<br \/>\nCaddy\u7684\u5b89\u88c5\u975e\u5e38\u7b80\u5355\uff0c\u6309\u7167\u5b98\u65b9\u7ed9\u51fa\u7684\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n<pre><code class=\"language-bash\">sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl\r\ncurl -1sLf &#039;https:\/\/dl.cloudsmith.io\/public\/caddy\/stable\/gpg.key&#039; | sudo gpg --dearmor -o \/usr\/share\/keyrings\/caddy-stable-archive-keyring.gpg\r\ncurl -1sLf &#039;https:\/\/dl.cloudsmith.io\/public\/caddy\/stable\/debian.deb.txt&#039; | sudo tee \/etc\/apt\/sources.list.d\/caddy-stable.list\r\nsudo apt update\r\nsudo apt install caddy<\/code><\/pre>\n<h2>\u8bc1\u4e66<\/h2>\n<p>\u90fd 4202 \u5e74\u4e86\uff0c\u522b\u518d HTTP \u88f8\u5954\u4e86\uff0c\u4e0a HTTPS \u5427\uff01<br \/>\n\u5982\u679c\u4e0d\u662f\u5728\u5176\u4ed6\u5730\u65b9\u751f\u6210\u7684\u8bc1\u4e66\uff0c\u4e14\u7528\u7684\u662f Caddy\uff0c<del>\u8df3\u8fc7<\/del>\u76f4\u63a5\u5728\u914d\u7f6e\u91cc\u9762\u5199\u4e0a tls \u9009\u9879\u5c31\u884c\uff0c\u975e\u5e38\u597d\u7528<br \/>\n\u7528 Nginx \u7684\u8bdd\u5c31\u5f97 acme.sh \u4e86\uff0c\u7f51\u4e0a\u4e5f\u6709\u5f88\u591a\u7684\u6559\u7a0b\uff0c\u5b98\u65b9\u6587\u6863\u4e5f\u5f88\u5168\uff0c\u8fc7\uff08\uff09\u3002<\/p>\n<h2>Caddy \u6a21\u5757\u914d\u7f6e<\/h2>\n<p>Caddy \u539f\u751f\u7684\u6a21\u5757\u91cc\u9762\u662f\u6ca1\u6709 WebDAV \u652f\u6301\u7684\uff0c\u8fd9\u91cc\u7528\u5230\u4e86 <a href=\"https:\/\/github.com\/mholt\/caddy-webdav\" title=\"mholt\/caddy-webdav\">mholt\/caddy-webdav<\/a> \u9879\u76ee\uff0c\u6709\u4e24\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5b89\u88c5\u63d2\u4ef6\uff0c\u6ca1\u6709\u4ec0\u4e48\u51b2\u7a81\u7684\u7b80\u5355\u63d2\u4ef6\u6bd4\u5982\u8fd9\u4e2a webdav \uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528<\/p>\n<pre><code class=\"language-bash\">sudo caddy add-package github.com\/mholt\/caddy-webdav<\/code><\/pre>\n<p>\u6765\u6dfb\u52a0\uff0c\u6dfb\u52a0\u4e4b\u540e\u91cd\u542f Caddy \u5373\u53ef\uff1a<\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart caddy<\/code><\/pre>\n<p>\u5982\u679c\u8fd8\u6709\u5176\u4ed6\u63d2\u4ef6\uff0c\u9700\u8981\u624b\u52a8\u4f7f\u7528 XCaddy \u7f16\u8bd1\u65f6\uff0c\u5c31\u6bd4\u8f83\u9ebb\u70e6\u4e00\u70b9\u4e86<\/p>\n<h3>GO \u5b89\u88c5<\/h3>\n<p>\u8fd9\u8fb9\u4f7f\u7528\u7684\u662f amd64 \u7684\u67b6\u6784\u7684\uff0c\u4e0d\u4e00\u6837\u8bb0\u5f97\u6362<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\r\n# Get latest version Go from Google\r\nwget &quot;https:\/\/dl.google.com\/go\/$(curl https:\/\/go.dev\/VERSION?m=text).linux-amd64.tar.gz&quot; -O go.linux-amd64.tar.gz\r\ntar -xvf go.linux-amd64.tar.gz\r\n\r\n# Move Go to the system directory\r\nsudo mv go \/usr\/local\r\n\r\n# Set up Go environment variables\r\necho &#039;export GOROOT=\/usr\/local\/go&#039; &gt;&gt; ~\/.bashrc\r\necho &#039;export GOPATH=$HOME\/go&#039; &gt;&gt; ~\/.bashrc\r\necho &#039;export PATH=$PATH:$GOROOT\/bin:$GOPATH\/bin&#039; &gt;&gt; ~\/.bashrc\r\nsource ~\/.bashrc<\/code><\/pre>\n<h3>XCaddy \u5b89\u88c5<\/h3>\n<pre><code class=\"language-bash\">go install github.com\/caddyserver\/xcaddy\/cmd\/xcaddy@latest<\/code><\/pre>\n<h3>\u7f16\u8bd1\u5e76\u66ff\u6362\u539f\u7248<\/h3>\n<pre><code class=\"language-bash\">xcaddy build --with github.com\/mholt\/caddy-webdav\r\nsudo mv caddy \/usr\/local\/bin\/caddy\r\nsudo systemctl restart caddy<\/code><\/pre>\n<h2>\u914d\u7f6e Caddyfile<\/h2>\n<p>\u9996\u5148\u786e\u5b9a WebDAV \u5bf9\u5e94\u7684\u76ee\u5f55\uff0c\u4e0b\u6587\u90fd\u5199\u4e3a <code>\/path\/to\/dav<\/code>\uff0c\u7136\u540e\u786e\u5b9a\u5bc6\u7801\uff0cCaddyfile \u4e2d\u7684\u5bc6\u7801\u662f hashed\uff0c\u53ef\u4ee5\u901a\u8fc7 <code>caddy hash-password<\/code> \u547d\u4ee4\u751f\u6210\uff0c\u8bb0\u5f55\u751f\u6210\u51fa\u7684\u5bc6\u6587\u3002<br \/>\n\u4e00\u4e2a\u6807\u51c6\u7684 Caddyfile \u7c7b\u4f3c\u4e8e\u8fd9\u6837\uff1a<\/p>\n<pre><code>example.com {\r\n    tls mail@example.com\r\n    root * \/var\/www\/wordpress\r\n    encode gzip\r\n    php_fastcgi unix\/\/run\/php\/php-version-fpm.sock\r\n}<\/code><\/pre>\n<p>\u6211\u4eec\u8981\u6dfb\u52a0\u7684\u662f webdav directive\uff0c\u5e76\u4e14\u8981\u786e\u4fdd\u5b83\u7684\u4f18\u5148\u7ea7\u5728\u6b63\u786e\u7684\u4f4d\u7f6e\u3002\u5982\u679c\u662f\u4e0a\u6587\u8fd9\u79cd\u914d\u7f6e\uff0c\u5e94\u8be5\u4fee\u6539\u6210\u8fd9\u6837\uff1a<\/p>\n<pre><code class=\"language-caddy\">example.com {\r\n    tls mail@example.com\r\n    {\r\n        # ensure webdav is before file_server\r\n        order webdav before file_server\r\n    }\r\n\r\n    root * \/var\/www\/wordpress\r\n    encode gzip\r\n    php_fastcgi unix\/\/run\/php\/php-version-fpm.sock\r\n\r\n    rewrite \/webpath \/webpath\/\r\n\t\troute {\r\n\t\t\tbasic_auth \/webpath\/* {\r\n\t\t\t\t\t\tUSERNAME THE_HASHED_PASSWORD\r\n\t\t\t\t}\r\n\t\t\t\twebdav \/webpath\/* {\r\n\t\t\t\t\t\t# webpath is the url you use in real application\r\n\t\t\t\t\t\troot \/path\/to\/dav\r\n\t\t\t\t\t\tprefix \/path\/to\/dav\r\n\t\t\t\t}\r\n\t\t\t}\r\n}<\/code><\/pre>\n<p>\u4fdd\u5b58\u540e\u76f4\u63a5\u91cd\u542f Caddy \uff0c\u5982\u679c\u4e0d\u62a5\u9519\uff0c\u670d\u52a1\u7aef\u914d\u7f6e\u5c31\u7ed3\u675f\u4e86\u3002<\/p>\n<h2>Zotero \u9a8c\u8bc1<\/h2>\n<p>\u540c\u6b65\u65b9\u5f0f\u9009 WebDAV\uff0c\u7f51\u5740\u8bb0\u5f97\u9009 https\uff0c\u586b\u4e0a <code>example.com\/webpath<\/code><br \/>\n\u586b\u597d\u7528\u6237\u540d\u5bc6\u7801\uff0c\u9a8c\u8bc1\u670d\u52a1\u5668\uff0c\u901a\u8fc7\u5c31\u7ed3\u675f\u4e86\uff0c\u6109\u5feb\u4eab\u53d7\u540c\u6b65\u6269\u5bb9\u7684\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zotero \u597d\u7528\uff0c\u4f46\u514d\u8d39\u4e91\u4e0d\u592a\u591f\u7528 \u4f17\u6240\u5468\u77e5\uff0cZotero \u4f5c\u4e3a\u4e00\u6b3e\u597d\u7528\u3001\u5f00\u6e90\u7684\u6587\u732e\u7ba1\u7406\u5de5\u5177\uff0c\u8fd8\u80fd\u5b89\u88c5\u5404\u79cd\u63d2 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-339","post","type-post","status-publish","format-standard","hentry","category-experiences"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tys.fun\/index.php?rest_route=\/wp\/v2\/posts\/339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tys.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tys.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tys.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tys.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=339"}],"version-history":[{"count":3,"href":"https:\/\/tys.fun\/index.php?rest_route=\/wp\/v2\/posts\/339\/revisions"}],"predecessor-version":[{"id":352,"href":"https:\/\/tys.fun\/index.php?rest_route=\/wp\/v2\/posts\/339\/revisions\/352"}],"wp:attachment":[{"href":"https:\/\/tys.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tys.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tys.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}