xvfeng
V2EX  ›  Node.js

nodejs命令行下截图工具,上传至imgur生成远程地址供论坛或聊天地址分享

  •  
  •   xvfeng · Sep 19, 2013 · 4899 views
    This topic created in 4621 days ago, the information mentioned may be changed or developed.
    有的论坛或者聊天工具不支持图片上传,无法分享图片。于是自己写了一个在命令行下上传图片的工具,可以指定图片路径生成绝对地址,或者直接给某个网页地址截图并上传至imgur服务器。

    **安装方法**: `npm install usib -g`

    **主要功能**:

    * usib -k cca0e9d41a2d7c7 设置imgur api_key key
    * usib -c http://v2ex.com 所给参数地址截图并保存至本地 capture
    * usib -c http://v2ex.com -p ./v2ex.png 保存至参数所给路径 capture & path
    * usib -u ./caonima.png 上传本地图片至远程服务器 upload
    * usib -a http://v2ex.com 截图并上传 capture and path

    **依赖模块**:

    * [phantomjs](http://phantomjs.org/download.html) `brew update && brew install phantomjs`
    * [imgur api_key](https://imgur.com/register/api_anon) set the imgur client_id

    **范例:**:
    ![v2ex]()
    3 replies    1970-01-01 08:00:00 +08:00
    zhwei
        1
    zhwei  
       Sep 20, 2013 via Android
    imgur间歇性被q
    xvfeng
        2
    xvfeng  
    OP
       Sep 20, 2013
    @zhwei 被q?
    ushuz
        3
    ushuz  
       Sep 20, 2013
    @xvfeng
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   935 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 19:40 · PVG 03:40 · LAX 12:40 · JFK 15:40
    ♥ Do have faith in what you're doing.