1.8.7 • Published 11 days ago

piclist v1.8.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

PicList-Core

standard GitHub node

picgo-core

A tool for picture uploading. Both CLI & api supports. It also supports plugin system, please check Awesome-PicGo to find powerful plugins.

Based on Picgo-Core and add more features.

Typora support natively.

New Features

  • Add watermark, compress and convert image format features
    • Set watermark and compress parameters through picgo set buildin watermark and picgo set buildin compress under CLI command
    • Image processing is beforeTransform, which does not conflict with any plugin
  • Add support for advanced rename, you can set the rename rule through picgo set buildin rename under the CLI command
  • Add new built-in picbed: WebDAV, SFTP, Local path
  • Adds support for imgur account uploads
  • Built-in server just like PicList-Desktop server, you can use picgo-server to start the server
  • Fix several bugs of PicGo-Core

Installation

PicList should be installed with node.js >= 16

before install

As PicList depends on sharp, you need to install sharp before install PicList.

npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"
npm install sharp

Global install

npm install piclist -g

# or

yarn global add piclist

Local install

npm install piclist -D

# or

yarn add piclist -D

Usage

Docker

You can use docker to run PicList-Core.

docker run

Change the ./piclist to your own path, this path is where you put your config.json file, and change the piclist123456 to your own secret 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-compose

download docker-compose.yml from this repo, or copy the following content to docker-compose.yml:

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

You can change the ./piclist to your own path, this path is where you put your config.json file, and change the command to your own secret key.

Then run:

docker-compose up -d

Server

You can use picgo-server to start a server, default port is 36677.

Start server:

picgo-server
node ./bin/picgo-server

It's highly recommended to add --key to avoid unauthorized access. Example: picgo-server --key 123456

Show help:

$ picgo-server -h

  Usage: picgo-server [options]

  Options:

    -h, --help          Print this help message
    -c, --config        Set config path
    -p, --port          Set port, default port is 36677
    --host              Set host, default host is 0.0.0.0
    -k, --key           Set secret key to avoid unauthorized access
    -v, --version       Print version number

  Examples:
    picgo-server -c /path/to/config.json
    picgo-server -k 123456
    picgo-server -c /path/to/config.json -k 123456

endpoints

  • /upload?picbed=xxx&key=xxx upload picture, picbed to set pic-bed, key to set secret key
  • /heartbeat heartbeat

Use in CLI

PicList-Core uses SM.MS as the default upload pic-bed.

Show help:

$ picgo -h

  Usage: picgo [options] [command]

  Options:

    -v, --version                 output the version number
    -d, --debug                   debug mode
    -s, --silent                  silent mode
    -c, --config <path>           set config path
    -h, --help                    output usage information

  Commands:

    install|add <plugins...>             install picgo plugin
    uninstall|rm <plugins...>            uninstall picgo plugin
    update <plugins...>                  update picgo plugin
    set|config <module> [name]           configure config of picgo modules
    upload|u [input...]                  upload, go go go
    use [module]                         use modules of picgo
    init [options] <template> [project]  create picgo plugin\'s development templates

Upload a picture from path

picgo upload /xxx/xx/xx.jpg

Upload a picture from clipboard

picture from clipboard will be converted to png

picgo upload

Use in node project

Common JS

const { PicGo } = require('piclist')

ES Module

import { PicGo } from 'piclist'

API usage example

const picgo = new PicGo()

// upload a picture from path
picgo.upload(['/xxx/xxx.jpg'])

// upload a picture from clipboard
picgo.upload()

Documentation

For more details, you can checkout documentation of PicGo-Core.

1.8.7

11 days ago

1.8.6

12 days ago

1.8.5

23 days ago

1.8.4

23 days ago

1.8.3

29 days ago

1.8.2

1 month ago

1.8.1

1 month ago

1.7.14

1 month ago

1.8.0

1 month ago

1.7.13

1 month ago

1.7.12

2 months ago

1.7.11

2 months ago

1.7.10

3 months ago

1.7.9

3 months ago

1.7.8

3 months ago

1.7.7

4 months ago

1.7.6

4 months ago

1.7.5

4 months ago

1.7.4

4 months ago

1.7.3

4 months ago

1.7.2

4 months ago

1.7.1

4 months ago

1.7.0

4 months ago

1.6.9

4 months ago

1.6.8

5 months ago

1.2.0

7 months ago

1.6.4

6 months ago

1.6.3

7 months ago

1.6.2

7 months ago

1.6.1

7 months ago

1.6.0

7 months ago

1.2.2

7 months ago

1.2.1

7 months ago

1.3.9

7 months ago

1.3.8

7 months ago

1.6.7

5 months ago

1.6.6

6 months ago

1.6.5

6 months ago

1.3.7

7 months ago

1.3.6

7 months ago

1.3.5

7 months ago

1.3.4

7 months ago

1.3.3

7 months ago

1.3.2

7 months ago

1.3.1

7 months ago

1.3.0

7 months ago

1.0.2

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

0.8.9

9 months ago

1.0.1

8 months ago

0.8.8

9 months ago

1.0.0

8 months ago

0.8.5

9 months ago

0.6.7

12 months ago

0.8.4

9 months ago

0.8.7

9 months ago

0.6.9

10 months ago

0.8.6

9 months ago

0.6.8

11 months ago

0.7.2

10 months ago

0.7.1

10 months ago

0.7.4

10 months ago

0.9.1

8 months ago

0.7.3

10 months ago

0.7.0

10 months ago

0.7.9

9 months ago

0.7.6

10 months ago

0.7.5

10 months ago

0.7.8

9 months ago

0.7.7

10 months ago

0.8.12

9 months ago

0.8.11

9 months ago

0.8.14

8 months ago

0.8.13

8 months ago

0.8.10

9 months ago

0.8.1

9 months ago

0.8.0

9 months ago

0.8.3

9 months ago

0.8.2

9 months ago

0.6.6

12 months ago

0.6.3

12 months ago

0.5.4

12 months ago

0.6.2

12 months ago

0.5.3

1 year ago

0.6.5

12 months ago

0.6.4

12 months ago

0.5.5

12 months ago

0.6.1

12 months ago

0.5.2

1 year ago

0.6.0

12 months ago

0.5.1

1 year ago

0.5.0

1 year ago

0.3.3

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago