|
@@ -40,6 +40,9 @@ or if terminal apps are your preference.
|
|
The <code>**dirnotes-cli**</code> is a command line tool,
|
|
The <code>**dirnotes-cli**</code> is a command line tool,
|
|
which may be handy for scripting. This all can also do maintenance on the database.
|
|
which may be handy for scripting. This all can also do maintenance on the database.
|
|
|
|
|
|
|
|
+<img src=images/gui_sample.png alt="gui sample" />
|
|
|
|
+<img src=images/tui_sample.png alt="tui sample" />
|
|
|
|
+
|
|
## USAGE
|
|
## USAGE
|
|
|
|
|
|
The <code>**dirnotes**</code> program displays usage and keystoke info
|
|
The <code>**dirnotes**</code> program displays usage and keystoke info
|
|
@@ -49,7 +52,7 @@ The <code>**dirnotes-cli**</code> program has a man page.
|
|
|
|
|
|
In short, you navigate <code>**dirnotes**</code> and
|
|
In short, you navigate <code>**dirnotes**</code> and
|
|
<code>**dirnotes-tui**</code> by using the up/down arrow keys,
|
|
<code>**dirnotes-tui**</code> by using the up/down arrow keys,
|
|
-<enter> to enter into a directory.
|
|
|
|
|
|
+\<enter\> to enter into a directory.
|
|
The **-tui** version accepts _e_ for edit, _s_ for sort, _M_ to change
|
|
The **-tui** version accepts _e_ for edit, _s_ for sort, _M_ to change
|
|
between xattr/database priority.
|
|
between xattr/database priority.
|
|
|
|
|
|
@@ -68,10 +71,22 @@ The <code>**dirnotes**</code> app requires _Python3_ and the _Qt5_ framework.
|
|
The <code>**dirnotes-tui**</code> and <code>**dirnotes-cli**</code> apps
|
|
The <code>**dirnotes-tui**</code> and <code>**dirnotes-cli**</code> apps
|
|
simply require _Python3_.
|
|
simply require _Python3_.
|
|
|
|
|
|
-Simply copy the file into your path, to ~/.local/bin for example.
|
|
|
|
|
|
+Simply mark the 3 python files as executable copy them into your
|
|
|
|
+path, to <code>\~/.local/bin/</code> or <code>/usr/local/bin/</code>.
|
|
|
|
+
|
|
|
|
+ chmod a+x dirnotes dirnotes-tui dirnotes-cli
|
|
|
|
+ cp dirnotes dirnotes-tui dirnotes-cli \~/.local/bin/
|
|
|
|
+
|
|
For a better GUI experience, copy
|
|
For a better GUI experience, copy
|
|
-<code>dirnotes.desktop</code> to <code>~/.local/share/applications</code> and
|
|
|
|
-<code>dirnotes.xpm</code> to <code>~/.local/share/icons/</code>
|
|
|
|
|
|
+<code>dirnotes.desktop</code> to <code>\~/.local/share/applications</code> and
|
|
|
|
+<code>dirnotes.xpm</code> to <code>\~/.local/share/icons/</code>
|
|
|
|
+
|
|
|
|
+If you are using the command-line tool <code>**dirnotes-cli**</code>,
|
|
|
|
+you can generate a man page using
|
|
|
|
+
|
|
|
|
+ pandoc -s -t man -o dirnotes-cli.1 dirnotes-cli.md
|
|
|
|
+
|
|
|
|
+and copy that to ```~/.local/share/man/man1```
|
|
|
|
|
|
### CONFIG FILE
|
|
### CONFIG FILE
|
|
|
|
|
|
@@ -79,9 +94,9 @@ By default, the file **~/.config/dirnotes/dirnotes.conf** will be used to
|
|
load the user's config.
|
|
load the user's config.
|
|
This is a JSON file, with three attributes that are important:
|
|
This is a JSON file, with three attributes that are important:
|
|
|
|
|
|
-> * xattr_tag (default: <code>usrr.xdg.comment</code>)
|
|
|
|
-> * database (default: <code>~/.local/share/dirnotes/dirnotes.db</code>, sensible alt: <code>/var/lib/dirnotes.db</code>)
|
|
|
|
-> * start_mode (_xattr_ or _db_ display priority)
|
|
|
|
|
|
+* xattr_tag (default: <code>user.xdg.comment</code>)
|
|
|
|
+* database (default: <code>~/.local/share/dirnotes/dirnotes.db</code>, sensible alt: <code>/var/lib/dirnotes.db</code>)
|
|
|
|
+* start_mode (_xattr_ or _db_ display priority)
|
|
|
|
|
|
The _config_file_ should be auto-generated the first time one of
|
|
The _config_file_ should be auto-generated the first time one of
|
|
the **dirnotes** apps is run.
|
|
the **dirnotes** apps is run.
|
|
@@ -190,9 +205,7 @@ As comments are editted or appended, new records are added to the database.
|
|
Older records are are not purged. This gives you a history of the comments,
|
|
Older records are are not purged. This gives you a history of the comments,
|
|
but it means that fetching the most recent comment involves something like
|
|
but it means that fetching the most recent comment involves something like
|
|
|
|
|
|
-~~~~
|
|
|
|
- SELECT * FROM dirnotes WHERE name=? ORDER BY comment_date DESC
|
|
|
|
-~~~~
|
|
|
|
|
|
+ SELECT * FROM dirnotes WHERE name=? ORDER BY comment_date DESC
|
|
|
|
|
|
and just fetch the first record.
|
|
and just fetch the first record.
|
|
|
|
|
|
@@ -202,7 +215,12 @@ The database is created the first time one of the **dirnotes** apps is run.
|
|
|
|
|
|
The <code>**dirnotes**</code> gui app has a desktop icon built into the code.
|
|
The <code>**dirnotes**</code> gui app has a desktop icon built into the code.
|
|
There is not need for an external .icon file, but there is an .xpm file included
|
|
There is not need for an external .icon file, but there is an .xpm file included
|
|
-in the project, which can be copied to ~/.local/share/icons/
|
|
|
|
|
|
+in the project, which can be copied to <code>~/.local/share/icons/</code>
|
|
|
|
+
|
|
|
|
+The 3 apps share a big block of common code. At this point, the code is embedded
|
|
|
|
+in each executable, but perhaps in the future it will be brought out as a library.
|
|
|
|
+I just like apps to be a single file I can copy to my various devices and servers,
|
|
|
|
+but it does create a problem of keepint the 3 apps in sync.
|
|
|
|
|
|
### comment date & author
|
|
### comment date & author
|
|
|
|
|
|
@@ -262,10 +280,10 @@ Does anyone have an opinion?
|
|
|
|
|
|
2. Is it ok to put the config file and database file buried in ~/.config and ~/.local?
|
|
2. Is it ok to put the config file and database file buried in ~/.config and ~/.local?
|
|
|
|
|
|
-These directories exist on computers with a gui/windowing system installed,
|
|
|
|
-but don't neccessarily exist on headless servers.
|
|
|
|
-Perhaps the default locations should be in the user directory?
|
|
|
|
-(~/.dirnotes.conf and ~/.dirnotes.db)
|
|
|
|
|
|
+ These directories exist on computers with a gui/windowing system installed,
|
|
|
|
+ but don't neccessarily exist on headless servers.
|
|
|
|
+ Perhaps the default locations should be in the user directory?
|
|
|
|
+ (~/.dirnotes.conf and ~/.dirnotes.db)
|
|
|
|
|
|
3. Who needs translations?
|
|
3. Who needs translations?
|
|
|
|
|
|
@@ -284,3 +302,4 @@ Perhaps the default locations should be in the user directory?
|
|
- so, for example, the user can't add comments to /usr/bin/\*
|
|
- so, for example, the user can't add comments to /usr/bin/\*
|
|
|
|
|
|
6. Is anyone interested in the MacOS version?
|
|
6. Is anyone interested in the MacOS version?
|
|
|
|
+
|