wxad-case-compress-cli

1.0.1 • Public • Published

https://www.npmjs.com/package/wxad-case-compress-cli

Node

node <= 16,发现 squoosh 只支持 node 16,不支持 18。

安装

nvm use 16
# 上传 cdn 需 luna
npm config set registry https://mirrors.tencent.com/npm/
# 安装 `npm i -g @squoosh/cli`。没有使用 `@squoosh/lib`,因为碰到了一些问题。
npm i -g @squoosh/cli
npm i -g wxad-case-compress-cli

使用

wxad-case-compress-cli compress example.json

示例 json

{
  "likes": [],
  "comments": [],
  "crt_info": [
    {
      "first_comment": "与#Prada普拉达 一同步入徽州呈坎古镇,寻觅浪漫。",
      "social_info": {
        "cheer_text": "心动",
        "cheer_text_type": "SOCIAL_CHEER_TEXT_TYPE_HEART",
        "pag_animation_url": "",
        "pag_animation_md5": "",
        "cheer_icon": "",
        "cheer_icon_dark": "",
        "pag_fireworks_url": "",
        "fireworks_brand_name": "",
        "fireworks_color": "",
        "fireworks_greeting_words": "",
        "fireworks_low_pag": "",
        "fireworks_pre_click_pag": "",
        "fireworks_video_cover_image_url": "",
        "fireworks_clicked_image_url": "",
        "tap_text": "",
        "heart_transition_low_pag": {
          "url": "http://wxsnsdy.wxs.qq.com/131/20210/snssvpdownload/SH/reserved/ads_svp_video__0b53vuaakaaapaaao3uv75tbvlieawwqabka.f0.pag?dis_k=9bee6c91cc1de2ea6f4939d2aefb15d0&dis_t=1721041621&m=d62fb75566ccee7d817787b1b9b7abac",
          "md5": "d62fb75566ccee7d817787b1b9b7abac",
          "height": 1280,
          "width": 720,
          "time_ms": 3000,
          "capture_url": "http://wxsnsdythumb.wxs.qq.com/141/20204/snscosdownload/SH/reserved/669502d70007dc3a1f999ca83561b01e0000008d00004eec?m=817fd4c08224b22a82da6a321a973849&ck=817fd4c08224b22a82da6a321a973849&sha256=8d87990e382233984665ac5dd058efa6b1071dd9c528c997b57ac51959fb6ee8"
        },
        "social_switch": true
      },
      "hi_light_card_list": [
        {
          "hi_light_card_type": "HI_LIGHT_CARD_TYPE_NORMAL",
          "hi_light_card_video": "11777204473",
          "hi_light_card_jump_info": {
            "page_spec": {
              "page_url": "https://ad.mmbiz.oa.com",
              "mini_program_spec": {
                "mini_program_id": "gh_7f5fffdb0473",
                "mini_program_path": "pages/product-list/product-list?subId=2251"
              },
              "override_canvas_head_option": "OPTION_CANVAS_OVERRIDE_CREATIVE"
            },
            "page_type": "PAGE_TYPE_MINI_PROGRAM_WECHAT",
            "landing_page_info": {
              "landing_page_type": "LANDING_PAGE_TYPE_WECHAT_MINI_PROGRAM"
            }
          },
          "hi_light_card_video_url": "http://adsmind.gdtimg.com/ads_svp_video__0b5334ahiaaakmactimpeftbvxyeotpqa5ca.f162002.mp4?dis_k=f0173076bbe16d382cced47c84e212cf&dis_t=1720671655&sha256=545d6821ed3a15f2847bb4627c4f1f3f3c52bda7a13d57b6a489a30a35de6468&m=bab628df84646f56a6102ea1812159a1",
          "hi_light_card_thumb_url": "http://adsmind.gdtimg.com/ads_svp_video__0b5334ahiaaakmactimpeftbvxyeotpqa5ca.f1162002_0.jpeg?dis_k=04fb7cea3d490e60199a3318250c49c4&dis_t=1720939518&sha256=dcad863e05cc5dc02ec7d8bbef814d0902bc1cf3fe0c44d5c2757bf78a391ff2&ck=e4d0e75d1fd88a7cc3e797ee1649d66a&m=e4d0e75d1fd88a7cc3e797ee1649d66a"
        },
        {
          "hi_light_card_type": "HI_LIGHT_CARD_TYPE_NORMAL",
          "hi_light_card_video": "11777221615",
          "hi_light_card_jump_info": {
            "page_spec": {
              "page_url": "https://ad.mmbiz.oa.com",
              "mini_program_spec": {
                "mini_program_id": "gh_7f5fffdb0473",
                "mini_program_path": "pages/product-list/product-list?subId=2245"
              },
              "override_canvas_head_option": "OPTION_CANVAS_OVERRIDE_CREATIVE"
            },
            "page_type": "PAGE_TYPE_MINI_PROGRAM_WECHAT",
            "landing_page_info": {
              "landing_page_type": "LANDING_PAGE_TYPE_WECHAT_MINI_PROGRAM"
            }
          },
          "hi_light_card_video_url": "http://adsmind.gdtimg.com/ads_svp_video__0b53dqabsaaa2yaejk4pz5tbuhaedeoaagka.f162002.mp4?dis_k=2da2b48d2654280f6fe2c769854ede49&dis_t=1720671734&sha256=2a643d41499c3e45ca0741611920bda1f76820272329f524240ed7881b8647e9&m=6ec3d71f79652a66f33f20281ca8a143",
          "hi_light_card_thumb_url": "http://adsmind.gdtimg.com/ads_svp_video__0b53dqabsaaa2yaejk4pz5tbuhaedeoaagka.f1162002_0.jpeg?dis_k=428940f8c226d0e0041ae4f8f1479011&dis_t=1720939560&sha256=91bb5f64118f5f0b27b898e5043d12774b6b33b0e4db978ac0a93523597e3a76&ck=ad499af5d3e8bb9923982e5ae37ac852&m=ad499af5d3e8bb9923982e5ae37ac852"
        },
        {
          "hi_light_card_type": "HI_LIGHT_CARD_TYPE_NORMAL",
          "hi_light_card_video": "11777232317",
          "hi_light_card_jump_info": {
            "page_spec": {
              "page_url": "https://ad.mmbiz.oa.com",
              "mini_program_spec": {
                "mini_program_id": "gh_7f5fffdb0473",
                "mini_program_path": "pages/product-list/product-list?subId=2251"
              },
              "override_canvas_head_option": "OPTION_CANVAS_OVERRIDE_CREATIVE"
            },
            "page_type": "PAGE_TYPE_MINI_PROGRAM_WECHAT",
            "landing_page_info": {
              "landing_page_type": "LANDING_PAGE_TYPE_WECHAT_MINI_PROGRAM"
            }
          },
          "hi_light_card_video_url": "http://adsmind.gdtimg.com/ads_svp_video__0b53leagqaaaj4admuupdbtbuwienbmqa2ca.f162002.mp4?dis_k=0cf1dba33b91561ea8663c08f1ae315e&dis_t=1720671823&sha256=f438ff678268f489cc26cf094a5cd5634c0c76943827cf93f3c838f7154ce862&m=833f66e758754485eb826d7c0982613b",
          "hi_light_card_thumb_url": "http://adsmind.gdtimg.com/ads_svp_video__0b53leagqaaaj4admuupdbtbuwienbmqa2ca.f1162002_0.jpeg?dis_k=f22b49775670e3afcd090bc6a659c88e&dis_t=1720939603&sha256=80abfac3fe7166bc08b3f962734080ec6d968522c44cf6dcd0a5dadaa0f1fc1f&ck=79bb363622fd9793d1cf758d2aa95249&m=79bb363622fd9793d1cf758d2aa95249"
        },
        {
          "hi_light_card_type": "HI_LIGHT_CARD_TYPE_STATUS",
          "hi_light_card_image": "11777261873",
          "hi_light_card_title": "相遇古镇\n定格七夕",
          "hi_light_card_sub_title": "Prada",
          "hi_light_card_color": "#DACDC5",
          "hi_light_card_signature_image": "11777260575",
          "hi_light_card_jump_info": {
            "page_spec": {
              "override_canvas_head_option": "OPTION_CANVAS_OVERRIDE_CREATIVE",
              "wechat_status_footer_spec": {
                "status_desc": "相遇古镇\n定格七夕",
                "image_id": "11777261873",
                "mini_program_spec": {
                  "mini_program_id": "gh_7f5fffdb0473",
                  "mini_program_path": "pages/product-list/product-list?subId=2251"
                },
                "page_type": "PAGE_TYPE_MINI_PROGRAM_WECHAT"
              }
            },
            "page_type": "PAGE_TYPE_WECHAT_STATUS_FOOTER",
            "landing_page_info": {
              "landing_page_type": "LANDING_PAGE_TYPE_WECHAT_STATUS_FOOTER"
            }
          },
          "hi_light_card_status_image_comp": "11791705257",
          "hi_light_card_image_url": "http://pgdt.gtimg.cn/141/20204/snscosdownload/SZ/reserved/6694dd2100007e611e3172bc4667bc1e0000008d00004eec?m=f65bf8c3b5c2141bbaa443fefe0dd913&ck=f65bf8c3b5c2141bbaa443fefe0dd913&sha256=94b82be7ab546b9981abec4e6475c3e3c6a53a918cfe6d0b53017b618b874b66"
        }
      ]
    }
  ],
  "last_modified_time": 1721048263,
  "adcreative_template_id": 2248,
  "crt_size": 2248,
  "nickname": "Prada普拉达",
  "headimg": "http://wx.qlogo.cn/mmhead/9UjCmequjUiba5AE25h3IP2aTSvAcrujwrEnDAkVZw0TA0G7yhS3xXibyWY1Qxibiav59pxehqKewJI/0",
  "title": "",
  "description": "Prada七夕古镇邂逅",
  "link_page_spec": {
    "page_id": 0,
    "page_url": ""
  },
  "head_click_spec": {
    "brand_app_id": "wx43a27052a8691d70",
    "header_title": "Prada普拉达",
    "head_url": "http://wx.qlogo.cn/mmhead/9UjCmequjUiba5AE25h3IP2aTSvAcrujwrEnDAkVZw0TA0G7yhS3xXibyWY1Qxibiav59pxehqKewJI/0"
  },
  "slide_end_jump_info": [
    {
      "page_spec": {
        "page_url": "https://ad.mmbiz.oa.com",
        "mini_program_spec": {
          "mini_program_id": "gh_7f5fffdb0473",
          "mini_program_path": "pages/product-list/product-list?subId=2251"
        },
        "override_canvas_head_option": "OPTION_CANVAS_OVERRIDE_CREATIVE"
      },
      "page_type": "PAGE_TYPE_MINI_PROGRAM_WECHAT",
      "landing_page_info": {
        "landing_page_type": "LANDING_PAGE_TYPE_WECHAT_MINI_PROGRAM"
      }
    }
  ],
  "show_first_comment": 1,
  "isChannelsLiveRoom": false,
  "isChannelsLiveReserve": false,
  "dataSource": ""
}

Readme

Keywords

none

Package Sidebar

Install

npm i wxad-case-compress-cli

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

33.1 kB

Total Files

7

Last publish

Collaborators

  • aragakki