分类: 未分类

  • 【思源插件推荐】发布工具——快速输出你的内容

    【思源插件推荐】发布工具——快速输出你的内容

    【思源插件推荐】发布工具——快速输出你的内容


      • 【思源插件推荐】发布工具——快速输出你的内容 - 知乎专栏
      • https://zhuanlan.zhihu.com/p/660341957
      • 如果要把思源里的内容发布到各个博客平台该怎么弄?你可以先将笔记导出 Markdown 文本,然后导入到各个博客平台,也可以直接全选复制,粘贴到平台的编辑页面上。但无论是以 Markdown 文本导入还是复制粘贴,如何处…
      • 2025-03-07 17:37:34

    如果要把思源里的内容发布到各个博客平台该怎么弄?你可以先将笔记导出 Markdown
    文本,然后导入到各个博客平台,也可以直接全选复制,粘贴到平台的编辑页面上。但无论是以 Markdown 文本导入还是复制粘贴,如何处理图片,是一个令人头大的问题。

    好在插件市场有“发布工具
    ”,这款插件能解决将思源中的笔记发布到各个平台上的问题,方便你快速输出你的内容。

    本文将以“将思源中的笔记发布到​知乎​”为例,来介绍这款插件。11


    1. 插件的安装

    在插件市场中找到“发布工具”,下载安装并启用。

    【思源插件推荐】发布工具——快速输出你的内容

    ​启用后,发现顶栏左上角多了一个“小飞机”的标志。


    2. 配置发布平台

    点击“小飞机”,打开“发布设置”。

    【思源插件推荐】发布工具——快速输出你的内容

    ​这里以配置知乎平台为例。在“发布配置”中找到“知乎”并启用。

    【思源插件推荐】发布工具——快速输出你的内容

    启用后点击“授权”后确定,会弹出一个知乎的登录窗口,然后输入你的知乎账号和密码进行登录。登录成功后点击“验证”即可完成配置。

    【思源插件推荐】发布工具——快速输出你的内容


    3. 发布文章

    授权成功后,再点击“小飞机”,可以看到在“一键发布”上多了一个“知乎”的选项。

    【思源插件推荐】发布工具——快速输出你的内容

    此时打开你想发布的文章,用“小飞机”一键发布即可。


    4. 排版优化

    使用当前版本的插件将文章发布到知乎上时,会有排版段落间距过宽的问题,如果你不介意排版的话倒是问题不大。

    当然,想我这种强迫症患者是忍受不了排版过于松散的。所以我会在知乎的编辑器上修改排版。

    注意​:如果在知乎上修改原文后,再想通过思源发布内容更新到知乎上时,会出问题。

    所以我需要在修改完原文后,将修改同步到思源笔记。

    点击“常规发布”后,选择“知乎”平台。

    【思源插件推荐】发布工具——快速输出你的内容

    点击“同步修改到思源笔记”。

    【思源插件推荐】发布工具——快速输出你的内容

    这样的话,下次再从思源笔记发布文章更新就不会有问题啦!


    5. 上传图片到图床

    如果编辑平台支持使用网络图片,或者你有个人网络博客的话,可以利用“扩展功能”中的“上传图片到图床”来上传图片。

    不过这需要额外的插件——PicGo 插件。

  • 自托管端口管理系统Portall

    自托管端口管理系统Portall



    自托管端口管理系统Portall

    自托管端口管理系统Portall

    发表于2024-07-17更新于2024-11-01分类于各种折腾Waline:2阅读次数:196本文字数:1.9k阅读时长 ≈2 分钟

    Portall 提供了一个直观的 Web 界面,用于生成、跟踪和组织跨多个主机的端口和服务。

    老苏一直在折腾各种开源软件,但总是记不清哪些应用占用了哪些端口,每次都是先随机想一个端口,然后在笔记中搜索,看有没有被占用过。Portall​ 就是用来解决老苏遇到的这种情况的,当然,excel​ 也是可以的 😂

    什么是 Portall ?

    Portall​ 是一个自托管端口管理系统,它提供了一个直观的 Web​ 界面,用于生成、跟踪和组织跨多个主机的端口和服务。它旨在让您更轻松地管理自托管应用和服务。

    软件主要特征:

    • 轻松的端口管理: 添加、删除和分配端口到不同的服务和主机
    • 端口号生成: 为您的应用程序快速生成唯一的端口号
    • 导入工具:Caddyfile​、Docker-Compose​ 或 JSON​ 数据导入现有配置
    • 自定义规则: 定义您自己的端口范围并为端口生成器设置排除项
    • 块级设计: 拖放元素来组织端口并在主机之间移动应用程序
    • 主题: 包括明暗模式,计划推出更多主题
    • CSS Playground: 使用自定义 CSS​ 支持修改外观
    • 移动响应: 从任何地方管理您的端口

    技术栈

    • 后端: Flask(Python)
    • 数据库: SQLAlchemy 和 SQLite
    • 前端: HTML、CSS、JavaScript

    自托管端口管理系统Portall

    安装

    在群晖上以 Docker 方式安装。

    在注册表中搜索 portall​ ,选择第一个 need4swede/portall:​,版本选择 latest​。

    本文写作时, latest​ 版本对应为 1.0.3​;

    自托管端口管理系统Portall

    docker​ 文件夹中,创建一个新文件夹 portall​,并在其中建一个子文件夹 data

    文件夹 装载路径 说明
    docker/portall/data /app/instance 存放数据库文件

    自托管端口管理系统Portall

    端口

    本地端口不冲突就行,不确定的话可以用命令查一下

    # 查看端口占用
    netstat -tunlp | grep 端口号
    
    本地端口 容器端口
    8855 8080

    自托管端口管理系统Portall

    环境

    可变
    PORT 容器端口设置,默认设为8080
    SECRET_KEY 用于加密和安全认证的密钥,根据需要进行修改

    自托管端口管理系统Portall

    命令行安装

    如果你熟悉命令行,可能用 docker cli​ 更快捷

    # 新建文件夹 portall 和 子目录
    mkdir -p /volume1/docker/portall/data
    
    # 进入 portall 目录
    cd /volume1/docker/portall
    
    # 运行容器
    docker run -d 
       --restart unless-stopped 
       --name portall 
       -p 8855:8080 
       -v $(pwd)/data:/app/instance 
       -e PORT=8080 
       -e SECRET_KEY=<your_secret_key> 
       need4swede/portall:latest
    

    也可以用 docker-compose​ 安装,将下面的内容保存为 docker-compose.yml​ 文件

    version: '3'
    
    services:
      rediary:
        image: need4swede/portall:latest
        container_name: portall
        restart: unless-stopped
        ports:
          - 8855:8080
        volumes:
          - ./data:/app/instance
        environment:
          - PORT=8080
          - SECRET_KEY=<your_secret_key>
    

    然后执行下面的命令

    # 新建文件夹 portall 和 子目录
    mkdir -p /volume1/docker/portall/data
    
    # 进入 portall 目录
    cd /volume1/docker/portall
    
    # 将 docker-compose.yml 放入当前目录
    
    # 一键启动
    docker-compose up -d
    

    运行

    在浏览器中输入 http://群晖IP:8855​ 就能看到主界面

    自托管端口管理系统Portall

    Add IP​ 添加 IP address

    自托管端口管理系统Portall

    加个描述

    自托管端口管理系统Portall

    Generate​ ,会随机生成了一个端口

    自托管端口管理系统Portall

    Settings​ –> General​ ,点 Save​ 将这个地址保存为缺省的 IP

    自托管端口管理系统Portall

    Ports​ 会看到之前生成的端口

    自托管端口管理系统Portall

    +​ 号可以添加一些之前已经使用的端口

    自托管端口管理系统Portall

    添加完成之后

    自托管端口管理系统Portall

    官方的动图更直观

    自托管端口管理系统Portall

    参考文档

    need4swede/Portall: Port Management Interface
    地址:https://github.com/need4swede/Portall

    Introducing Portall: A Self-Hosted Port Management System : r/selfhosted
    地址:https://www.reddit.com/r/selfhosted/comments/1dyack6/introducing_portall_a_selfhosted_port_management/

    17%

  • Unveiling the Web Browser: Gateway to the World Wide Web

    Unveiling the Web Browser: Gateway to the World Wide Web

    Before delving into the intricacies of HTML and CSS, it's essential to pause and ponder a fundamental question: What is a browser?

    In the digital landscape, a browser serves as the gateway to the vast expanse of the World Wide Web. Whether you're using Chrome, Firefox, Edge, Safari, Brave, or any other, the browser is the tool through which you interact with the wealth of information and services available online.

    Multiple Browsers, Same Principles

    The intriguing aspect lies in the fact that despite having numerous browsers, they all operate on similar principles. Chrome, Firefox, and others may have distinct features and appearances, but their core functionality remains consistent. This uniformity is attributed to the foundational concept that the Web is built on standards.

    The Power of Open Standards

    The Web, with its HTTP protocol, HTML, and associated technologies, is an open ecosystem. This openness means that anyone can participate, contribute, and even create their own browser. It's comparable to the open nature of Linux, where enthusiasts can craft their own distributions.

    • While creating a browser might be a formidable task, the openness of the Web allows for such possibilities.
    • This stands in contrast to closed platforms, like the operating system running on an iPhone, where creating a custom operating system is not feasible.

    The Browser in Action

    Here is where the magic flows, let's detail the 2 most important aspects of every web browser:

    How web browsers works

    Every browser, whether on your computer or phone, shares a familiar interface. They enable you to enter a URL, the address of a resource on the Web, initiating the journey to retrieve information. Despite the diversity of browsers, the commonality in their appearance and functionality stems from adhering to open standards.

    The Significance of URLs

    In the upcoming lesson, we'll delve into one of the core building blocks of the Web: URLs (Uniform Resource Locators). Understanding how URLs function is essential, as they play a pivotal role in navigating and accessing resources on the Web.

    As we continue our exploration, keep in mind the collaborative and open nature of the Web, fostering innovation and participation from individuals and communities worldwide. The browser, your virtual window to the digital realm, serves as a testament to the power of open standards in shaping our online experiences. Stay tuned for a deeper dive into the world of URLs in the next lesson.