Browse Source

updated readme

master
Inderjit Gill 4 months ago
parent
commit
91d5b6e7ed
3 changed files with 83 additions and 37 deletions
  1. +24
    -37
      README.md
  2. +27
    -0
      misc/developing.org
  3. +32
    -0
      misc/spaced-repetition.org

+ 24
- 37
README.md View File

@ -1,56 +1,43 @@
# Civil
A knowledge management system for the next 30 years
A knowledge management system for the next 30 years. Developed at git.indy.io for my own use and mirrored on Github in case anyone wants to use it.
## Server
rename server/.env.example to server/.env and update it for your environment
rename .env.example to .env and update it for your environment. The database tables can be created by running the misc/schema.psql file into a Postgres database.
$ cd server && cargo run
```sh
$ make run
```
## Client
```sh
$ make wasm
```
## Deploying
$ make upload
## (Dev) loading a test database
- copy a backup from the server (e.g. civil_20201116.psql)
- create a local database: $ createdb civil_20201116
- load in the backup: psql civil_20201116 < civil_20201116.psql
- update the .env variables
- restart the server, login, may need an additional refresh to display the db name
## Release build
## (Dev) generating the library js files
```sh
$ make release
```
The dist directory will contain the release build
preact.js:
package.json script in preact project:
rename all mangle.json files to _mangle.json
"isg": "microbundle -i src/index.js -o dist/isg-bundle.js --no-pkg-main --no-compress -f es",
then rename dist/isg-bundle.module.js to preact.js
hooks.js:
go into the preact project's hooks/src directory, copy index.js to hooks.js updating the import declaration.
htm:
manually copied build.mjs from the project and made changes
preact-router:
manually copied over and made changes
## Deploying (to indy.io)
```sh
$ make upload
```
# Requirements
A modern (for c.2020) web-browser
PostgreSQL
Rust
Make
(Optional) Minify (https://github.com/tdewolff/minify)
- A modern (for c.2020) web-browser
- PostgreSQL
- Rust
- Make
- (Optional) Minify (https://github.com/tdewolff/minify)
install minify:
```sh
$ sudo apt install minify
```
if the minify binary is not installed on the build system then the unminified assets will be used

+ 27
- 0
misc/developing.org View File

@ -0,0 +1,27 @@
* (Dev) loading a test database
- copy a backup from the server (e.g. civil_20201116.psql)
- create a local database: $ createdb civil_20201116
- load in the backup: psql civil_20201116 < civil_20201116.psql
- update the .env variables
- restart the server, login, may need an additional refresh to display the db name
* (Dev) generating the library js files
preact.js:
package.json script in preact project:
rename all mangle.json files to _mangle.json
"isg": "microbundle -i src/index.js -o dist/isg-bundle.js --no-pkg-main --no-compress -f es",
then rename dist/isg-bundle.module.js to preact.js
hooks.js:
go into the preact project's hooks/src directory, copy index.js to hooks.js updating the import declaration.
htm:
manually copied build.mjs from the project and made changes
preact-router:
manually copied over and made changes

+ 32
- 0
misc/spaced-repetition.org View File

@ -0,0 +1,32 @@
* SM2
https://www.supermemo.com/en/archives1990-2015/english/ol/sm2
** easiness_factor
- E-Factors were allowed to vary between 1.1 for the most difficult items and 2.5 for the easiest ones.
- At the moment of introducing an item into a SuperMemo database, its E-Factor was assumed to equal 2.5
- In the course of repetitions this value was gradually decreased in case of recall problems. Thus the greater problems an item caused in recall, the more significant was the decrease of its E-Factor.
I noticed that E-Factors should not fall below the value of 1.3. Items having E-Factors lower than 1.3 were repeated annoyingly often and always seemed to have inherent flaws in their formulation (usually they did not conform to the minimum information principle). Thus not letting E-Factors fall below 1.3 substantially improved the throughput of the process and provided an indicator of items that should be reformulated. The formula used in calculating new E-Factors for items was constructed heuristically and did not change much in the following 3.5 years of using the computer-based SuperMemo method.
easiness_factor: 1.3 ... 2.5
--------------------------------------------------------------------------------
EF':=f(EF,q)
where:
EF' - new value of the E-Factor
EF - old value of the E-Factor
q - quality of the response
f - function used in calculating EF'.
--------------------------------------------------------------------------------
EF':=EF-0.8+0.28*q-0.02*q*q
which is a reduced form of:
EF':=EF+(0.1-(5-q)*(0.08+(5-q)*0.02))

Loading…
Cancel
Save