Skip to content

Commit

Permalink
updated readme and welcomes
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Jan 8, 2024
1 parent 6d61e03 commit c0ff42d
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 97 deletions.
93 changes: 8 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,116 +18,39 @@ To know more about Joplin, refer to <https://joplinapp.org/>

You can install the app and run it afresh, or, as it's compatible with Joplin's database, you may also choose with continue with what you have in Joplin. To do that, simply copy and rename the two config directories under (on Linux) ~/.config to Xilinota and xilinota-desktop, respectively.

For more about importing (and exporting), read [here](readme/welcome/2_importing_and_exporting_notes.md)

## New feature #1: Notes and markdown files

The central belief of this feature is that the notes are valuable properties of yours, likely an extension of your mind. Xilinota keeps the notes and notebooks in a straight-forward file structure, with notes stored in markdown files each having the title as the file name. The files and folders are maintained up-to-date with the internal database. This gives you better access to and use of your notes outside of Xilinota. You can create, add, edit, or delete the files with your favorite tools on your system, and the content of these files will be synced into Xilinota when you start it. And, in any case when you change your mind about the choice of applications, the notes are in text form and you can easily adopt new ways of management.

#### Disktop application

On the desktop application, the default home directory where the notebooks and notes are saved to are under "Xilinotas" under "Documents" of the user's home directory, in Linux notion: "/home/loginname/Documents/Xilinotas/" (it can not be customized now). Under there, there are sub-directories based on your profile ID. If you haven't added additional profiles, all the notebooks and notes are saved under the "default" sub-directory. Notebooks are organized as directory trees and note files are under the associated notebook folders. (Note, if you are running a dev version from source, the directory would be "/home/loginname/Documents/XilinotasDev/").

#### Android app

The default home directory on Android is different. On Android 9 or older, the directory is "/Android/data/ac.mdiq.xilinota/files/Xilinotas". On Android 10 or newer, the directory is chosen by you upon first start of Xilinota. These directories can not be changed at the moment. (With dev version, on Android 9 or older, the directory is "/Android/data/ac.mdiq.xilinota.D/files/XilinotasDev".

#### Mechanisms

Upon the start of Xilinota when the home directories don't exist, Xilinota will create them and populate them with sub-directories and files. If you have lots of notes, there's going to be a short wait, (with Xilinota desktop) a popup with an animating bar indicates the task is in progress. Sub-directories are named with the titles of the notebooks. Files are named with the titles of the notes, as: "the note title.md". In the case of a to-do note, it is named as "X - note title.md" (if the to-do is not completed), or "V - note title.md" (if the to-do has been completed).

Any special character among `?:\"*|/\\<>` in the title are removed.

You can create, update, move, delete notes or notebooks in Xilinota and the files and directories are promptly updated.

#### Resources

The whole resources folder is now relocated from the original config directory to the profile's home directory (e.g. "/home/loginname/Documents/Xilinotas/default/.resources"). The relocation of the directory is handled automatically when directory "resources" exists in the original config directory. Same as usual, this directory contains all resource files of notes associated with the profile.

In the directory of every notebook, there is a sub-directory ".resources" that contains all resources related to notes in the notebook. The resources files in this sub-directory are <mark>hard-links</mark> (on desktop) or <mark>copies</mark> (on mobile) to the ones in the whole resources folder. Markdown file shown in external viewer now shows the related resources. Resource files are automatically populated when the "Xilinotas" directory first gets populated and are saved on note updates when resources are added to a note. Resources now follow the associated note, i.e., when you move/remove note (within Xilinota), the related resource files will be similarly handled.

Supported formats of resources in notes are following (this is only for technical info and not a concern for normal usage of Xilinota application):
```
![image](:/f5c27bc3b7fb4116a10fbf0f1cbfefef)
![image](.resources/f5c27bc3b7fb4116a10fbf0f1cbfefef.xyz)
<img width="684" height="306" src=":/f5c27bc3b7fb4116a10fbf0f1cbfefef"/>
<img width="684" height="306" src=".resources/f5c27bc3b7fb4116a10fbf0f1cbfefef.xyz"/>
```
"_resources" sub-directory in the directory of every notebook is reserved for future use.

Note: due to the relocation of the resources folder, if you migrate from Joplin by feeding Xilinota with renaming Joplin's config directory, and if you rename the resulting config directory back for Joplin, you will also need to manually move the resources folder back.

#### Sync of files/folders and notes/notebooks

Files and folders in the file system are sync'ed back to Xilinota. The process takes place at the start of Xilinota. With Xilinota desktop, similar to the first file population process, there is a popup with an animated bar during the sync process. In the mobile apps, this sync process runs in the background without blocking any other functions of Xilinota.

Any added or deleted note files or folders will be synced into Xilinota (an empty folder added is ignored). A markdown file if edited after the previous exit of Xilinota is also synced. Adding an external folder with markdown files will get all files synced in. Removing a folder also results in getting all notes in the folder removed from Xilinota after sync (though the notebook corresponding to the folder stays).

A positive note: if you remove the home directory, or the profile directory (e.g. default) under the home directory, or all the folders and files under the profile directory, Xilinota will not delete all of your notes and notebooks in the DB, rather it will re-populate the entire home directory. Also note that since the whole resources folder is under the profile directory, if you delete that, it will not be re-generated.

#### Special notice and limitations

Currently, moving folders in the file system is not synced into Xilinota. Also, moving a note to another folder is not supported for syncing and this is not encouraged because manually moving a note file can result in mismatched resources linked. So these operations are better conducted within Xilinota.
For more read [here](readme/welcome/3_Notes_and_markdown_files.md)

## New Feature #2: Instant sync among devices

Syncing notes through cloud, external servers, or with the assistance of third-party application like Syncthing can still be used if you like. Xilinota propose a new way for you to sync your notes: an instant way, which surely is more convenient. Certainly Xilinota runs on multiple platforms you choose, however, all those are to serve one person: you, the user. So the capability of doing instant sync removes the process of going a long way through complicated setups and handling. Here is how it works.

Currently, it assumes that you use your computer doing the heavy work of note-taking and your phones being assistants or doing the casual parts. You can choose to keep only part or all the notebooks from your computer onto any phone (I like the phones being lighter and not keep all the complex professional notes that I work on my computer, but you can have your own choice).

To start, ensure to set a same private passcode in Xilinota on all your devices. This can be done in Options (or Configuration) -> Application.

Now say you have Notebook1 and Notebook2 on your computer that you want to also keep on your PhoneA. When the computer and PhoneA are on the same local network (they connect automatically), you select Notebook1 and Notebook2, right-click to get the popup menu and choose "Send to peers". Then the two notebooks together with their substructures and notes are sent to PhoneA. You can also do a similar thing from a phone to the computer or other devices. At the moment, transfer rate is throttled to about 2 notes per second, just so that the receiver can keep up the workload.

Now your computer and PhoneA have Notebook1 and Notebook2, when you edit and save any note in the shared notebooks on any device, the note gets instantly sync'ed to the other(s).

Your computer may have Notebook3 and PhoneA may have PhoneNotes, the editing in the unshared notebooks are not synced. But you can send notes from these unshared notebooks to other devices instantly by selecting any notes and choosing "Send to peers" from the popup menu. Notes received will be put to an automatically created notebook named \_InBox.

When you move a note or sub-notebook in a shared notebook, it will be moved accordingly on other devices. If you move a note to an unshared notebook, then it will be deleted on other devices. And if you delete a note or notebook in a shared notebook, it will also be deleted on other devices.

Offline operations on notes and notebooks are cross-sync'ed when a device comes connected with other devices (with a desktop as a hub). Syncing of deleted notebooks offline is now being observed and not enabled in published apps.

Sending notebooks from the desktop can be targeted to a specific device or to all.

When a note has been edited on multiple devices during offline time, upon coming online, the note is copied to a notebook named "Conflicts" on each device for manual processing.

#### Special notice, limitations and todo's

Currently there is no indication on whether a device is connected with others in the network. The connection is very instantaneous, so you can basically assume they are connected if your devices are online, the private passcode is set with the same token on all devices, and Xilinota has been started on the devices. A way of indication will be added later.

Sending a root notebook may take some time. Currently, there is animated popup window (on desktop only) indicating task in progress (though no progress report), and when the task finishes, the popup window is closed. Basically for an estimate, it takes per note a half second idle time (throttled) plus a little time for sending. Sending or syncing a single note is instantaneous and there is no need for any progress indication.

Embedded resources (images) are not sent or synced. I plan to do on-demand-transfer when a note containing the resource is opened, and this is yet to be implemented.

Sending notes (and sending notebooks from mobile) are to all connected devices at the moment. So if you want to send to a specific device now, ensure that Xilinota is not running on other devices.
For more read [here](readme/welcome/4_synchronising_your_notes.md)

## Other notable new features

### Virtual notebooks

Usually we put notes in notebooks (or folders). It's a common way to organize note items. The issue is quite often a note hardly only belongs to one notebook category. For instance, should a note about "sports car" be put in notebook "Sports" or notebook "Cars"? So resignedly we put it in one "more related" notebook, "Cars". Fortunately with many tools we can use tags to assist categorization, so we tag the note with "Sport" and "Car", but that involves a lot of manual work for large amount of notes. So here comes the virtual notebook feature to help.

To put it simple, virtual notebook can be also called automated tags. At the moment, tags are still created by the user, either by assigning tags to a notes in the usual way, or creating loose tags. Say with tag "Sport", which has been assigned to 8 notes manually by you, laboriously. And as usual, when the you click on tag "Sport", Xilinota shows the 8 notes linked to the tag. Virtual notebook goes a step further: when you right-click (or on mobile simply long-press) on tag "Sport" and choose "Virtual" from the menu, Xilinota shows you all the notes containing the word "Sport", now, 126 notes, including the aforementioned note about sports cars. So now, tag "Sport" behaves like a notebook containing most notes related to sport. It's kind of like doing a search, but the virtual notebook here is more about organization than the casual search.
For more read [here](readme/welcome/5_Other_notable_features.md)

### Daily automatic backup of DB file

On every start, Xilinota checks to see the status of the backup file. If it's older than a day, a new backup is performed. The backed-up file is named "database.sqlite.bak" and is stored next to the db file "database.sqlite" in the associated profile config directory. On Linux, this should be: "/home/loginname/.config/xilinota-desktop/" or a sub-directory of it for a specific profile.

#### Special notice and limitations

This feature is only available on the desktop app.
For more read [here](readme/welcome/5_Other_notable_features.md)

### Efficiency improvements

One efficiency improvement is on the frequency of saving notes during editing. The mechanism was to save the edited note to DB on every key stroke, which appears quite inefficient. Now, note is saved every 60 seconds, or upon leaving the note editor. Unchanged notes are not saved.

Editor efficiency is further improved by minimizing resource lookups during editing.

#### Limitations

Rich text editor is currently not supported.
For more read [here](readme/welcome/5_Other_notable_features.md)

## Versions

I've tested the apps on Linux and Android. I don't have Mac or Windows machines and would appreciate anyone testing them.
I have been using the apps on Linux and Android. I don't have Mac or Windows machines and would appreciate anyone testing them.

## Special note

Expand Down
2 changes: 1 addition & 1 deletion packages/app-desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xilinota/app-desktop",
"version": "2.14.0",
"version": "2.14.1",
"description": "Xilinota for Desktop",
"main": "main.js",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/app-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2097726
versionName "2.14.0"
versionName "2.14.1"
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/app-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@xilinota/app-mobile",
"description": "Xilinota for Mobile",
"license": "AGPL-3.0-or-later",
"version": "2.13.2",
"version": "2.14.1",
"private": true,
"scripts": {
"start": "BROWSERSLIST_IGNORE_OLD_DATA=true react-native start --reset-cache",
Expand Down
Loading

0 comments on commit c0ff42d

Please sign in to comment.