Coding & Framework

How to use Quake an open source knowledge management meta-framework

This article is written using the Quake web application, although there is only basic Command + S to save title + content. This simple, rough page reminds me of building Phodit many years ago, and it should it works suffice as a start.

Come, the first link to GitHub: https://github.com/phodal/quake

Reason Behind Making

Half a month ago, I was preparing material, and I finally found some relevant materials from my blog, Todo, and Notes. I use different tools to manage knowledge, Microsoft To-Do to manage ideas, Phodit + Phodal.com to publish articles, Apple Notes to take notes, etc. Knowledge is spread across tools. It’s not good for me to gain insights and find inspiration, and at the same time, there is a lack of ways to write and record.

So, I need a new tool to integrate into my body of knowledge, it should be:

  • open source. Can be expanded freely.
  • Distributed + localized. It can be used offline, which is convenient for use on business trips.
  • versioned. Change history can be viewed freely.
  • Open. Can be freely combined with other tools. Such as Vim, VSCode, etc.
  • Easy to expand. Can be combined with customary tools. For example, a DSL-based edit-publish separated Web-like pattern for presentation. Such as MxGraph, Mermaid, Ledge Framework, etc.

So, there you go: https://github.com/phodal/quake

Quake : A Knowledge Management Meta-Framework

Quake’s goal is to build a geek-oriented knowledge management meta-framework that:

  • Free text content management. Todo lists, article management, book reviews, notes, and more.
  • Build a knowledge network system. Customized markdown links
  • Capture fleeting inspiration. Support quick start (CLI, TUI) and global search
  • Freely present the canvas. DSL and Freeboard

Simply put, Markdown is used to record data, Git is used for versioning, Terminal is used for quick editing, and Web + Web Components provide customization capabilities.

Quake Design Concept 1: Data Coding

Quake continues the very successful idea of ​​Ledge Framework: document coding + Markdown charting + Git to provide data management. Although we did not introduce a database in Quake, we still provide the following functions:

  1. data migration.
  2. historical state. Designing a piece of content with a historical state is a hassle.
  3. Data query and update.
  4. ……

It’s just that these functions can only support basic development. For expansion, it is still problematic, and a simplified version of SQL needs to be provided in the future to provide better data processing. In addition to SQL, another easy method is to provide support for scripting languages.

Quake Design Concept 2: Free Customization

Designing a knowledge management system that can support different data models is painful and requires a lot of upfront work. Therefore, we first built a metadata engine that can customize the data format. Having data formats that everyone can customize, and the ability to customize views for that data can simplify a lot of work.

Custom data type

In Quake, the data format is defined by YAML, and can also be generated (via quake cmd -i “quake.sync”) from the exported data:

  - type: notes

    display: ""

    fields:

      - title: Title

      - description: String

      - category: String

      - created_date: Date

      - updated_date: Date

      - author: String

    actions: ~

Generate the corresponding markdown file in 0001-time-support.mdthe form of id + title, and then edit the file:

---

title: time support

author:

content:

created_date: 2021-11-24 19:14:10

updated_date: 2021-11-24 19:14:10

---

ahaha

Considering the issue of ecological compatibility, Jekyll’s Front Matter syntax is directly used to define data in Quake. Our editing operations for the file, that is, the content and related content information, are directly based on this markdown file.

custom display components

in progress.

The existing Web Parts architecture is built on Web Components to provide custom data manipulation capabilities. For example, through the following code, we can build our editor and interact accordingly:

 const editor = document.createElement('quake-editor');

  editor.setAttribute('id', entry.id);

  editor.setAttribute('title', entry.title);

  editor.setAttribute('value', entry.content);

  editor.addEventListener("onSave", function (event) {

    update_entry(params.type, params.id, {

      title: event.detail.title,

      content: event.detail.value.replaceAll("\\\n", "\n")

    })

  });

  return editor

For different content, it is similar, just create the corresponding components and process the corresponding results. In this way, various data types that are commonly used are constructed and can be customized by all developers.

How to use Quake

At this stage, Quake’s target groups are mainly geeks, software engineers, or software developers with a certain IT foundation. After all, we don’t have a GUI yet, and we still need a series of application packaging work. However, the GUI is too heavy in terms of architecture. It is easier to build an MVP version based on the local Web + Terminal, and it can also verify the feasibility of degrees of freedom.

Install Quake

The installation of Quake is still quite troublesome at this stage, and it can only be done under the CLI (so, we are facing developers, do I still have a choice?):

  1. Install Quake.
  2. If you have a Rust environment, you can directly cargo install quake
  3. If you don’t have a Rust environment, you can download it from the Quake Release
  4. Install a search engine (optional)
  5. macOS users can directly brew and install metasearch
  6. For users of other operating systems, it is recommended to visit the official website: https://github.com/meilisearch/MeiliSearch
  7. Introduce web pages. The web.zip can be downloaded from the Quake Release page and extracted to a directory.

Then, go to the corresponding document directory and execute `quake init` to get an initialized environment. Execute quake server, you can enter the Web page to use.

Quake Importer

Going back to the beginning of the article, the first thing we have to solve is the problem of data migration. So, last weekend, my main work was on data migration, converting different data sources into Markdown. As in Quake Importer, there is the documentation for the following related data sources:

  1. Related articles on Django CMS
  2. Notes related to Apple Notes
  3. Microsoft To-do related to-do list

From my data, I have about 888 articles, 99 todos, and 302 memos. Of course, I still have some captured data stored on Microsoft OneNote, and this part needs to be further improved in the future.

Quake Cmd

After exporting related data, you can generate definition files that define different content types synchronously through quake cmd -i “quake.sync”commands .

Afterward, new content can be created directly, just go through quake cmd -i “blog.add: Quake 一knowledge management meta-framework

”to quickly create new blog content. Quake implements basic CRUD functionality through Terminal first, so we don’t need to start the note-taking tool slowly to get a quick idea. We can take advantage of the heavily recreated terminal-based editors, such as Vim, to quickly complete the recording.

After saving, we will update and generate the corresponding CSV data index file to provide fast interface capability for Terminal.

Quake Server

When we need to find inspiration, we can quake server start our Web service to search, index knowledge, manage knowledge, etc. on it. Based on the native Markdown + Meili search engine, we can build the best native experience. Quake’s Web UI interface is built based on each Web Component, which means that on the basis of our CRUD API, you can freely build your Web UI by combining the component capabilities we provide. By modifying the parameters .quake.yamlin server_location, you can use your own developed pages. At this point, Quake is just a CRUD API for Markdown.

Finally, because all data is around markdown + yaml, we can combine Git for version management. (PS: This part of the function has not been designed)

Next step

After completing the MVP (Minimum Viable Product) version, there is still a series of work to be done:

  • Terminal UI. There are already friends working on it.
  • Custom Markdown syntax. Used to support things like double chaining, text diagramming, brain mapping
  • Global GUI entry. Support from global search, similar to Spotlight Search
  • Web application design. The current version is very crude and lacks various features.
  • Better knowledge management.

Here you read more stories about Quake

Read More Popular In Gamerkite

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button