Coder Social home page Coder Social logo

dzarlax / evernote-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from djudman/evernote-telegram-bot

0.0 0.0 0.0 612 KB

Telegram bot for Evernote

Home Page: https://t.me/evernoterobot

License: MIT License

Python 95.32% Dockerfile 0.90% Makefile 0.88% Shell 2.90%

evernote-telegram-bot's Introduction

Telegram bot for Evernote

Build status Coverage Status Maintainability

This bot can save everything that you send to your Evernote account.

You can use this bot in Telegram: https://t.me/evernoterobot
Or you can use your own telegram bot and your own server, then see Installation

Installation

If you have some reasons do not use my bot deployed on my server, you can use your own installation.

  • Create your own bot with the BotFather (see https://core.telegram.org/bots#3-how-do-i-create-a-bot)
  • Create your own Evernote application and obtain a pair of keys (access key and access secret)
  • Install a Docker to your server (see https://docs.docker.com/install/)
  • Get and set up SSL certificate (see https://letsencrypt.org)
  • Set up nginx/caddy/another proxy server to work with your SSL certificate.
  • Check you have curl on your server (usually it's installed by default)
  • Execute this command: sudo curl https://raw.githubusercontent.com/djudman/evernote-telegram-bot/master/evernotebot-install.sh --output evernotebot-install.sh && sh evernotebot-install.sh
    • sudo is needed because there is copying a file to /etc/init.d directory
    • you will need to enter some data as:
  • Execute /etc/init.d/evernotebot start to start bot

How to build docker image manually

  • Clone source code to your server
    git clone https://github.com/djudman/evernote-telegram-bot.git
    
  • Build image
    docker build -t evernote-telegram-bot .
    
  • Define environment variables (for example, in .bashrc)
  • Create a docker volume to store data docker volume create evernotebot-data
  • Run a container
    docker run \
        -e EVERNOTEBOT_DEBUG="$EVERNOTEBOT_DEBUG" \
        -e MONGO_HOST="$MONGO_HOST" \
        -e EVERNOTEBOT_HOSTNAME="$EVERNOTEBOT_HOSTNAME" \
        -e TELEGRAM_API_TOKEN="$TELEGRAM_API_TOKEN" \
        -e TELEGRAM_BOT_NAME="$TELEGRAM_BOT_NAME" \
        -e EVERNOTE_BASIC_ACCESS_KEY="$EVERNOTE_BASIC_ACCESS_KEY" \
        -e EVERNOTE_BASIC_ACCESS_SECRET="$EVERNOTE_BASIC_ACCESS_SECRET" \
        -e EVERNOTE_FULL_ACCESS_KEY="$EVERNOTE_FULL_ACCESS_KEY" \
        -e EVERNOTE_FULL_ACCESS_SECRET="$EVERNOTE_FULL_ACCESS_SECRET" \
        -d \
        -p 127.0.0.1:8000:8000 \
        --restart=always \
        --name=evernotebot \
        -it \
        -v ./logs:/app/logs:rw \
        --mount source="evernotebot-data",target="/evernotebot-data" \
        evernote-telegram-bot
    

Environment variables

Variable name Default value Description
EVERNOTEBOT_DEBUG 0 Enable debug mode (additional logging enabled)
EVERNOTEBOT_HOSTNAME evernotebot.djud.me DNS name of your host
TELEGRAM_API_TOKEN - Access token for telegram API. You can obtain this by BotFather
TELEGRAM_BOT_NAME evernoterobot Name of telegram bot. You used this in BotFather
EVERNOTE_BASIC_ACCESS_KEY - appKey for your Evernote app (with readonly permissions)
EVERNOTE_BASIC_ACCESS_SECRET - secret for your Evernote app (with readonly permissions)
EVERNOTE_FULL_ACCESS_KEY - appKey for your Evernote app (with read/write permissions)
EVERNOTE_FULL_ACCESS_SECRET - secret for your Evernote app (with read/write permissions)
MONGO_HOST 127.0.0.1 Hostname for mongodb host

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.