{"id":18153252,"url":"https://github.com/30mb1/chat-parser","last_synced_at":"2026-05-05T14:31:54.629Z","repository":{"id":94105508,"uuid":"104345183","full_name":"30mb1/Chat-parser","owner":"30mb1","description":"Chat log with the ability to search by date and also special features for registered users.","archived":false,"fork":false,"pushed_at":"2017-10-20T10:24:24.000Z","size":3067,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-15T17:51:32.228Z","etag":null,"topics":["bootstrap","btc-e","btc-eclient","chat-application","chat-bot","flask-application","mongodb","pymongo","python3","wex"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/30mb1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-21T12:27:49.000Z","updated_at":"2017-10-20T12:49:09.000Z","dependencies_parsed_at":"2023-04-25T07:20:35.537Z","dependency_job_id":null,"html_url":"https://github.com/30mb1/Chat-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/30mb1/Chat-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/30mb1%2FChat-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/30mb1%2FChat-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/30mb1%2FChat-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/30mb1%2FChat-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/30mb1","download_url":"https://codeload.github.com/30mb1/Chat-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/30mb1%2FChat-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","btc-e","btc-eclient","chat-application","chat-bot","flask-application","mongodb","pymongo","python3","wex"],"created_at":"2024-11-02T03:06:08.506Z","updated_at":"2026-05-05T14:31:54.611Z","avatar_url":"https://github.com/30mb1.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat parser\n\nChat parser is a tool for collecting messages from wex.nz chat and convenient search on them by date or nickname. The program provides a set of tools for analyzing the chat and saving useful information.\n\n## Getting started\n\n### Requirements\n\n- Python 3\n- MongoDB database 3.2+\n- Apache/Nginx\n\n### Installation\n\nClone repository with --recursive flag for downloading a submodule. \n\n``` \ngit clone --recursive https://github.com/30mb1/chat-parser.git\ncd chat-parser\n```\n\nCreate virtual environment and install requirements.\n\n```\nvirtualenv -p python3 venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\nSet up proxy server (example for nginx):\n\n- Create new configuration file in save it in */etc/nginx/sites-available/your_app.conf*\n\n  Content of *your_app.conf*:\n\n  ```bash\n  server {\n      listen 80;\n      server_name some_domain.com;\n   \n      root /path/to/your_app;\n   \n      access_log /path/to/your_app/logs/access.log;\n      error_log /path/to/your_app/logs/error.log;\n   \n      location / {\n          proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;\n          proxy_set_header Host $http_host;\n          proxy_redirect off;\n          if (!-f $request_filename) {\n              proxy_pass http://127.0.0.1:8000; # you can choose another port\n              break;\n          }\n      }\n  }\n  ```\n\n- Create symbol link for sites-enabled:\n\n  ```bash\n  sudo ln -s /etc/nginx/sites-available/your_app.conf /etc/nginx/sites-enabled/\n  ```\n\n- Check configuration for mistakes:\n\n  ```bash\n  nginx -t\n  ```\n\n- If it is ok, reload nginx.\n\n  ```bash\n  service nginx reload\n  ```\n\nNow you can run application locally with gunicorn, using nginx for handling external requests and redirecting them.\n\n### Setting up\n\n#### Run parsing module\n\nGo to application's directory and activate virtual environment\n\n```bash\ncd chat-parser\nsource venv/bin/activate\n```\n\nRun module, that collect messages from chat and store them in database. Don't forget to start mongodb. If you have non-standard configuration of access, you can configure it usage in database.py .\n\n```bash\nscreen chat-parser.py # screen allows us to run program in a separate window, so that it works as a daemon\n```\n\nAt the moment, chat-parser configured for collecting messages from **wex.nz** via websocket.\n\n#### Create accounts for admins\n\nCreate accounts for admins (only users with accounts can use all features):\n\n```bash\npython accounts.py -n 10 # will create 10 accounts with logins admin1 ... admin10 and random passowords\n```\n\nWrite given accounts credentials, you will not be able to retrieve it later (only by manual access to db). Note that module tries to create logins in form admin1...N and if it is already taken it won't do anything, so if you want to create more accounts later, use -f flag to set number to start numerating from:\n\n```bash\npython accounts.py -n 5 -f 10 # will create accounts with logins admin10...admin15\n```\n\nExample:\n\n```bash\n\u003e python account.py -n 3\nadmin0 / 2I442ZIOGA\nadmin1 / QK6HM3YJJT\nadmin2 / 5CT3KZBY83\n\u003e python account.py -n 3 # trying to create 3 more accounts without flag\nadmin0 is already taken\nadmin1 is already taken\nadmin2 is already taken\n\u003e python accounts.py -n 2 -f 3 # now using -f flag\nadmin3 / FC5QR83L7D\nadmin4 / YFY3G9B0C6\n```\n\n### Run\n\nNow, when we configured everything, we can run our application\n\n```bash\ncd chat-parser\nsource venv/bin/activate\n# choose port, that we used in nginx .conf file earlier\ngunicorn app:app -b 127.0.0.1:8000 -w 8 --threads 8 # you can run it in screen too\n# you can set another number of workers or threads, depenging on your system characteristics\n# more detailed info you can find for example here\n# http://docs.gunicorn.org/en/stable/settings.html\n```\n\nYou can check it locally or from external address that we specified in .conf file.\n\n## How to use it\n\nUsers without accounts can only view history of chat, using date/nickname filter. There 3 separate tabs for channels of wex.nz\n\n![http://storage9.static.itmages.com/i/17/1020/h_1508493240_7177178_787e403dbf.png](http://storage9.static.itmages.com/i/17/1020/h_1508493240_7177178_787e403dbf.png)\n\nAfter login you get access to all features of app:\n\n- Adding messages to favourite\n- Downloading messages in csv format (it select all messages from current period)\n- Commenting messages on\n\nNote, that *favourite* is common to everyone, so admins can share useful information.\n\nThat how panel looks like for admin\n\n![http://storage6.static.itmages.com/i/17/1020/h_1508494105_7416409_73a7f9f8c8.png](http://storage6.static.itmages.com/i/17/1020/h_1508494105_7416409_73a7f9f8c8.png)\n\nAlso, some new tabs appear\n\n- Tabs for favourite messages\n- Tab for admins log (history of all admins activity)\n- Tab for changing system username (some unique inner identifier, not login)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F30mb1%2Fchat-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F30mb1%2Fchat-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F30mb1%2Fchat-parser/lists"}