-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Castaway/update docs for bot #29
Open
castaway
wants to merge
2
commits into
master
Choose a base branch
from
castaway/update_docs_for_bot
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+98
−4
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,8 @@ Technologies | |
|
||
* Barclayscrape - Pull current transactions from a Barclays bank account | ||
|
||
* Telegram::Bot::Brain - A Mojo based module to create a Telegram bot. | ||
|
||
INSTALL | ||
------- | ||
|
||
|
@@ -52,26 +54,59 @@ INSTALL | |
|
||
* Checkout this git repo, cd into the repo directory. | ||
|
||
* Install dependencies for this system: carton install --cached | ||
* Install dependencies for this system: carton install --deployment | ||
|
||
CONFIGURATION | ||
------------- | ||
|
||
Create a file *accesssystem_api.conf*, using *accesssystem_api.conf.example* as a template. This is an Apache style config file. | ||
|
||
Main things to add/edit: | ||
|
||
* dsn, user, password - Database connection string, see (https://metacpan.org/pod/DBI)[DBI docs] for details. | ||
* cc - for emails, add yours here for testing emails (else they are CC'd to [email protected]) | ||
* namespace - if running this not in a / path, add the proxied path here | ||
* OneAll - logins for the /profile etc pages, details from your oneall account | ||
|
||
RUN | ||
--- | ||
|
||
This respository contains two pieces of software, the first is a thin layer over (https://metacpan.org/pod/RapidApp)[RadpiApp]. To run this, use the script: | ||
This respository contains two main pieces of software, the first is a thin layer over (https://metacpan.org/pod/RapidApp)[RadpiApp]. To run this, use the script: | ||
|
||
carton exec perl script/accesssystem_server.pl --port 3001 | ||
CATALYST_HOME=$PWD carton exec perl script/accesssystem_server.pl --port 3001 | ||
|
||
Which will start a service on http://localhost:3001/admin | ||
|
||
To run the API, use the script: | ||
|
||
carton exec perl script/accesssystem_api_server.pl --port 3000 | ||
CATALYST_HOME=$PWD carton exec perl script/accesssystem_api_server.pl --port 3000 | ||
|
||
Which will start a service on http://localhost:3000/ | ||
|
||
NB: There is no index page on the API server, see below for details | ||
|
||
Telegram bot | ||
------------ | ||
|
||
To run the telegram bot, you will need to contact @BotFather on telegram and setup your own test bot, it will give you an API key. | ||
|
||
The bot does not require Catalyst or RapidApp, it does require two config files: | ||
|
||
* accesssystem_api.conf - the Model::AccessDB section | ||
* keys.conf - create a keys.conf with the following: | ||
|
||
<Telegram::Bot> | ||
api <yourbotapikey> | ||
</Telegram::Bot> | ||
|
||
Currently the bot requires a patch/branch of the Telegram::Bot::Brain code, checkout (or clone and checkout) the following repository/branch: | ||
|
||
git clone [email protected]:castaway/Telegram-Bot.git | ||
cd Telegram-Bot | ||
git checkout castaway/implement_callback_queries | ||
|
||
To run: BOT_HOME=$PWD carton exec perl -I <path to checkout>/lib script/access_telegram.pl | ||
|
||
API/UI | ||
------ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
<Model::AccessDB> | ||
<connect_info> | ||
dsn dbi:SQLite:db/test.db | ||
# dsn dbi:Pg:database=mydb;host=localhost;port=1234 | ||
# user XXX | ||
# password YYY | ||
</connect_info> | ||
</Model::AccessDB> | ||
<HTML::FormHandlerX::Field::noCAPTCHA> | ||
site_key 6LdHZx0TAAAAAMuUdG-NScgCCbJ_HMyL1bdeM9vp | ||
secret_key 6LdHZx0TAAAAAEAnQyttqqhDkEVXfUcsnDLPGmvi | ||
</HTML::FormHandlerX::Field::noCAPTCHA> | ||
<emails> | ||
cc [email protected] | ||
</emails> | ||
<Controller::Root> | ||
namespace accesssystem | ||
</Controller::Root> | ||
<OneAll> | ||
subdomain <yourdomain> | ||
domain <yourdomain>.api.oneall.com | ||
public_key <yourpubkey> | ||
private_key <yourpriavtekey> | ||
callback_url <yourdomain>/accesssystem/oneall_login_callback | ||
</OneAll> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should public docs contain anything about people's money?