Skip to content

eraxillan/bitrix-forum-reader

Repository files navigation

Bitrix Forum Reader

Lightweight forum messages viewer generated by 1C Bitrix forum

Development stack

C/C++/Qt/qmake/QML

Arhitecture

  • cURL library to download web content
  • Pure C Google Gumbo library to parse HTML5 contents
  • Qt bindings classes with low-level API to convert Gumbo data to Qt types
  • Parser class with high-level API to extract only required data
  • C++ data model as a bridge between parser and QML frontend
  • C++ QML files generator using data above
  • QML frontend to show forum messages

Motivation

Bitrix forum HTML generator overwhelmed it with useless stuff like ads. But i just want to read and save messages to do some analysis later. Browser cannot do this automatically - so i've just write a parser with frontend to it. And the real reason - fun, fun and more fun, as famous mr. Torvalds suggests :) I just like to write and use parsers.

Status: alpha

  • Only forum messages viewer implemented, no analyzer
  • Only banki.ru "flame" forum pages were currently tested
  • Deplyment must be done manually (windeployqt etc.)
  • Android packages can be built using Qt Creator
  • iOS ones should work too, not tested yet

Plans

  • Desktop packages (WiX installer for Windows, DMG for Mac and Snap/Flatpak packages for Linux)
  • Publish on AppStore and Google Play
  • QBS support for mobile platforms (still not working, just check Qt bugtracker)
  • Serialize full message history to SQLite database
  • Implement database analysis to extract useful info, e.g. global/local user reputation
  • Implement "version control" to control moderators actions

Install

Prerequisites

Note: cURL is bundled with project for mobile platforms and Windows/macOS; on Linux it must be installed manually

  • Qt 5.8+
  • Windows: Visual Studio with Platform SDK
  • Linux: gcc and other build tools installed (sudo apt-get install build-essential on Ubuntu), cURL development package
  • macOS/iOS: Xcode 7 and newer
  • Android: latest Android SDK and NDK r10e and newer

Project feature defines

  • GUMBO_DEBUG (verbose Gumbo debug output)
  • QT_GUMBO_METADATA (store HTML document data in high-level Qt bindings)
  • RBR_DRAW_FRAME_ON_COMPONENT_FOR_DEBUG (show red frame around each message component)
  • RBR_PRINT_DEBUG_OUTPUT (verbose debug output from document semantic analyzer)
  • RBR_DUMP_GENERATED_QML_IN_FILES (save runtime-generated QML files on disk)

Compile

Just use Qt Creator:

  • create new session
  • open gumbo-parser/gumbo-parser.pro
  • open bitrix-forum-reader.pro
  • open second project properties and mark gumbo-parser project as a dependency
  • press "Run"

Also one can use terminal, e.g. for Linux desktop debug build:

  • cd gumbo-parser && qmake -spec linux-g++ CONFIG+=debug gumbo-parser.pro && make qmake_all
  • cd .. && qmake bitrix-forum-reader.pro -spec linux-g++ CONFIG+=debug && make qmake_all
  • Windows/mobile: launch windeployqt/macdeployqt/androiddeployqt tool to deploy all required Qt libraries
  • Linux: add Qt libraries to LD_LIBRARY_PATH environment variable before launching the app