GithubHelp home page GithubHelp logo

northis / chineseduck Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 76.99 MB

汉语学习 A system to learn chinese - telegram bot & website.

Home Page: https://chineseduck.site

License: MIT License

HTML 1.73% JavaScript 27.44% Vue 7.11% TypeScript 3.69% C# 58.65% Shell 0.49% SCSS 0.25% TSQL 0.64%

chineseduck's Introduction

Chinese Duck Bot

Build Status

Telegram bot @ChineseDuckBot to study Chinese language via memorizing flashcards.

Web-part: https://chineseduck.me

Key features

  • Generating flashcards based on users' vocabulary
  • Tone highlighting with colors
  • Auto-split word and phrases to syllables
  • Web-part to view user's words. Authorization can work even if Telegram is blocked.
  • Folders to group user's words
  • Several modes how to learn the words - by viewing or by multipal-chioce tests
  • Collection personal score
  • Bulk import words from .csv file
  • Webpart can work even if telegram addresses (https://t.me & so on) are blocked in your country.
  • Pre-installed cards for HSK1, HSK2,... to bulk import to a separate folder. Now available HSK1-6 pre-installed folders: english & russain versions

Leadning in bot

Commands

  • /About - 🈴About this bot
  • /Add - ➕Add a new chinese word
  • /Default - 👌Set default mode
  • /Delete - 🗑Remove a word from the dictionary
  • /Edit - 🖌Edit an existing chinese word
  • /Folder - 🗀Manage your current folder
  • /Import - 🚛Import words from a file
  • /Help - ❓List of available commands
  • /LearnPronunciation - 📢Learn how to pronounce these words
  • /LearnTranslation - 🇨🇳Learn what these words mean
  • /LearnView - 🎓👀Just view these words
  • /LearnWriting - 🖌Learn how to write these words
  • /Mode - ⚙️Choose learn words mode
  • /PreInstall - 🗀🕮Get pre-installed folders
  • /Start - 🖐Welcome
  • /View - 👀View a flash card
  • /Web - 🌐Manage the web-part of the bot

Roadmap

  • Manipulating the words using web-part
  • Wiki-part
  • More languages in csv templates
  • Fix bugs & implement features
  • Improve deploy & changelog

API

You can find the description of Chinese Duck Bot Api on Swagger page.

Deploying

Requirements

  • nodeJS 10+
  • dotnetcore 2.1+
  • docker compose 1.24+

First run or force udpate

You can examine docker-compose.yml before.

Create a .env file in the root of the project folder based on .env.template.js file, fill it with your own values and run

sudo start.sh

This script builds & deploys this system to docker containers. There will be 4 containers: mongo db server, front nginx web-server, back nodeJs api/website server, dotnetcore bot server. Web-server is configured to get & renew SSL Let's encrypt certificate automatically, so there is no need to install it manually (but you can=).

Common usage

# update from git
sudo update.sh

# run containers
docker-compose up

# stop containers
docker-compose stop

Backup & restore

Mongo database is in data/ folder. You can either save it directly or use these commands

mkdir -p backup
# backup
mongodump --uri mongodb://user:[email protected]:27017/chineseDuck --archive=backup/chineseDuck.archive
# restore with overwriting
mongorestore --uri mongodb://user:[email protected]:27017/chineseDuck --archive=backup/chineseDuck.archive --drop

You have to mongo 4.1+ installed

Local running

# just run
npm run build-dev-run
dotnet src/bot/chineseDuck.BotService/bin/Debug/netcoreapp2.1/ChineseDuck.BotService.dll

# tests
npm run test
npm run test-client

The tests use in-memory db, so you don't need to configure them at all. If the tests exit immediately after the start, try to install libcurl3. Examine Travis CI configuration file .travis.yml for details.

chineseduck's People

Contributors

northis avatar

Stargazers

 avatar

Watchers

 avatar

chineseduck's Issues

Quick start usage

  • Change /Start command: offer to add pre-installed
  • Change /PreInstall command logic: hide already added folders
  • Simplified mode: Add an option to hide /Import, /Edit, /Add and /Delete
  • Show Usage in view mode in the bot

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.