Code Monkey home page Code Monkey logo

trailblazing / tute Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 90.57 MB

Vertical Tabs | Tab Sidebar | Web Browser With Knowledge Management Viewpoint => Tute <= mytetra_webengine <= MyTetra

Home Page: https://github.com/beimprovised/mytetra_webengine.git

Shell 0.06% QMake 0.81% CSS 0.57% HTML 0.37% PHP 0.04% C++ 96.79% CMake 0.28% Perl 0.85% C 0.01% Python 0.13% NSIS 0.09%
knowledge-management note xml-rpc browser webengine topic vertical-tabs tab-sidebar

tute's Introduction

Tute <= mytetra_webengine <= MyTetra -- Thanks to MyTetra

Tute aims to provide some basic components of personal knowledge management in a free/libre, open source and decentralized way.

Currently,

It has a note component working on topics.

It has an embedded and customized web browser, which provides an easy way to combine tabs, bookmarks and history management together (the browser currently derived from Qt::WebEngine (Chromium-based)).

Local and internet search functions come out from the note and the browser.

It has a client. You can manage your remote service via XML-RPC.

If someday,

It can listen to some local screen capture or other content queries triggered by the user, that should not be a surprise.

Same as the real-time collaborative editing functions, should it?

Should you expect more novel features? feel free to contact me: hughvonyoung[at]gmail.com.

Welcome to fork and give back :)

Please note that Tute is distributed under the GPL v3.

How to remote synchronize Tute


Currently I chose Dropbox

Move files to Dropbox:

	rsync -n -avhSDHAX  --progress --delete --ignore-errors --force --stats "./bin/" "~/dropbox/knowledge\ management/."

After that, change settings from contextmenu of Record View on the left side: Main Menu: Tools: Main Preferences: "Main" tag: "Root directory". Point it to the parent folder where you want "data" and "trash" to locate (E.g.: "~/dropbox/knowledge\ management/bin". Leave the "Data directory" and the "Trash directory" as "./data" and "./trash" are OK).

How to build Tute


1 Build on Linux

Let's say the directory of your current project is named "working":

	working
            |____verdigris (created by or synchronized with git) (does not needed from Qt 5.7 and later versions)
	    |       |____src
	    |
	    |____knowledge management (name is whatever)
		    |____tute (created by or synchronized with git)

1.1 Install C++ Boost library (for boost::intrusive_ptr, boost::MPL, and some others. I installed it from package manager)

1.2 Install verdigris (only needed by remove qt::moc in Qt 5.6. Two header-only files.)

	git clone https://github.com/woboq/verdigris.git

1.3 Download and install Qt packages (May 18, 2017: qt-unified-linux-x64-2.0.5-2-online.run)

        wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
        chmod a+x ./qt-unified-linux-x64-online.run
        ./qt-unified-linux-x64-online.run
  • Run the installation. Default location for administrator installation (hereafter called "path-to-qt-installation"):

  • Environment in /.profile (/.bash_profile or ~/.bashrc) for command line build and installation

	QT5DIR=/path-to-qt-installation/gcc_64

	export QT5DIR

	if ! echo ${PATH} | /bin/grep -q $QT5DIR/bin ; then

	    PATH=$QT5DIR/bin:${PATH}

	    PKG_CONFIG_PATH=$QT5DIR/lib/pkgconfig:${PKG_CONFIG_PATH}

	fi

	QT5INC="$QT5DIR/include"

	QT5LIB="$QT5DIR/lib"

	QT5LIB=$QT5DIR/plugins/platforms:${QT5LIB}

	PATH=$QT5INC:${PATH}

	PATH=$QT5LIB:${PATH}

	export QT5DIR QT5INC QT5LIB PATH
  • After modified the above file, use
.  ~/.bashrc
  • to export it.

  • Do not recommend to mix it up with system installation of Qt

  • If you compile and debug the project by qt-creator, environment variable could be overrided by qt-creeator. So you can skip the shell settings and just check them in qt-creator's "Projects" mode => "Build Environment" settings as following:

Set QT5DIR to /path-to-qt-installation
Set PATH to ${QT5DIR}/bin:${QT5LIB}:${QT5INC}:/path-to-compiler-installation/bin:/path-to-compiler-installation/include:/path-to-compiler-installation/lib:...
Set QT5INC to ${QT5DIR}/include
Set QT5LIB to ${QT5DIR}/plugins/platforms:${QT5DIR}/lib

1.4 Clone the repo to your workbench

	git clone https://github.com/beimprovised/tute.git

1.5 Compile

	/path-to-qt-installation/gcc_64/bin/qmake tute.pro
        make -j$(nproc) all
	sudo make install
  • Or via GUI (Compile the Qt project file with Qt-Creator which comes with Qt 5.7 or more recent version): Open "tute.pro" under tute in qtcreator "Configure" the project in qtcreator (append "-j*" with prefer progress number * to "make" options might be better) Build it.

1.6 Input methods (for non-English users)

                // Suppose we chose Fcitx:
                // On Ubuntu:
        sudo apt-get install fcitx-frontend-qt5
                // libfcitxplatforminputcontextplugin.so should be under /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/ or somewhere from:
        locate libfcitxplatforminputcontextplugin.so
                // Then copy it to $${PROJECT_QT_VERSION}/plugins/platforminputcontexts:
        cp /path/to/libfcitxplatforminputcontextplugin.so /path/to/$${PROJECT_QT_VERSION}/plugins/platforminputcontexts/.
                // Or modify tute.pro with:
        LIBS            += /path/to/libfcitxplatforminputcontextplugin.so
                // Then put following lines in your ~/.bashrc
        export GTK_IM_MODULE=fcitx
        export QT_IM_MODULE=fcitx
        export XMODIFIERS="@im=fcitx"
                // Or at least put this variable in your Qt-Creator::Projects settings::Build Environment:
        QT_IM_MODULE=fcitx
                // When build from command line, make sure
        echo $QT5DIR
                // The output should not be empty. If it is, try to do
        export QT5DIR=/path-to-qt-installation/gcc_64


Thanks to MyTetra: Tute is forked from mytetra_webengine and mytetra_webengine is forked from MyTetra


ENG: Central source repository for MyTetra development. MyTetra official english page: http://webhamster.ru/site/page/index/articles/projectcode/138

RUS: Основной репозитарий исходников для разработки MyTetra. Официальная русскоязычная страница программы MyTetra: http://webhamster.ru/site/page/index/articles/projectcode/105

Agreement on the coding (registration code)


###When writing code to be guided by the following agreements:

  • If a staitc polymorphism is feasible, escape dynamic one.

  • Keep class abstraction as possible as you could.

  • If a function you used it just once, use a lambda;

  • The name of the file with the implementation of the class is based on the principle ClassName.cpp/classname.cxx (prefer: class_name.cxx);

  • The name of the file with the title of class is based on the principle ClassName.hxx/classname.hxx/classname.h (prefer: class_name.hxx);

  • The name of the class is based on the principle ClassName;

  • The name of the method is based on the principle method_name (underscore);

  • The name of the member variables is based on the principle _parameter_name (underscore), and get set name is parameter_name(...);

  • Function name begin with the aspect which it belongs to. If the name is not enough, newly created method should contain a comment that describes what the method does. So it is desirable to describe the purpose of the method parameters;

  • The header class, after the section is necessary in #include class assignment to write comments.

  • Each header file must have the following structure:

	\#ifndef _CLIPBBRANCH_H_

	\#define _CLIPBBRANCH_H_

	...

	\#endif // _CLIPBBRANCH_H_
  • The program is designed as a cross-platform Qt-only application. Program should not depend on third-party libraries that are not part of Qt unless you could provide its source code to the project under free/libre and open source licenses.

  • Source file encoding: UTF-8;

  • Comment the code in English languages;

  • Tab prohibited padding spaces are made (use folling code beautifiers);

  • Margin - 0 spaces (use style sheet);

  • Comments must have the same indentation that of the code (use folling code beautifiers);

Branches at GIT


The system Git created two main branches.

For mytetra_webengine

  • origin - the main branch with the latest stable release;
  • develop - branch to develop.

For Tute:

  • master - the main branch with the latest stable release;
  • develop - branch to develop.
  • code beautifier - uncrustify (deprecated)
        find . -iname "*.h" -or -iname "*.cpp" -or -iname "*.cxx" > files.txt
        uncrustify -c src/uncrustify.cfg  -l CPP --replace --no-backup -F ./files.txt
  • code beautifier - clang-format::WebKit (to save time)
        find . -iname "*.h" -or -iname "*.hxx" -or -iname "*.inl" -or -iname "*.cpp" -or -iname "*.cxx" | xargs clang-format -i -style=WebKit
        // if you have a .clang-format under currrent directory (clang-format -style=webkit -dump-config > .clang-format), then:
        find . -iname "*.h" -or -iname "*.hxx" -or -iname "*.inl" -or -iname "*.cpp" -or -iname "*.cxx" | xargs clang-format -i -style=file

Besides these two branches have been established in other branches for the implementation of a functional. Upon completion of the changes flow into the branch experimental. After stabilization of the changes in the experimental, the changes flow into the master and release is issued.

Deciding to connect to the development Tute, please use the develop branch for the current code.

tute's People

Contributors

trailblazing avatar xintrea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ra2003

tute's Issues

Tute can't work. May be recurse?

Hi!

I try compile and running Tute (commit 593844e).

Tute normal compile.

But first error if run tute:

WalkHistory::clear()
QML debugging is enabled. Only use this in a safe environment.
Start Tute v.  0.  0.  1
Set main program file to  "./tute"
---------------
Critical error!
---------------
"Can't set permissions to file \"/home/xi/.config/tute/mode.ini\""

I create empty file /home/xi/.config/tute/mode.ini, and run again:

$ ./tute
WalkHistory::clear()
QML debugging is enabled. Only use this in a safe environment.
Start Tute v.  0.  0.  1
Set main program file to  "./tute"
Segmentation fault

I try run in debug mode, and see very long called stack with repeat functions call.

How to run tute?

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.