screenshot
install
Prompt: Pro is recommended if you want complete functions; However, Pro is not necessary, Air can also, but Air cannot send pictures, and some functions will be limited, but it can meet the basic use.
#CentOS 6 rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum update -y yum -y install docker-io service docker start chkconfig docker on #CentOS 7、Debian、Ubuntu curl -sSL https://get.docker.com/ | sh systemctl start docker systemctl enable docker
#Install Cool Q Air Turing docker run --name wine-coolq -d \ -v /coolq:/home/user/coolq \ -p 9000:9000 \ -p 6700:6700 \ -e VNC_PASSWD=moerats \ richardchien/cqhttp #Install Cool Q Pro Turing docker run --name wine-coolq -d \ -v /coolq:/home/user/coolq \ -p 9000:9000 \ -p 6700:6700 \ -e VNC_PASSWD=moerats \ -e COOLQ_URL= https://dlsec.cqp.me/cqp-tuling \ richardchien/cqhttp
-PMap the internal Web running port 9000 to the external 9000, and you can modify the port yourself. -V maps the internal cool Q and its data folder/home/user/coolq to the external/coolq folder, and you can modify the path yourself. -E VNC_PASSWD is the VNC password. Note that the password cannot exceed 8 characters. The default is MAX8char.
rm -rf /coolq/app/io.github.richardchien.coolqhttpapi/config/general.ini
#CentOS 6 iptables -I INPUT -p tcp --dport 9000 -j ACCEPT service iptables save service iptables restart #CentOS 7 firewall-cmd --zone=public --add-port=9000/tcp --permanent firewall-cmd --reload
#Pay attention to this operation every time a new QQ number login robot is replaced 1. Find the configuration file according to the path in the format of QQ No. json 2. Edit the configuration file and change false after use_ws to true #If you don't want to bother, you can use the command to modify it directly on the ssh client. The command is as follows: sed -i 's#"use_ws": false#"use_ws": true#g' /coolq/app/io.github.richardchien.coolqhttpapi/config/*.json
#Debian/Ubuntu system curl -sL https://deb.nodesource.com/setup_10.x | bash - apt install -y git nodejs #CentOS system curl -sL https://rpm.nodesource.com/setup_10.x | bash - yum install nodejs git -y
#Pull Item git clone https://github.com/Tsuk1ko/CQ-picfinder-robot.git cd CQ-picfinder-robot #Copy Profile cp config.default.json config.json #Installation dependency npm i #Install pm2 npm install -g pm2
#Do not copy the following configuration file directly. JSON does not allow comments, but only for reference { //Please refer to https://github.com/momocow/node-cq-websocket/blob/master/docs/api/CQWebSocket.md#cqwebsocketoption "host": "127.0.0.1", "port": 6700, "enableAPI": true, "enableEvent": true, "access_token": "", "reconnection": true, "reconnectionAttempts": 10, "reconnectionDelay": 5000, //The following starts with the configuration of the image search robot "picfinder": { "Debug": false,//Debug mode. When enabled, the returned text of each query will be output on the console "Admin": - 1,//Specify the manager QQ, please be sure to set "AutoAddFriend": false,//Automatically agree to the friend application (if false, it will be ignored, but will not be rejected) "AddFriendAnswers": [],//Answer the question and agree to the friend application (detailed explanation later "AutoAddGroup": false,//Automatically agree to the group membership application (false is the same as above, but you can use the command to manually allow it, which will be explained later) "SearchLimit": 30,//Limit the number of searches per user per day //Repeater "repeat": { "Enable": true,//switch "Times": 3,//When it is detected that a group has made the same speech for so many times, it will be likely to participate in the re reading "Probability": 40,//repetition probability (percentage) "CommonProb": 0.1//Daily repetition probability (percentage) }, //Setu function "setu": { "Enable": false,//Whether to enable "AllowPM": true,//Allow private chat "PximgProxy": "",//Set the reverse proxy used when sending the setu. Details will follow "DeleteTime": 30,//It is automatically recalled so many seconds after sending (0 means no recall, the same below) "Cd": 600,//Use the cooling time (seconds). Each user is independent, and 0 means no cooling "Limit": 30,//Limit the number of times per user per day "WhiteGroup": [],//group whitelist (please fill in according to the json array format) "WhiteOnly": false,//only allowed for whitelist groups (independent of the above private chat use) "WhiteCd": 0,//The usage cooling time of whitelist groups "WhiteDeleteTime": 0//The recall time of the whitelist group }, //Instruction Regular Expression "regs": { //Enable image search mode "SearchModeOn": "Bamboo Search [Picture]", //Turn off image search mode "SearchModeOff": "[Thank you]+Bamboo", //Sign in "Sign": "I (. *) sign in", //setu "Setu": "(Bamboo. * [Send to]. * [Sese] [Picture]) | (-- setu)" }, //Reply "replys": { //Default Reply "Default": "I need to send pictures to help you find" _ (: 3 "" n Batch is supported! ", //In debug mode "Debug": "The maintenance upgrade is in progress and cannot be used temporarily. Sorry~", //When the number of personal searches reaches the maximum "PersonLimit": "The pictures you searched today are too hot! Take a break and search again tomorrow~", //When the search fails "Failed": "Search failure caused QAQ n It may be the server network explosion, please try again", //Sign in related "Sign": "Sign in successfully and give you 10 likes!", "Signed": "You have signed in today _ (: 3" ∠) _ ", //Enable image search mode "SearchModeOn": "Understand~Please send pictures! Batch is supported! N If you want to exit the search mode, please send" Thank you Bamboo ", //Image search mode has been enabled "SearchModeAlreadyOn": "You are already in the image search mode! NIf you want to exit the search mode, please send" Thank you Bamboo ", //Turn off image search mode "SearchModeOff": "You're welcome~", //Image search mode has been turned off "searchModeAlreadyOff": "にゃ~", //Setu cooling "SetuLimit": "Good, you should know how to control → _ →", //Setu request error "SetuError": "Thurto server explosion _ (: 3" ∠) _ ", //Other conditions for sending setu are not met "SetuReject": "Sorry, this function is temporarily closed _ (: 3" " }, //OCR (see "Additional Functions" for details) "ocr": { "Use": "ocr. space",//Select the OCR service to use "ocr.space": { "defaultLANG": "eng", "apikey": "" }, "baidubce": { "useApi": "accurate_basic", "apiKey": "", "secretKey": "" } }, //Tomorrow's Ark Public Recruitment Calculator (see "Additional Functions" for details) "akhr": { "Enable": false,//true "Ocr": "ocr. space"//Select the OCR service to use } }, //Database configuration (used to cache image search results) "mysql": { "Enable": false,//Whether to enable the cache function "Expire": 172800,//Cache time (seconds), default is two days (172800 seconds) "Host": "127.0.0.1",//Database address "Port": 3306,//port "Db": "",//Database name "User": "",//User name "Password": "",//Password "Expire": 172800//Cache time }, //Please do not move the Saucenao address unless you have guessed the meaning of this setting( "saucenaoHost": [ "saucenao.com" ], //The domain name of WhatAnime is the same as above "whatanimeHost": [ "trace.moe" ] }
#Run npm run pm2start #Stop npm run pm2stop #Restart npm run pm2restart #View Log npm run pm2log
use
#Private chat 1. Send pictures directly 2. See the description of image search mode below #Groups&Discussion Groups 1. @ Robot and send pictures 2. See the description of image search mode below (group limitation) 3. In particular, in the group, you can send statements that conform to the regular expression in the configuration to enter the image search mode. In the image search mode, all pictures sent will be searched even if they are not @. This function is usually used when the mobile phone cannot forward pictures @; In addition, please remember to exit the image search mode after entering the image search mode! #Multiple pictures can be included in the same message (for PC), and will be automatically searched in batches #When searching for pictures, you can include the following parameters in the message to specify the search scope or use a function. The parameters are mutually exclusive and the priority is from top to bottom 1. -- get url: Get the online link of the image (no image search) 2. -- a2d: use ascii2d to search (the advantage is that local graphs can be searched) 3. -- pixiv: Search from P station 4. -- danbooru: search from Danbooru 5. -- book: Search book 6. -- anime: search for dramas #If the similarity of the results obtained by saucenao is less than 60%, ascii2d will be automatically used for searching #If you find the book, it will automatically search in the nhentai and return the link (if there is a Chinese version, it will give priority to return the Chinese version link) #If you find drama, WhatAnime will be automatically used to search drama details 1. It is normal that the results of AnimeDB and WhatAnime may be inconsistent. After all, these are two different search engines 2. The purpose of both searches is to try to get the recognition results you may want
#The meaning of the image search mode is to facilitate mobile phone users to specify the search database when forwarding pictures or other inconvenient messages with @ or image search parameters #Send gallery keywords directly during private chat At this time, the next picture you send (only the next one, that is, one-time) will use the specified search base #Send a speech conforming to the configured regular expression in the group to enter the image search mode 1. At this time, all the pictures you send will be searched (full range search is used by default) 2. After sending the keywords of the gallery, all the pictures you send later will use the search gallery you specified 3. Please remember to exit the image search mode after each use. In the same way, it is also to send a speech that conforms to the regular expression in the configuration #Library keywords: 1. All: default full scope search mode 2. The following functions are the same as the search parameters described in "Daily Use" above pixiv danbooru book anime
#If "Allow anyone" is set in QQ, it will pass directly and KuQ cannot intervene #If "verification information is required" is selected, it is determined by the autoAddFriend setting item #If "need to answer the question correctly" is selected, whether it is decided by the other party's answer, KuQ cannot intervene #If "I need to answer the question and let me confirm" is selected, the judgment will be made when autoAddFriend is true and the addFriendAnswers array is not empty. Only when the answer of the other party is completely consistent with the setting of addFriendAnswers can we agree
#Please write the answers to the questions in order as the elements of the addFriendAnswers array, for example: "addFriendAnswers": [ "The answer to question one", "The answer to question two" ]
#If the group has invited robots before when the robots are running, the invitation will be directly agreed #If you have not invited before, the next invitation will be accepted #The above two operations are one-time
explain
#Why do you sometimes search for unwanted results? It should be noted that it takes time for the image search engine to find new images and collect them, so paintings just uploaded by painters are generally not available In addition, the pictures sent during image search must be exactly complete. Using the pictures in the following cases will result in no search results: 1. The partial image of the original image is used, that is, it is incomplete due to clipping. At this time, you can try to use the feature search function of ascii2d 2. The part of the picture covered by mosaic/picture mosaic is too large 3. The screenshot is not well cut, leaving a black edge. For example, in order to save trouble, you can directly use your mobile phone to take screenshots or manually frame and select screenshots on the computer. In this case, please edit and cut off the parts irrelevant to the picture 4 before searching 4. Picture with low definition
docker restart wine-coolq rm -rf /coolq/app/io.github.richardchien.coolqhttpapi/config/general.ini
Copyright notice: This is an original article, and the copyright belongs to Rat's Blog All, please indicate the source for reprinting!
Link to this article: https://www.moerats.com/archives/953/
If the tutorial needs to be updated, or 404 appears on the related link, you can leave a comment below the article.