Skip to content

Commit

Permalink
v1.9.5: Various enhancements and fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfakih294 committed Apr 26, 2023
1 parent ac31429 commit ad18ce4
Show file tree
Hide file tree
Showing 173 changed files with 79,542 additions and 4,361 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@



**Nibras PKM** is a __web-based self-hosted open source__ system for the __long-term management__ of __personal__ information. It is a combination of a __web-based__ application intended for desktop use and where all the records are entered, and an Android __reader and note taker__ application.
**Nibras PKM** is a __web-based self-hosted open source__ system for
the __long-term management__ of __personal__ information.
It is a combination of a __web-based__ application
intended for desktop use and where all the records are entered,
and an Android __mobile__ reader application.

![](https://raw.githubusercontent.com/mfakih294/Nibras-PKM/master/docs/images/screenshot.jpg)

Expand All @@ -25,7 +29,7 @@ It manages resources (articles, books, documents), notes, writings, tasks, goals
It was designed with large amounts of information in mind. In current usage, it manages dozens of thousands of records. With its commands and saved searches, it makes easy to navigate through all the information.


# Features
## Main Features

* **Flexible text-based commands** to add, update and search records, which provides powerful ways to manage information.
* **Saved searches** to save searches for later use.
Expand All @@ -38,7 +42,7 @@ It was designed with large amounts of information in mind. In current usage, it

## Documentation

Documentation is available online at [https://mfakih294.github.io/Nibras-PKM/pages](https://mfakih294.github.io/Nibras-PKM/pages/).
User's guide is available online at [https://mfakih294.github.io/Nibras-PKM/](https://mfakih294.github.io/Nibras-PKM/).


## Releases
Expand Down
22 changes: 19 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
def esVersion = '7.3.0'
ext['elasticsearch.version'] = esVersion
ext {
elasticsearchVersion = esVersion
}
buildscript {
repositories {
mavenLocal()
Expand Down Expand Up @@ -49,6 +54,8 @@ dependencies {
// compile files("lib/commons-logging-1.1.1.jar")
// compile files("lib/icu4j.jar")
//compile group: 'com.ibm.icu', name: 'icu4j', version: '68.2'
// compile group: 'com.ibm.icu', name: 'icu4j', version: '68.2'
// group=‘com.ibm.icu’, module=‘icu4j’, version=‘58.2’)
// compile files("lib/jpwgen-1.0.3.jar")
// compile files("lib/json-20140107.jar")
// compile files("lib/lombok-1.16.16.jar")
Expand Down Expand Up @@ -94,8 +101,12 @@ dependencies {
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.1.16.Final"
// compile "org.hibernate:hibernate-ehcache:5.1.16.Final" todo: needed?
compile "org.grails.plugins:gsp"

// ok compile group: 'org.apache.lucene', name: 'lucene-core', version: '8.1.0'
// compile 'org.grails.plugins:elasticsearch:2.7.0.RC1'
// ok runtime 'org.elasticsearch.plugin:mapper-attachments:2.4.6'

// compile "org.grails.plugins:elasticsearch:2.4.0"

Expand All @@ -104,10 +115,11 @@ dependencies {
compile group: 'com.cronutils', name: 'cron-utils', version: '9.0.2'

// https://mvnrepository.com/artifact/com.intuit.fuzzymatcher/fuzzy-matcher
compile group: 'com.intuit.fuzzymatcher', name: 'fuzzy-matcher', version: '1.0.4'
compile group: 'com.intuit.fuzzymatcher', name: 'fuzzy-matcher', version: '1.1.0'
// compile group: 'org.eclipse.mylyn.docs', name: 'org.eclipse.mylyn.wikitext.markdown.core', version: '2.6.0.v20150901-2143'

compile 'com.vladsch.flexmark:flexmark-all:0.62.2'
implementation 'org.jsoup:jsoup:1.15.3'

// other plugins
compile "com.nayidisha.grails.uploadr:grails3-uploadr:3.0"
Expand All @@ -119,9 +131,11 @@ dependencies {

compile 'org.grails.plugins:external-config:1.4.0'

compile 'org.grails.plugins:quartz:2.0.13'
compile 'org.grails.plugins:quartz:2.0.9'

//compile "org.grails.plugins:feeds:1.6"
// compile "org.grails.plugins:feeds:1.6"
// todo: fix its range dependencies
// compile 'org.grails.plugins:feeds:2.0.0'
compile 'org.grails.plugins:feeds:2.0.0-SNAPSHOT'

compile 'org.grails.plugins:spring-security-core:3.2.3'
Expand All @@ -142,6 +156,8 @@ dependencies {
//runtime 'mysql-connector-java:5.1.18'
runtime group: 'mysql', name: 'mysql-connector-java', version: '8.0.19'

runtime 'org.apache.derby:derby:10.14.2.0'

//compile "com.bertramlabs.plugins:asset-pipeline-grails:2.15.1"

// testCompile "org.grails:grails-gorm-testing-support"
Expand Down
6 changes: 6 additions & 0 deletions docs/10.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ username="nibras-user" password="the-password"/>`
after chaning the username and password of the account to use to access the database.


mysql -u username -p
execute:
mysql
create user 'nibras'@'%' identified by 'nibras';

grant all privileges on *.* to 'nibras'@'%' with grant option;

<!-- Then, you just need to update the Nibras application itself when a new update is available. -->
1. install the database server MySQL, and create the database to be used by Nibras.
Expand Down
85 changes: 85 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Nibras PKM

**Nibras PKM** is a __local open source__ system for the __long-term management__ of __personal__ information. It is a combination of a __web-based__ application intended for desktop use and where all the records are entered, and an Android __mobile__ reader application.

![](https://raw.githubusercontent.com/mfakih294/Nibras-PKM/master/docs/images/screenshot.jpg)


**Local**

The user has full control over his/her data, without the need for a (fast) internet connection, and without all the distractions and information overload that the internet can cause.

**Open source**

The user has control over the system itself too, especially when using it on the long term to manage the important personal information and files.

**Comprehensize**

It manages resources (articles, books, documents), notes, writings, tasks, goals, journal, planner, payments, indicators, and (study) courses and departments.

**Powerful**

It was designed with large amounts of information in mind. In current usage, it manages dozens of thousands of records. With its commands and saved searches, it makes easy to navigate through all the information.

## Main Features

* **Flexible text-based commands** to add, update and search records, which provides powerful ways to manage information.
* **Saved searches** to save searches for later use.
* Ability to display records on calendars and Kanban boards.
* Full-text search of all record fields.
* Simple file system integration so to greatly reduce the need to organize files manually.

## Documentation

User's guide is available online at [https://mfakih294.github.io/Nibras-PKM/](https://mfakih294.github.io/Nibras-PKM/).

## Code, releases and issues

Nibras PKM is hosted on GitHub [https://github.com/mfakih294/Nibras-PKM](https://github.com/mfakih294/Nibras-PKM).

## Quick start guide

Running Nibras requires three simple steps:

- Download the bundle file corresponding to your platform, e.g. nibras-bundle-windows.zip from the [releases page](https://github.com/mfakih294/Nibras-PKM/releases) on Github.
- Extract the zipped file to a location of your choice on your local disk.
- Launch Nibras by double clicking on ./scripts/start file.

Once Nibras has finished launching, a message like the one below will appear.

`************************************************************`

`* Nibras has launched. You can access it from: *`

`* https://localhost:1441/nibras *`

`************************************************************`

Go to **https://localhost:1441/nibras** using Firefox or Chrome. On the login page, enter *nibras* for username and *nibras* for the password.

Notes:
- As it has a self-signed certificate, you need to accept and bypass the security warning that shows up at the beginning.
- On Linux, you need to make the files inside ./scripts and ./tomcat/bin folders executable (chmod +x *).
- To stop Nibras, you can close this window, or press ctrl+c in it, or run ./scripts/stop script.

## Technical details

* Nibras is developed in Grails framework 3.3.10, which is based on Groovy language, a dynamic language on top of the Java platform.
* Grails applications run on any platform that can run Java 8 and later, so practically all platforms, including Windows, Linux, Mac.
* For production use, Nibras uses MySQL 5 for its database, and the file system to store the files of the records. To testing and demonstration, you can run it with h2 database, with no need to configure it.
* Apache Tomcat 8+ is the recommended application server to run it for production use.


## Nibras Reader


* **Nibras Reader** is available as a companion Android application to Nibras. It that connects to a Nibras PKM system (e.g. on the same WIFI network), and syncs the bookmarked records in it, so you can read them without network access whenever you go.

* It also allows the user to enter quick one-line notes that will be synced to Nibras Desktop on user's choice.

* To use Nibras Reader, the user has to specify first the IP and port of Nibras PKM (found on the footer region). Then, when clicking 'Sync', all bookmarked records will be available for reading on mobile.

* To install it, copy the bundled .apk file to your Android phone, and install it, or get it from its Github page: [https://github.com/mfakih294/nibras-mobile](https://github.com/mfakih294/nibras-mobile).

![homepage](./images/nibras-mobile-homepage.jpg)

15 changes: 9 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@



**Nibras PKM** is a __web-based self-hosted open source__ system for the __long-term management__ of __personal__ information. It is a combination of a __web-based__ application intended for desktop use and where all the records are entered, and an Android __reader and note taker__ application.
**Nibras PKM** is a __web-based self-hosted open source__ system for
the __long-term management__ of __personal__ information. It is a combination of a __web-based__ application intended for desktop use and where all the records are entered, and an Android __reader and note taker__ application.

![](https://raw.githubusercontent.com/mfakih294/Nibras-PKM/master/docs/images/screenshot.jpg)

Expand Down Expand Up @@ -36,9 +37,9 @@ It was designed with large amounts of information in mind. In current usage, it



## Documentation
## User's guide

Documentation is available online at [https://mfakih294.github.io/Nibras-PKM/pages](https://mfakih294.github.io/Nibras-PKM/pages/).
User's guide is available online at [https://mfakih294.github.io/Nibras-PKM/pages](https://mfakih294.github.io/Nibras-PKM/pages/).


## Releases
Expand Down Expand Up @@ -67,12 +68,14 @@ Notes:
- On Linux, you need to make the files inside ./scripts and ./tomcat/bin folders executable (chmod +x *).
- To stop Nibras, you can close this window, or press ctrl+c in it, or run ./scripts/stop script.


## Technical details

* Nibras is developed in Grails framework 3.3.10, a dynamic framework on top of the Java platform.
* Nibras is developed in Grails framework 3.3.10, a dynamic web framework on top of the Java platform.
* Grails applications run on any platform that can run Java 8 and later, so practically all platforms, including Windows, Linux, Mac.
* For production use, Nibras uses MySQL 5+ for its database, and the file system to store the files of the records. To testing and demonstration, it can run with h2 database, with zero extra configuration.
* For production use, Nibras uses MySQL 5+ for its database, and the file system to store the files of the records. To testing and demonstration, you can run it with h2 database, with zera extra configurion.
* Apache Tomcat 8+ is the recommended application server to run it for production use.


* Apache Tomcat 8+ is the recommended application server to run it for production use.
* The bundled distribution comes with Tomcat 8 and runs with a h2 database.

Expand Down
36 changes: 35 additions & 1 deletion grails-app/conf/application.groovy
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
[pattern: '/shutdown', access: ['permitAll']],
[pattern: '/json/**', access: ['permitAll']], // working! 19.07.2019
[pattern: '**/json/**', access: ['permitAll']], // working! 19.07.2019
[pattern: '**/jabal-amel/**', access: ['permitAll']],
[pattern: '*/jabal-amel/**', access: ['permitAll']],
[pattern: '/jabal-amel/**', access: ['permitAll']],
[pattern: '**/indexCard/generateWritingsBook/**', access: ['permitAll']],
[pattern: '**/staticPage/**', access: ['permitAll']],
[pattern: '**/viewRecordImage/**/**', access: ['permitAll']],
[pattern: '*/*/viewRecordImage/**/*', access: ['permitAll']],
[pattern: '**/generics/viewRecordImage/**', access: ['permitAll']],
[pattern: '**/staticRecord/**', access: ['permitAll']],
[pattern: '**/download/**', access: ['permitAll']],
[pattern: '**//jabal-amel/**', access: ['permitAll']],
[pattern: '/assets/**', access: ['permitAll']],
[pattern: '/**/js/**', access: ['permitAll']],
[pattern: '/**/plugins/**', access: ['permitAll']],
Expand All @@ -34,9 +45,11 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
[pattern: '/**/filed/**', access: ['permitAll']],
[pattern: '/**/download/**', access: ['permitAll']],
[pattern: '/**/page/mobile*/**', access: ['permitAll']],

[pattern: '/**/page/appPile*/**', access: ['permitAll']],
[pattern: '/**/page/panel*/**', access: ['permitAll']],
[pattern: '/**/sync/**', access: ['permitAll']],
[pattern: '/**/css/**', access: ['permitAll']],
[pattern: '/**/layout/**', access: ['permitAll']],
[pattern: '/**/kickstart/**', access: ['permitAll']],
[pattern: '/**/file-icons/**', access: ['permitAll']],
// [pattern: '/**/slides/**', access: ['permitAll']],
Expand All @@ -46,12 +59,20 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
]

grails.plugin.springsecurity.filterChain.chainMap = [
[pattern: '/jabal-amel/**', filters: 'none'],
[pattern: '/assets/**', filters: 'none'],
[pattern: '/page/heartbeat*/**', filters: 'none'],
[pattern: '/page/mobile*/**', filters: 'none'],
[pattern: '/sync/**', filters: 'none'],
[pattern: '**/sync/**', filters: 'none'],
[pattern: '/**/download/**', filters: 'none'],
[pattern: '/**/generateWritingsBook/**', filters: 'none'],
[pattern: '**/generics/viewRecordImage/**', filters: 'none'],
[pattern: '/**/generics/viewRecordImage/**', filters: 'none'],
[pattern: '**/viewRecordImage/**', filters: 'none'],
[pattern: '/**/viewRecordImage/**', filters: 'none'],
[pattern: '/**/staticPage/**', filters: 'none'],
[pattern: '/**/download/**', filters: 'none'],
[pattern: '/**/filed/**', filters: 'none'],
[pattern: '/json/**', filters: 'none'],
[pattern: '/**/js/**', filters: 'none'],
Expand Down Expand Up @@ -91,3 +112,16 @@ environments {
grails.dbconsole.enabled = true
}
}
elasticSearch.datastoreImpl = 'hibernateDatastore'
elasticSearch.client.mode = 'local'
elasticSearch.migration.strategy = 'delete'
elasticSearch.disableAutoIndex = false
elasticSearch.bulkIndexOnStartup = true
//grails.app.enable.reload = true
//grails.gsp.view.dir = "/nibras/sys/views"

//log4j = { // not here
// trace 'org.hibernate.type.descriptor.sql.BasicBinder'
// error 'org.hibernate.SQL'
// debug 'grails.app.controllers'
//}
30 changes: 23 additions & 7 deletions grails-app/conf/application.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ info:
version: 1.9.1
grailsVersion: '@info.app.grailsVersion@'
server:
contextPath: '/'
port: 1441 # The port to listen on
contextPath: '/nibras' # ContextPath must start with '/' and not end with '/'
port: 1445 # The port to listen on
session:
timeout: 720000 # 20 hours (in ms)
ssl:
Expand Down Expand Up @@ -112,14 +112,15 @@ hibernate:
flush:
mode: AUTO
environments:
h2:
h2: #h2
grails.dbconsole:
enabled: true
# urlRoot: ${appName}/dbc
dataSource:
dbCreate: update
url: jdbc:h2:./db/db;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE;
dialect: com.hp.opr.hibernate.dialect.H2Dialect
url: jdbc:h2:./db/db;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE; # MODE=MySQL
dialect: org.hibernate.dialect.H2Dialect
#org.hibernate.dialect.HSQLDialect # com.hp.opr.hibernate.dialect. # H2Dialect (MODE=MySQL; not supported in h2dialect)
driverClassName: org.h2.Driver
properties:
jmxEnabled: true
Expand All @@ -139,14 +140,24 @@ environments:
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED
derby: #derby
grails.dbconsole:
enabled: true
dataSource:
dbCreate: update
url: jdbc:derby:./db;create=true
dialect: org.hibernate.dialect.DerbyTenSeven
driverClassName: org.apache.derby.jdbc.EmbeddedDriver
logsql: true

development:
dataSource:
dbCreate: update
url: jdbc:mysql://localhost:3306/db_nibras?serverTimezone=Asia/Beirut
driverClassName: com.mysql.cj.jdbc.Driver
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
username: nibras
password: nibras
username: user1
password: user1
properties:
jmxEnabled: true
initialSize: 5
Expand Down Expand Up @@ -222,3 +233,8 @@ environments:
# - classpath:'@info.app.grailsVersion@'.groovy
# - classpath:myconfig.yml



quartz:
autoStartup: true
jdbcStore: false
7 changes: 6 additions & 1 deletion grails-app/conf/logback.groovy
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ appender("STDOUT", ConsoleAppender) {


//logger('nibras', INFO, ['STDOUT'], false)
logger('nibras', ERROR, ['STDOUT'], false)
logger('nibras', INFO, ['STDOUT'], false)
logger('org.hibernate.SQL', WARN, ['STDOUT'], false)
logger ' org.quartz.core.QuartzScheduler ', INFO
logger 'org.hibernate.type.descriptor.sql.BasicBinder', DEBUG
logger 'grails.app.controllers', DEBUG

//logger('nibras', WARN, ['STDOUT'], false)


2 changes: 2 additions & 0 deletions grails-app/controllers/UrlMappings.groovy
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class UrlMappings {
"/slides"(controller: 'page', action: 'slides')
"/filed"(controller: 'operation', action: 'filed')

"/irfan"(controller: 'page', action: 'appIrfan')
// "/jabal-amel"(controller: 'indexCard', action: 'generateWritingsBook')
"/$controller/$action?/$id?"{
constraints {
// apply constraints here
Expand Down
Loading

0 comments on commit ad18ce4

Please sign in to comment.