Browse Source

Update 'README.md'

toomanysugar 3 years ago
parent
commit
0a131ec448
1 changed files with 114 additions and 23 deletions
  1. 114 23
      README.md

+ 114 - 23
README.md

@@ -1,24 +1,115 @@
+## About
 
-**Progress**
-
-- [x] AppSettings.cs - settings.go
-- [x] DataUpdater.cs Updater in main.go
-- [x] EFDatabase.cs - Not needed: analog - models.go
-- [x] JsonDownloader.cs - unmasrshal_url.go
-    - [x] JsonCurrentStats.cs - in api_structs.go
-    - [x] JsonNetworkStats.cs - in api_structs.go
-    - [x] JsonPayouts.cs - in api_structs.go
-    - [x] JsonWorker.cs - in api_structs.go
-- [x] Logger.cs
-- [ ] Program.cs 
-	- [x] Main - Fully ported needs testing
-	- [x] BotOnMessage
-	- [x] GetActualRate
-	- [x] GetActualData
-	- [x] GetActualDataFromDatabase
-	- [x] AddUser
-	- [x] SetWallet
-    - [x] DeleteUser
-	- [x] SendHelp
-    - [x] GetLastPayout
-- [x] UpdateData.cs - Fully ported needs testing
+  GoEthemineTelegramBot is attempt to port [EthemineTelegramBotCore](https://gogs.veloe.link/Veloe/EthemineTelegramBotCore) into Golang.
+
+### Why?
+   - For ease of maintain project further with backward compatibility with EthemineTelegramBotCore to use the same MySQL database.
+   - Creating simple and easy to use docker or potman container for fast deployment
+   - Practice in work with Go
+
+
+### Progress
+
+#### Face to face porting
+
+ - [x] AppSettings.cs - settings.go
+ - [x] DataUpdater.cs Updater in main.go
+ - [x] EFDatabase.cs - Not needed: analog - models.go
+ - [x] JsonDownloader.cs - unmasrshal_url.go
+   - [x] JsonCurrentStats.cs - in api_structs.go
+   - [x] JsonNetworkStats.cs - in api_structs.go
+   - [x] JsonPayouts.cs - in api_structs.go
+   - [x] JsonWorker.cs - in api_structs.go
+   - [x] Logger.cs
+   - [x] Program.cs 
+ - [x] Main - Fully ported needs testing
+   - [x] BotOnMessage
+   - [x] GetActualRate
+   - [x] GetActualData
+   - [x] GetActualDataFromDatabase
+   - [x] AddUser
+   - [x] SetWallet
+   - [x] DeleteUser
+   - [x] SendHelp
+   - [x] GetLastPayout
+   - [x] UpdateData.cs - Fully ported needs testing
+
+
+## Usadge
+	
+  As for now where are no releases for GoEthemineTelegramBot, so to run it you need to compile it by yourself. It's easy you will see.
+  
+### Compiling from source
+
+   Simply run following commands depending on your OS in project's root directory: 
+  	
+#### Linux/Mac
+
+`# go build .`
+
+
+#### Windows
+
+`> go build . -o GoEthemineTelegramBot.exe`
+
+
+### First launch
+
+   As for first launch you dont need to specify anything, just start the bot:
+
+#### Linux/Mac 
+    
+`# .`
+
+#### Windows
+
+`> GoEthemineTelegramBot.exe`
+
+
+   GoEthemineTelegramBot will generate config template `config.json` in its working directory. With this stucture: 
+   
+    {
+      "Token": "",
+      "ApiUrl": "",
+      "DbHost": "",
+      "DbName": "",
+      "FullLogPath": "",
+      "ErrorLogPath": "",
+      "Currency": ""
+    }
+
+   Fill the brackets with settings suitable for you.
+   Example:
+
+    {
+      "Token": "idontsayyoumytopsecrettelegrambottokennever",
+      "ApiUrl": "https://api.ethermine.org",
+      "DbHost": "127.0.0.1",
+      "DbName": "telegrambotdb",
+      "FullLogPath": "logs\full.log",
+      "ErrorLogPath": "logs\error.log",
+      "Currency": "ETH"
+    }
+
+##### Note
+
+   Make sure to create schema with right* tables at your server: GoEthemineTelegramBot can't create or check if tables structure right or not on it's own ... for now!
+ 
+   *I will not say you what is right
+
+### Normal launch 
+
+  After launch GoEthemineTelegramBot will ask you for username and password for specified database. You can skip it by launching it with arguments like this:
+
+#### Linux/Mac
+    
+`# . username password`
+
+#### Windows
+
+`> GoEthemineTelegramBot.exe username password`
+
+
+### Stopping bot
+
+   I will not stop you from stopping bot with Ctrl+C. But I should say that you could stop bot by pressing Enter. I never stop the bot this way thou.