PicList Documentation

repository·dev·Indexed 26 days ago

https://github.com/kuingsmile/piclist

A powerful cloud storage and image hosting management tool built on PicGo. PicList provides comprehensive cloud management, image processing tools for watermarking and compression, and a lightweight scripting system for automating image upload workflows. It supports integration with VSCode, Typora, and Obsidian, and offers a multi-layered API architecture (core, app, and gui) for developers.

Tokens
22.6K
Snippets
29
Records
194
Agent score
86%

What's inside PicList

  1. Understand the PicList API architecture

    dev

    PicList APIs are organized into three distinct layers based on their responsibility and dependency level:

    1. core: The lowest-level APIs. These are independent modules that do not depend on each other and serve as the foundation for higher-level APIs.
    2. app: High-level application interfaces. This layer provides essential functionality for the PicList application, such as the uploader, window management, the shortcut key system, and remote handlers.
    3. gui: The GuiApi layer, specifically designed for developers building PicList plugins to interact with the graphical user interface.
  2. Run PicList-core via Docker

    dev

    You can run the PicList-core server using Docker or Docker Compose. Replace ./piclist with your local path and piclist123456 with your desired secret key.

    Using docker run

    docker run -d \
      --name piclist \
      --restart always \
      -p 36677:36677 \
      -v "./piclist:/root/.piclist" \
      kuingsmile/piclist:latest \
      node /usr/local/bin/picgo-server -k piclist123456

    Using docker-compose

    Create a docker-compose.yml file with the following content:

    version: '3.3'
    
    services:
      node:
        image: 'kuingsmile/piclist:latest'
        container_name: piclist
        restart: always
        ports:
          - 36677:36677
        volumes:
          - './piclist:/root/.piclist'
        command: node /usr/local/bin/picgo-server -k piclist123456

    Then run:

    docker-compose up -d
  3. Run PicList via Docker

    dev

    You can run piclist-core using Docker or Docker Compose. First, pull the latest image:

    docker pull kuingsmile/piclist:latest

    Then run the container with the following command to start the server. Note that the -k flag sets the authentication key:

    docker run -d \
      --name piclist \
      --restart always \
      -p 36677:36677 \
      -v "./piclist:/root/.piclist" \
      kuingsmile/piclist:latest \
      node /usr/local/bin/picgo-server -k piclist123456
    docker run -d \
      --name piclist \
      --restart always \
      -p 36677:36677 \
      -v "./piclist:/root/.piclist" \
      kuingsmile/piclist:latest \
      node /usr/local/bin/picgo-server -k piclist123456
  4. Use the {ulid} placeholder for advanced renaming

    dev
    When configuring file renaming rules, you can now use the {ulid} placeholder. This allows you to include random ULID (Universally Unique Lexicographically Sortable Identifier) segments in your generated file names to ensure uniqueness and sortability.
  5. Add internationalization (i18n) support for the Main Process

    dev

    To add a new language to the Main Process:

    1. Create a new .yml language file under public/i18n/ (e.g., zh-Hans.yml). Use zh-CN.yml or en.yml as templates.
    2. Define the language display name using the LANG_DISPLAY_LABEL key within the .yml file.
    3. Register the new language in src/universal/i18n/index.ts. Set the label to the value of LANG_DISPLAY_LABEL from your file, and the value to the filename.
    4. If updating existing language files, run the i18n generation command to ensure definitions are updated.
    yarn i18n
  6. Integrate PicList with Markdown Editors

    dev

    PicList supports seamless integration with several popular editors:

    VSCode

    Install the VS-PicList extension.

    Typora

    • For version ≥ 1.6.0: Select PicList directly in the image settings.
    • For version < 1.6.0: Set "Upload Service" to "PicGo(app)" and point the path to the PicList executable file.

    Obsidian

    1. Install the Image Auto Upload Plugin.
    2. Set the default uploader to PicGo(app).
    3. Set the API address to: http://127.0.0.1:36677/upload
  7. Prepare and submit code changes

    dev

    Before submitting code, ensure all console.log statements, debugging code, and extra comments are removed. Use the Code Submission Specification Tool to prepare your submission by running the following command sequence:

    git add . && yarn cz