Giter Club home page Giter Club logo

autobump's Introduction

autobump

A simple Autobot to bump your inactive threads once in 24 hours on BitcoinTalk. I have seen some service providers(Decepticons) on BitcoinTalk who provide this service. But, Personally, I think the costs of those services are not worth for the actual service. It is very simple bot and why not to give for free?

So does this repo born. An opensource to auto-bump your inactive threads. If you can contribute, well, you're always welcome to the community ;)

Oh, here is my BitcoinTalk link to contact me. Let me know what you think ;D

Get Started

  1. Download/Clone this repo.
  2. Configure data
  3. Add Threads
  4. Add cron on your server to run cron.php with duration on your preference.

Version

Well. Let's say this is version 0.0, shall we? That's bad, what happened to professionalism?

So,

  1. 0.1(beta)
  2. 0.2(beta)

Configure Data

All configure-able data are available in data.json file.

Sample config looks like

 {
     "file": "data.json",
     "settings": {
         "username": "bitcointalk username",
         "password": "base64 encoded password",
         "cookieLength": "-1",
         "msgToPost": "BUMP"
     },
     "messages": {
       "isFolder":true|false,
       "folder":"Absolute path of the folder of text files",
       "texts":[
        "Message 1",
        "Message 2",
        "Message 3",
        "Message 4"
       ]
     },
     "threads": [{
         "url": "url to your thread"
     }]
 }

Username and Password

Under settings add you username and password to your BitcoinTalk account. And beware, you must add your password as Base64 Encoded. You can do that here!

Threads

I think you have guessed how to add threads to data.json file.

No? FINE

Each thread should be a json object, like:

{
 "url":"url to your thread"
}

Add this thread object to the threads array on data.json file.

"threads": [
 {
   "url": "Your thread URL"
 },{
   "url": "Your second thread URL"
 }
]

Message to Post on Thread

From the version 0.2, you can add Custom Message to post to the thread. Don't worry if you have older version data file, it'll defaultly take the BUMP message from the Settings object. Well, if you want some custom message to post to your thread instead of BUMP, you can easily do that in previous version too, by using "msgToPost" variable available in "settings" object. But, you can give only string. I just think, it'd be cool if you can post some different message to different thread of yours. It's boring to post same message to all threads, eh! BUMP!! BUMP!! BUMP!! aaaaahh. ** Alright, let's get to the point.**

"messages": {
 "isFolder":true|false,
 "folder":"Absolute path of the folder of text files",
 "texts":[
  "Message 1",
  "Message 2",
  "Message 3",
  "Message 4"
  ]
}

"isFolder": can contain either TRUE or FALSE. Tells the system whether text is available as files in a folder.

"folder": Absolute path of the folder where all files exist.

"texts": This is a backup system. If folder fails or you don't want to create numerous files with large texts, you can use this function to provide a array of string with messages.

Okay. The system works like:

  1. It checks for the "isFolder" for true. If it's true, then read the files from the given "folder".
  2. If above condition is false, then it'll look into "texts" array to fetch all give strings(messages).
  3. If above two condition fails, it'll take the default message "msgToPost" from "settings" object.

From the available options taken above, system will take any one randomly to post reply to the given thread.

Adding Cron Job

Adding cron job differes on each Operating System and Hosting providers.

Aah.. you get the point and search according to your situation.

License

This repo is being provided under MIT and you can find the License here.

Donation!

I think you forgot what you read up! This is opensource. Well, Donation? Sorry, NOT ACCEPTED(hehe).

Credits

I'll add all people who contributed to this repo.

autobump's People

Contributors

blackout314 avatar buxlover avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autobump's Issues

Error when running script twice successively with new account

If you use a new bitcointalk account with still very low activity count for bumping, and let's say you have 2 threads so you want to bump both threads one after another, then an error message is thrown.

Error:

Notice: Undefined variable: posts in C:\Users\Administrator\Desktop\UniServerZ\www_bump\functions.php on line 260
Putting Bump

Notice: Undefined offset: -1 in C:\Users\Administrator\Desktop\UniServerZ\www_bump\functions.php on line 113

Fatal error: Uncaught Error: Call to a member function find() on null in C:\Users\Administrator\Desktop\UniServerZ\www_bump\functions.php:115 Stack trace: #0 C:\Users\Administrator\Desktop\UniServerZ\www_bump\functions.php(242): getPosts('<!DOCTYPE html ...', 'https://bitcoin...', true) #1 C:\Users\Administrator\Desktop\UniServerZ\www_bump\cron.php(29): bumpIt(Resource id #6, 'https://bitcoin...') #2 {main} thrown in C:\Users\Administrator\Desktop\UniServerZ\www_bump\functions.php on line 115

I guess because new accounts have a limit regarding post requests.
If you post in a thread and want to post in another thread right after, it says on the Bitcointalk website that you have to wait 360 seconds before next post.
I think that this might have something to do with why the error message comes up but I'm not sure.
Either way, it would be good if that error can be caught and you print out nothing or simple message to user.

Script not working correctly with (at least?) 2 threads

I have modified the data.json as described.

Excerpt of data.json:

"threads": [{
"url": "https://bitcointalk.org/index.php?topic=1XXXXXX"
},{
"url": "https://bitcointalk.org/index.php?topic=1XXXXXX"
}]

So my setup is:

  • 2 threads
  • new account for bumping (<10 activity)

The procedure I did:

  1. run:
    -> data.json UNCHANGED
    -> 1. thread: bump
    -> 2. thread: no bump
    => bump behavior is correct but data.json was not modified somehow

WAIT 7 minutes (new accounts need to wait 360 secs between each post, I waited 7 mins just to be sure)

  1. run:
    -> data.json CHANGED
    -> 1. thread: no bump (initial bump from 1. run ofc is still there) + lastActivityAt
    -> 2. thread: bump + lastActivityAt + lastBumpURL
    => data.json changed accordingly now except lastBumpUrl for 1. thread is missing
  2. run:
    -> data.json UNCHANGED
    -> 1. thread: last post >24h
    -> 2. thread: last post <24h
    => Script runs, nothing happens, no bumps
  3. run:
    -> data.json UNCHANGED
    -> 1. thread: last post >24h -> bump
    -> 2. thread: last post >24h -> no bump
    => still no lastBumpURL on 1. thread, therefore ofc 1. bump was not deleted

So the thing is...

  1. the lastBumpUrl is not being added to the 1. thread for unknown reason. And because of that it does not delete the old bumps from the 1. thread.
  2. from the 3. run, we can see that the script somehow does not bump to the 1. thread even though the last post is older than 24 hours. According to the script, it should have bumped the first thread independent of the 2. thread. But somehow it first bumps when both threads are 'bumpable'.

Just wanted to report my issues. Technically, for each thread I can run one instance of the script to avoid this whole issue but yeah, just wanted to report the issue.
Unfortunately, I cannot reproduce this with 3, 4, ... threads cause I only have 2 threads.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.