kr-newbie 활성화를 위한 랜덤봇 코드와 실행 방법steemCreated with Sketch.

in #kr-newbie7 years ago

안녕하세요.
@jongeun 입니다.

kr-newbie 활성화를 위한 랜덤봇 코드와 실행 방법에 대해 포스팅하겠습니다.
랜덤봇의 기능은 1개 입니다.

4시간 마다 kr-newbie 태그로 작성된 글 중에서 팔로워 수가 가장 적은 작성자님의 포스트에 50~100% 보팅 파워로 보팅

대략 아래 스크린샷과 같은 모습입니다.

구현된 코드는 아래 링크에서 확인할 수 있습니다.
https://github.com/jongeunpark/node-steemit-voting-bot

혹시 직접 돌려보고 싶으신 분들은 아래 메뉴얼을 참조해주세요.

1. 설치

$ git clone https://github.com/jongeunpark/node-steemit-voting-bot.git
$ cd node-steemit-voting-bot/
$ npm install

명령어가 정상적으로 기입이 완료되면, 아래 스크린샷과 같이 npm가 필요한 모듈을 내려받습니다.

2. 설정 파일 수정

설치가 완료되면, 2가지 설정 파일을 수정해야 합니다. 설정 파일은 node-steemit-voting-bot/config 아래에 있는 2파일 입니다.

  • user.json: 보팅 및 리플을 작성할 사용자 정보
  • config.json: 보팅 파워, 폴링 주기

각 파일 속성 값

user.json

$ vi configs/user.json
{
    "name": "YOUR_NAME",
    "password": "YOUR_PASSWORD"
}

name: 사용자 계정으로 jongeun 과 같은 값을 입력합니다.
password: 사용자 비밀번호로 로그인 시 사용되는 비밀번호 입니다.

config.json

{
    "monitoringPeriod": 14400,
    "minVotingPower": 50,
    "maxVotingPower": 100,
    "tag":"kr-newbie"
    "introductionLink: "https://steemit.com/kr/@jongeun/1-sbd",
    "lastVotingTimestamp": 1498888335000
}
  • monitoringPeriod: 특정 태그의 최신 포스트 목록을 조회하는 주기로 단위는 초입니다.
  • minVotingPower: 최소 보팅 파워값으로 단위는 % 입니다.
  • maxVotingPower: 최대 보팅 파워값으로 단위는 % 입니다.
  • tag: 태그
  • introductionLink: 리플에 기입되는 링크
  • lastVotingTimestamp: 마지막 보팅 시간입니다. 마지막 보팅 시간을 기준으로 보팅 여부를 판단합니다. 초기에는 -1로 설정하거나 현재 시간으로 입력하세요. 프로그램이 동작하면서 보팅이 완료되면 변경되는 값입니다.

3. 실행

$ node voting-bot.js
$ nohup node voting-bot.js %

백그라운로 동작시키리면 위의 명령어를 실행하세요.

이상으로 kr-newbie 활성화를 위한 랜덤봇 코드와 실행 방법에 대한 포스팅을 마치겠습니다.
이 글을 100% 스팀파워 업 보상 글입니다.

Sort:  

감사합니다! 연습 한번 해봐야겠어요

좋은 자료 감사합니다.

Congratulations @jongeun! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

저도 아직 가입한지 얼마안되서인지 가끔 봇 분(?)들이 찾아오시더라고요 ㅋㅋ 이런거였군요 ㅎㅎ 신기하네요

감사합니다 한번 해봐야겠네요.