From 7f710ff006bcf223f8f5c7c30b6748a84de71ec7 Mon Sep 17 00:00:00 2001 From: Dimitris Marakomihelakis Date: Mon, 21 Aug 2023 17:49:52 +0300 Subject: [PATCH] Update docs --- docs/auto-update.txt | 3 +- docs/commands.txt | 26 +++--- docs/disabling.txt | 5 - docs/github/README.md | 29 ++---- docs/github/RIGHTS.txt | 1 + docs/installing.txt | 29 +++--- docs/listnotes.txt | 2 +- docs/manpages/clipnote.1 | 99 ++++++++++++++++++++ docs/manpages/quicknote.1 | 3 - docs/manpages/rmdups.1 | 70 ++++++++++++++ docs/manpages/shellnotes.1 | 5 + docs/run.txt | 152 ------------------------------- docs/system/errors.txt | 3 +- docs/system/fileorganization.txt | 5 +- docs/system/hidden.txt | 7 +- docs/system/imports.txt | 20 ++-- docs/system/loggingsystem.txt | 11 ++- docs/uninstalling.txt | 12 +-- docs/updating.txt | 6 +- docs/warnings.txt | 7 +- 20 files changed, 249 insertions(+), 246 deletions(-) create mode 100644 docs/manpages/clipnote.1 create mode 100644 docs/manpages/rmdups.1 diff --git a/docs/auto-update.txt b/docs/auto-update.txt index d1c8890..fe2b863 100644 --- a/docs/auto-update.txt +++ b/docs/auto-update.txt @@ -1,8 +1,7 @@ auto-update =========== -In shellnotes 3.0 and later, there's a new auto-update feature, coming along with the installation -one. +In shellnotes 3.0 and later, there's an auto-update feature. After the installation, every time you open your terminal, shellnotes will search for new updates automatically. This might help users that don't want to run "shellnotes -u" every time a new version is released. diff --git a/docs/commands.txt b/docs/commands.txt index ae8ab0a..533c982 100644 --- a/docs/commands.txt +++ b/docs/commands.txt @@ -1,16 +1,14 @@ -Basic commands for shellnotes: - -newnote -quicknote -readnote -quickread -listnotes (-n/-d/-f) +(.)clearlogs +clipnote delnote (-all) -findnote -findmisplacednote -renamenote -shellnotes (-u/-v/-r/-l/-sd/-h/-au) -clearlogs -resetshellnotes (-f) -noteinfo +listnotes (-n/-d/-f/-v) +newnote notegrep (-sc/-cl/-cf/-sf/-ws/-m) +notewc +quicknote (-l/-r/-s) +quickread +readnote +renamenote +(.)resetshellnotes (-f) +rmdups +shellnotes (-u/-v/-r/-l/-sd/-h/-au) \ No newline at end of file diff --git a/docs/disabling.txt b/docs/disabling.txt index 4a72002..40b6754 100644 --- a/docs/disabling.txt +++ b/docs/disabling.txt @@ -7,8 +7,3 @@ How to disable (versions 3.0 and higher) making sure all the content of the source code is in the same directory. Then, choose the second (2) option. After restarting your terminal, shellnotes will not be recognised by your shell, until you enable it again, using option three (3). - -About disabling: - -Disabling is much safer than uninstalling. The files are kept in your system, but you do not - need to reinstall when you want to use the program and you don't risk to damage your shell - configuration. (see warnings in help page) \ No newline at end of file diff --git a/docs/github/README.md b/docs/github/README.md index 003a8a4..52e0a46 100644 --- a/docs/github/README.md +++ b/docs/github/README.md @@ -3,23 +3,20 @@ A easy, simple and fast way to keep notes via your linux terminal. # What is shellnotes? -Shellnotes is a note system for advanced linux and terminal users. It is made out of a lot of other commands and scripts, and has tons of abilities, like a logging system, an auto-update feature, and much more! -Shellnotes uses your favourite text editor to save notes on the go. If you are the type of guy that has his terminal open 24/7, you can also save notes __directly__ via terminal! -With shellnotes, you can make, find, list, edit or delete your notes from wherever you are, whenever you want. +Shellnotes is a command-line note-taking app for linux users. Shellnotes uses your favourite text editor to save notes on the go. With shellnotes, you can make, find, list, edit or delete your notes from wherever you are, whenever you want. You can use a variety of tools to manipulate your notes and extract data from them. # Why use shellnotes? #### Here's why: -* Shellnotes is the fastest and the safest way to take notes. -* It can suit both dynamic and regular users, as it brings a classic TUI experience as well as some more modern abilities. +* Shellnotes is open source. +* It can suit both dynamic and regular users, as it brings both CLI and GUI experiences. * It runs __exclusively__ in your terminal, its source files are stored in your home folder. * It's lightweight * It's [more than just a program for taking notes.](#learn-everything-shellnotes-can-do). It has a ton of other interesting abilities. * It's portable and compatible with most shells. -* It matches all the users' experience, by creating the appropriate environment for both beginners and advanced users linux users. * Even if you delete shellnotes, your notes will stay where they are. -* It has a simple file organization system and [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface). -* It's easy to install, delete, update or use. -* It's mostly written in [shell](https://en.wikipedia.org/wiki/Shell_script), which is the language for Unix/Linux [CLI](https://en.wikipedia.org/wiki/Command-line_interface) applications. +* It has a simple file organization system and [CLI](https://en.wikipedia.org/wiki/Command-line_interface). +* It's easy to install, delete and update. +* It's mostly written in [shell](https://en.wikipedia.org/wiki/Shell_script), which is one of the most commonly used apps to build Linux apps. # How to install After downloading the source code, navigate to the folder where it's stored, and execute the install script (`install.sh`), using the `sh` command. @@ -40,7 +37,7 @@ user@device:~/Downloads$ sh install.sh for more information, make sure to check out the [installation documentation](https://github.com/dmarakom6/shellnotes/blob/master/docs/installing.txt). -# How to set the defaults +# How to configure shellnotes Shellnotes lets you use your favourite text-editor to take your notes, and your prefered directory to save your notes, from where shellnotes will delete them, read them, or list them. ## How shellnotes works with text-editors There are to ways to write a note with shellnotes: @@ -48,7 +45,7 @@ There are to ways to write a note with shellnotes: 2. Using an in-terminal editor. ## The Default Note Editors Shellnotes comes with two default editors, which you can download or [change](#change-default-editors). These are: -1. [gedit](https://wiki.gnome.org/Apps/Gedit), the default [GNOME](https://www.gnome.org/) text editor. +1. [SnE](https://github.com/dmarakom6/shellnotes/blob/master/docs/sne.md). 2. [nano](https://www.nano-editor.org/), for in-terminal notes. @@ -57,7 +54,7 @@ Shellnotes __does not__ require the user to have the above editors. You can alwa After installing shellnotes, open your terminal, and type `shellnotes --set-defaults`. This will trigger the [shellnotes configuration tool](https://github.com/dmarakom6/shellnotes/blob/master/set_defaults.sh). Choose an option: 1. Select default [GUI](https://en.wikipedia.org/wiki/Graphical_user_interface) editor for regular notes. 2. Select in-terminal editor for instant notes. -3. Check default editors. +3. Select default path for saving your Notes. After selecting an option, write ___the name of the program___ you want to set as a new default GUI/terminal editor. It must be valid. (i.e. `code` for VSCode, `subl` for Sublime Text) Shellnotes will automatically locate the program's location and apply the changes. If the name is invalid, the operation will stop. @@ -69,14 +66,13 @@ To change the default note path, type `shellnotes --set-defaults` in the termina Select option 3 to change the default Notes folder, or option 4 to check the current one. If you choose option 3, type a valid __relative__ path to the new directory with permissions given. Shellnotes will automatically change the default folder to the new one. Your notes will be transfered there as well! > Note: You can check the current Notes folder either via "shellnotes -sd, option 4", or "listnotes --folder". - # Taking your first note You can either use `newnote` for regular notes, or `quicknote` for an in-terminal experience. ## Using `newnote` Open a terminal window after installing shellnotes. Type `newnote` and the name of the new note's name. If you don't set a name after the command as a parameter, shellnotes will ask you for it with a dynamic input. It should look like this: ``` -user@device:folder$ newnote helloWorld => no extension needed! +user@device:folder$ newnote helloWorld ``` or: ``` @@ -98,7 +94,6 @@ Enter note name: helloWorld `quicknote` will then open the [default quick notes editor](#the-default-note-editors). Now you can start saving your notes via terminal. ### Reading notes You can also read your notes in a similar way, using `readnote` and `quickread`. See more in the [commands file](https://github.com/dmarakom6/shellnotes/blob/master/docs/commands.txt). - # Learn everything shellnotes can do shellnotes is more than just that. Here's some documentation you might be interested in: * [how to delete shellnotes](https://github.com/dmarakom6/shellnotes/blob/master/docs/uninstalling.txt) @@ -114,10 +109,6 @@ shellnotes is more than just that. Here's some documentation you might be intere * [see what versions are supported](https://github.com/dmarakom6/shellnotes/blob/master/docs/github/SECURITY.md) * [get more info about shellnotes](https://github.com/dmarakom6/shellnotes/blob/master/docs/help) Want even more information? Feel free to see the whole [shellnotes documentation](https://github.com/dmarakom6/shellnotes/blob/master/docs/)! - - # Warnings! - *WARNING*: The default shell for shellnotes is bash. However, shellnotes will find your shell if it's different and continue installing according to it. If your shell is not supported though, the installation will fail. - *WARNING*: install.sh must be run from the folder where it was downloaded WITH the other files from the repo. Otherwise, installation will fail. (see [installation documentation](https://github.com/dmarakom6/shellnotes/blob/master/docs/installing.txt) for more). \ No newline at end of file diff --git a/docs/github/RIGHTS.txt b/docs/github/RIGHTS.txt index dea346b..fd56978 100644 --- a/docs/github/RIGHTS.txt +++ b/docs/github/RIGHTS.txt @@ -3,5 +3,6 @@ Permissions for users Shellnotes is under the "All rights reserved" category. You can only download the source code, but not change it or sell it. +Forks, pull requests and feedback are welcome. There is a copyright notice in every file. For further information, please contact the author at dmarakom@gmail.com . diff --git a/docs/installing.txt b/docs/installing.txt index 7afe8ee..10f9a89 100644 --- a/docs/installing.txt +++ b/docs/installing.txt @@ -1,41 +1,42 @@ About Installing ================ -How to install (versions 2.5 and lower) - -This installation is not supported by shellnotes. However, to install, place shellnotes.sh and help into his Home folder. Then, add a dot behind the names of the two files (.shellnotes.sh, .help). This will hide them from your folder. After that, open the terminal and type "chmod +x ~/.shellnotes.sh". This will give permissions to run the program. Finally, open your shell configuration file (ex. bashrc, zshrc) and put this line in the end of the file: "source ~/.shellnotes.sh". - How to install (versions 3.0 and higher) - -This installation is supported. It's an automatic reproduction of the above steps, all included in a single script. Just open the terminal, get to the directory where the files were downloaded and type "sh install.sh" to begin the installation proccess. + -It's an automatic reproduction of the steps for lower versions, all included in a single script. Just open the terminal, get to the directory where the files were downloaded and type "sh install.sh" to begin the installation proccess. About Installing: -Complete installation instructions for every version of shellnotes are given in the readme file (README.md). Here you will find some more advanced information about installing shellnotes. For Other Shell users: Shellnotes supports a variety of shells. The supported shells for installation are: - - Bash (Bourne Again Shell) - - Zsh - - Csh - - Ksh - - Fish + - Bash (Bourne Again Shell) (Most Compatible) + - Zsh (Compatible) + - Csh (Compatible) + - Ksh (Compatible) + - Fish (Untested) During the installation process, the installation program (install.sh) will find the user's shell and install shellnotes according to the shell's configuration. If your shell is not supported, shellnotes will not be installed. Bash is the default shell for shellnotes. Although it supports others, there might be bugs/problems while running it in a non-bash shell. We highly recommend switching to bash if you want a full experience with shellnotes. If your shell is not one of the above, we recommend installing one on the list. For Mac Users: - MacOS usually uses bash as its default shell, this means that the program will work properly, but the user will have to change the default path as well as the editors. + MacOS usually uses bash as its default shell, however this does not mean that the program will work properly. Compatibility with MacOS hasn't been tested. For Windows Users: - The only possible way for the user to use shellnotes in a Windows PC, is to install Windows Terminal. Windows Terminal is a multi-tabbed command-line front-end that Microsoft has developed for Windows 10, as a replacement for Windows Console. It can run any command-line app, including all Windows terminal emulators, in a separate tab. It is preconfigured to run Command Prompt, PowerShell, WSL, SSH, and Azure Cloud Shell Connector. If the user changes the default path and text editors, the program might work. + The only possible way for the user to use shellnotes in a Windows PC, is to install WSL on Windows Terminal. Windows Terminal is a multi-tabbed command-line front-end that Microsoft has developed for Windows 10, as a replacement for Windows Console. It can run any command-line app, including all Windows terminal emulators, in a separate tab. It is preconfigured to run Command Prompt, PowerShell, WSL, SSH, and Azure Cloud Shell Connector. With a few tweaks, the program might work. - For other distro Users: + For other (linux) distro Users: Installation and use is the same. In case the user switches to a different shell after installation: - Repeat installation (Run sh ~/.shellnotes/install.sh). + Repeat installation (Run sh ~/.shellnotes/install.sh) OR do source ~/.shellnotes/.shellnotes.sh in your configuation. Installation failed? Here's why: -Your shell is not supported by shellnotes -You didn't run the installation file in the right directory - -Your version is outdated or its installation is not supported (see SECURITY.md) + -Your version is outdated or installation is not supported (see SECURITY.md) -You already have shellnotes installed + + +How to install (versions 2.5 and lower) + -This installation is not supported. However, to install, place shellnotes.sh and help into his Home folder. Then, add a dot behind the names of the main file (.shellnotes.sh). This will hide them from your folder. After that, open the terminal and type "chmod +x ~/.shellnotes.sh". This will give permissions to run the program. Finally, open your shell configuration file (ex. bashrc, zshrc) and put this line in the end of the file: "source ~/.shellnotes.sh". \ No newline at end of file diff --git a/docs/listnotes.txt b/docs/listnotes.txt index db983dc..9957861 100644 --- a/docs/listnotes.txt +++ b/docs/listnotes.txt @@ -5,6 +5,6 @@ The listnotes command was introduced in shellnotes 1.2x and uses the command ls With listnotes, you can use parameters as well. For example: -listnotes -d or --dynamic for a dynamic view of all your notes and their content -listnotes -n or --number to see how many notes you have. +Do 'man listnotes' for all options. -If listnotes doesn't show your note, try 'findmisplacednote' to track it. If listnotes doesn't recognize your notes folder, try running the shellnotes configuration tool (shellnotes -sd) \ No newline at end of file diff --git a/docs/manpages/clipnote.1 b/docs/manpages/clipnote.1 new file mode 100644 index 0000000..2c4a6c9 --- /dev/null +++ b/docs/manpages/clipnote.1 @@ -0,0 +1,99 @@ +.\" Manpage for shellnotes-clipnote. +.\" Contact dmarakom@gmail.com to correct errors or typos. + +.TH clipnote 1 +.SH NAME + +shellnotes-clipnote \- manipulate clipboard and notes + +.SH SYNOPSIS +.PP +.B clipnote +[\fIOPTION\fR] +[\fINOTENAME\fR] + +.SH DESCRIPTION + +.B clipnote +manipulates clipboard and notes. + +.SH OPTIONS + +.TP +.BR \-r ", " \--reverse +Copy the content of a note into the clipboard. + +.SH ARGUMENTS + +.TP +.BR \fINOTENAME\fR +Name of the note to create or copy from. + +.SH USAGE + +Create a new note from the clipboard content: +.PP +.B clipnote +[\fINOTENAME\fR] + +Copy the content of a note into the clipboard: +.PP +.B clipnote +\fB\-r\fR +\fINOTENAME\fR + +.SH AUTHOR + +Dimitris Marakomihelakis (dmarakom@gmail.com) + +.SH NOTES + +This command requires the 'xclip' utility to be installed. + +.SH COPYRIGHT + +(C) Dimitris Marakomihelakis + +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. + +.SH BUGS + +None known. + +.SH SEE ALSO + +.BR xclip (1) + +.SH EXAMPLES + +Create a new note named "example" from clipboard content: +.PP +.B clipnote +example + +Copy the content of the note "my_note" into the clipboard: +.PP +.B clipnote +\fB\-r\fR +my_note + +.SH FILES + +Notes are stored in the default notes folder. + +.SH ENVIRONMENT + +Default notes folder can be set using the \fBDEFAULT_PATH\fR environment variable. + +.SH HISTORY + +The \fBclipnote\fR command was introduced in version 4.0 of the shellnotes utility. + +.SH BUG REPORTS + +Please report bugs to dmarakom@gmail.com. + +.SH COPYRIGHT + +This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/docs/manpages/quicknote.1 b/docs/manpages/quicknote.1 index a8c20e6..3d1e994 100644 --- a/docs/manpages/quicknote.1 +++ b/docs/manpages/quicknote.1 @@ -17,9 +17,6 @@ shellnotes-quicknote \- write a new note directly via terminal. uses your in-terminal text-editor to write a new note and saves it into your notes folder when finished. It works well with the nano editor. -.\".SH OPTIONS - -.\".SH BUGS .SH AUTHOR diff --git a/docs/manpages/rmdups.1 b/docs/manpages/rmdups.1 new file mode 100644 index 0000000..3b4a629 --- /dev/null +++ b/docs/manpages/rmdups.1 @@ -0,0 +1,70 @@ +.\" Manpage for shellnotes-rmdups.sh. +.\" Contact dmarakom@gmail.com to correct errors or typos. + +.TH rmdups 1 +.SH NAME + +shellnotes-rmdups.sh \- remove duplicate lines from a note + +.SH SYNOPSIS +.PP +.B rmdups +[\fIOPTION\fR] +[\fINOTENAME\fR] + +.SH DESCRIPTION + +.B rmdups +removes duplicate lines from a note. + +.SH ARGUMENTS + +.TP +.BR \fINOTENAME\fR +Name of the note to remove duplicate lines from. + +.SH USAGE + +Remove duplicate lines from a note: +.PP +.B rmdups +[\fINOTENAME\fR] + +.SH AUTHOR + +Dimitris Marakomihelakis (dmarakom@gmail.com) + +.SH NOTES + +None. + +.SH BUGS + +None known. + +.SH EXAMPLES + +Remove duplicate lines from a note named "my_note": +.PP +.B rmdups +my_note + +.SH FILES + +Notes are stored in the default notes folder. + +.SH ENVIRONMENT + +Default notes folder can be set using the \fBDEFAULT_PATH\fR environment variable. + +.SH HISTORY + +The \fBrmdups\fR command was introduced in version 4.0 of the shellnotes utility. + +.SH BUG REPORTS + +Please report bugs to dmarakom@gmail.com. + +.SH COPYRIGHT + +This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/docs/manpages/shellnotes.1 b/docs/manpages/shellnotes.1 index 8d1fe60..9e06917 100644 --- a/docs/manpages/shellnotes.1 +++ b/docs/manpages/shellnotes.1 @@ -49,6 +49,11 @@ Shellnotes auto-update searches for a new a new update in the project's github r .BR \-sd ", " \--set-defaults Redirects the user to the shellnotes configuration tool (set_defaults.sh) +.TP +.BR \-ght ", " \--set-github-token +Sets default github token for uploading notes to Github Gists via the Shellnotes Note Editor (SnE). + + .TP .BR \-l ", " \--logs View a logfile. diff --git a/docs/run.txt b/docs/run.txt index 6b423d5..d884518 100644 --- a/docs/run.txt +++ b/docs/run.txt @@ -1,158 +1,6 @@ How to run the files ==================== -The only files the user must run are located in the main branch of the source code tree: .shellnotes/ - -The tree looks like this: - - |-- bash_update.sh -|-- def -| `-- defaults.sh -|-- docs -| |-- auths -| | |-- author.txt -| | `-- contributors.txt -| |-- auto-update.txt -| |-- commands.txt -| |-- disabling.txt -| |-- github -| | |-- README.md -| | |-- RIGHTS.txt -| | `-- SECURITY.md -| |-- help -| |-- installing.txt -| |-- listnotes.txt -| |-- manpages -| | |-- delnote.1 -| | |-- findmisplacednote.1 -| | |-- findnote.1 -| | |-- listnotes.1 -| | |-- newnote.1 -| | |-- noteinfo.1 -| | |-- quicknote.1 -| | |-- quickread.1 -| | |-- readnote.1 -| | |-- renamenote.1 -| | `-- shellnotes.1 -| |-- run.txt -| |-- setdefaults.txt -| |-- system -| | |-- errors.txt -| | |-- fileorganization.txt -| | |-- hidden.txt -| | |-- imports.txt -| | |-- loggingsystem.txt -| | |-- manpages.txt -| | |-- requirements.txt -| | |-- reset.txt -| | `-- syntax.txt -| |-- uninstalling.txt -| |-- updating.txt -| |-- versions.txt -| `-- warnings.txt -|-- image -| `-- shellnotes.jpg -|-- install.sh -|-- logs -| |-- disfailed.txt -| |-- enfailed.txt -| |-- ifailed.txt -| |-- sdfailed.txt -| |-- ufailed.txt -| `-- uninfailed.txt -|-- set_defaults.sh -|-- uninstall.sh -|-- update.sh -|-- util -| |-- ChMkDir.sh -| |-- ChUpd.sh -| |-- au -| | `-- au.sh -| |-- delnote.sh -| |-- exec -| | |-- clearlogs -| | |-- disfailed -| | |-- enfailed -| | |-- ifailed -| | |-- sdfailed -| | |-- ufailed -| | |-- uninfailed -| |-- logfiles -| | |-- disfailed.cpp -| | |-- enfailed.cpp -| | |-- ifailed.cpp -| | |-- sdfailed.cpp -| | |-- ufailed.cpp -| | `-- uninfailed.cpp -| |-- findmisplacednote.sh -| |-- findnote.sh -| |-- getv.sh -| |-- h -| | `-- h.sh -| |-- l -| | `-- l.sh -| |-- listnotes -| | |-- d -| | | |-- d.py -| | | |-- d.sh -| | | |-- display.py -| | | `-- dmain.py -| | |-- f -| | | `-- f.sh -| | |-- n -| | | `-- n.sh -| | `-- output -| | |-- dir.txt -| | |-- direrr.txt -| | |-- files.txt -| | |-- fileserr.txt -| | `-- listnotes.txt -| |-- listnotes.sh -| |-- newnote.sh -| |-- noteinfo.sh -| |-- quicknote.sh -| |-- quickread.sh -| |-- r -| | `-- r.sh -| |-- readnote.sh -| |-- renamenote.sh -| |-- sd -| | |-- sd-input1.txt -| | |-- sd-input2.txt -| | |-- sd-input3.txt -| | `-- sd.sh -| |-- shellnotes.sh -| |-- u -| | `-- u.sh -| `-- v -| `-- v.sh -`-- ver - - -Or, in a ls -al representation: - - drwxrwxr-x 8 dimitris dimitris 4096 Apr 18 13:00 . - drwxr-xr-x 42 dimitris dimitris 4096 Apr 18 21:51 .. - -rw-r--r-- 1 dimitris dimitris 1056 Apr 10 12:10 .shellnotes.sh - -rw-r--r-- 1 dimitris dimitris 4580 Apr 18 12:45 bash_update.sh - drwxr-xr-x 2 dimitris dimitris 4096 Apr 3 11:55 def - drwxr-xr-x 6 dimitris dimitris 4096 Apr 3 11:55 docs - drwxr-xr-x 2 dimitris dimitris 4096 Apr 3 11:55 image - -rw-r--r-- 1 dimitris dimitris 3682 Apr 18 13:11 install.sh - drwxr-xr-x 2 dimitris dimitris 4096 Apr 18 13:01 logs - -rw-r--r-- 1 dimitris dimitris 2499 Apr 18 12:47 set_defaults.sh - -rw-r--r-- 1 dimitris dimitris 3563 Apr 18 12:46 uninstall.sh - -rw-r--r-- 1 dimitris dimitris 1646 Apr 18 12:45 update.sh - drwxr-xr-x 14 dimitris dimitris 4096 Apr 18 12:06 util - drwxr-xr-x 2 dimitris dimitris 4096 Apr 3 11:56 ver - - -And in a dir style: - - bash_update.sh docs install.sh set_defaults.sh update.sh ver - def image logs uninstall.sh util - - Files inside .shellnotes/ are the ones you can run. The files inside the subfolders (util, def, logs, ver) must not be run. After the installation, the folder .shellnotes is created in the home (~) folder. diff --git a/docs/system/errors.txt b/docs/system/errors.txt index c36af36..1ddc3fe 100644 --- a/docs/system/errors.txt +++ b/docs/system/errors.txt @@ -3,4 +3,5 @@ errors Some errors are logged into .shellnotes/logs/ which you can check with "shellnotes -l". These are usually errors that occur during processes, like installing, uninstalling, updating, -enabling or disabling, failing to set defaults etc. \ No newline at end of file +enabling or disabling, failing to set defaults etc. +You can also (4.0+) display the logs of the Shellnotes Notes Editor using the same command. \ No newline at end of file diff --git a/docs/system/fileorganization.txt b/docs/system/fileorganization.txt index 1111fcc..2b76f2b 100644 --- a/docs/system/fileorganization.txt +++ b/docs/system/fileorganization.txt @@ -9,9 +9,10 @@ Files the user can run manually are located in ~/.shellnotes/ after the installa -.shellnotes.sh -> Running shellnotes (main file) Other folders and their content: - -util: all the commands used in ~/.shellnotes/.shellnotes.sh, as well as all its subfolders. + -util: all the commands used in ~/.shellnotes/.shellnotes.sh (subfolders are their parameters). -def: default note editors and folders used in configuration tool. -logs: Logfiles for failed updates, installations etc. - -ver: Current shellnotes version + -ver: Current shellnotes version, used when updating. + -sne: The source code, environment and logs for the Shellnotes Note Editor. -docs: Documentation -image: .jpg and .png files used for README diff --git a/docs/system/hidden.txt b/docs/system/hidden.txt index ecff3a7..8266b8f 100644 --- a/docs/system/hidden.txt +++ b/docs/system/hidden.txt @@ -1,10 +1,7 @@ hidden commands =============== -Most shellnotes' commands are known, and shown in commands.txt, but some scripts contain hidden -commands as well. These scripts are hidden files and can be found in .shellnotes/util/.hidden/. +Shellnotes have hidden commands as well. Their scripts are hidden files and can be found in .shellnotes/util/.hidden/. -They are hidden mainly because shellnotes does not want the user to use them on a daily basis. This -is because they stop or start extra processes, clear logfiles, or change valuable information and -data in the source path. The user can always refer to these commands, but only when necessary. +They are hidden mainly because shellnotes does not want the user to use them on a daily basis. They change valuable information like configuration and logs. The user can always refer to these commands, but only when necessary. Otherwise, it is not recommended to use them. \ No newline at end of file diff --git a/docs/system/imports.txt b/docs/system/imports.txt index 919b482..7bc2a13 100644 --- a/docs/system/imports.txt +++ b/docs/system/imports.txt @@ -2,30 +2,26 @@ shellnotes imports rule ======================= The main script for running shellnotes is .shellnotes.sh found in ~/.shellnotes/.shellnotes.sh after -the installation. This file contains the user's default shell, found during the installation -proccess, as well as all the imports needed for the program to work. The imports consist of: +the installation. This file contains the user's default shell's shebang, found during the installation +proccess, as well as all the imports needed for the program to work. These are: 1. Commands (most of the files found in /util) - 2. Scripts run every time the terminal is launched (i.e. Version getter (getv)) - 3. The shellnotes command with all of its parameters (file found in /util/shellnotes.sh, params - in subfolders of util/) - 4. "Hidden" commands (files containing a (.) in /util, actions for cleaning space etc.) + 2. Scripts run every time the terminal is launched (i.e. Version retriever (getv)) + 3. "Hidden" commands (files containing a (.) in /util, actions for clearing space etc.) In the .shellnotes.sh file, the imports are ordered like this: - #user's shell + #!user's shell #Warnings #Warnings - scripts run every time the terminal is launched + ->scripts run every time the terminal is launched - utility scripts (commands) found in ~/.shellnotes/util/ + ->utility scripts (commands) found in ~/.shellnotes/util/ - . ~/.shellnotes/util/shellnotes.sh -> The shellnotes command, which imports all its parameters + -> . ~/.shellnotes/util/shellnotes.sh -> The shellnotes command - Hidden commands (i.e. clearlogs, run only when necessary) - diff --git a/docs/system/loggingsystem.txt b/docs/system/loggingsystem.txt index 9ae6883..ecc679c 100644 --- a/docs/system/loggingsystem.txt +++ b/docs/system/loggingsystem.txt @@ -1,8 +1,8 @@ shellnotes logging system ========================= -The shellnotes logging system consists of .cpp (C++) files, that are compiled and run -if an error occurs when updating, installing or setting default editors and folders for your notes. +The shellnotes logging system consists of .cpp (C++) files, that are precompiled and run +if an error occurs while using shellnotes. Errors that might occur: update.sh / bash_update.sh: @@ -27,10 +27,16 @@ Errors that might occur: uninstall.sh (enabling option 3): -Shellnotes is already enabled -Shellnotes is uninstalled + SnE (Shellnotes Notes Editor): + -Note name is invalid (i.e. "") + -Github Token is not set (when pasting to Gists, do shellnotes -ght) + -Failed to save a new note If any of the above errors occur in runtime, the matching .cpp file found in ~/.shellnotes/util/failed/ write a report of the error containing the type of error and the date in the matching logfiles found in ~/.shellnotes/logs/. +For SnE, since it is a python script, the loguru module is being used everytime an error occurs and is saved to ~/.shellnotes/sne/logs/. + Opening the logfiles: -Do NOT open the files manually using any text editor. Use "shellnotes --logs" to select a logfile and check it. @@ -40,6 +46,7 @@ Opening the logfiles: ~/.shellnotes/logs/ifailed.txt - failed attempt to install shellnotes. ~/.shellnotes/logs/uninfailed.txt - failed attempt to uninstall shellnotes. ~/.shellnotes/logs/ufailed.txt - failed attempt to update shellnotes. + ~/.shellnotes/sne/logs/ - errors/info while running SnE. To close a file after you chose to open it, press "Q". Shellnotes uses the less command to view its logfiles. diff --git a/docs/uninstalling.txt b/docs/uninstalling.txt index c4389ce..5e62776 100644 --- a/docs/uninstalling.txt +++ b/docs/uninstalling.txt @@ -2,16 +2,14 @@ About Uninstalling ================== How to uninstall (versions 2.5 and lower) - -Deleting shellnotes >2.5 is done manually (just like installing). Delete the hidden(.) files from your Home folder, then delete or comment-out the line where the source to the file is used from your shell configuration file. + -Deleting shellnotes <2.5 is done manually (just like installing). Delete the hidden(.) files from your Home folder, then delete or comment-out the line where the source to the file is used from your shell configuration file. How to uninstall (version 3.0 and higher) - -Deleting shellnotes <3.0 is done automatically (just like installing). Run the file uninstall.sh by typing "sh ~/.shellnotes/uninstall.sh" and select the first option. Then restart your terminal. + -Deleting shellnotes >3.0 is done automatically (just like installing). Run the file uninstall.sh by typing "sh ~/.shellnotes/uninstall.sh" and select the first option. Then restart your terminal. About uninstalling: -Your notes will stay in your notes folder even if you choose to delete shellnotes. - -If you get an error every time you launch the terminal, more than one source for the scripts - have been sent to your shell configuration file. To stop the error messages, open the - configuration file and delete 'source ~/.shellnotes/.shellnotes.sh', usually found in the last + -If you get an error every time you launch the terminal, open your shell configuration + (i.e. .zshrc) and remove 'source ~/.shellnotes/.shellnotes.sh', usually found in the last line of the file. - For other users: - Uninstallation must be done manually by the user. + diff --git a/docs/updating.txt b/docs/updating.txt index 241320a..8422c31 100644 --- a/docs/updating.txt +++ b/docs/updating.txt @@ -2,10 +2,10 @@ About Updating ============== How to update: - For non-bash shell users, there is a file called update.sh in ~/.shellnotes/. The user can run this script by typing sh ~/.shellnotes/update.sh - For bash users, there is a unique update file called bash_update.sh. Run it with: + - For bash users, there is a unique update file called bash_update.sh. Run it with: bash ~/.shellnotes/bash_update.sh. - Or just type "shellnotes --update" in your terminal and shellnotes will find your shell and + - For other shell users, there is a file called update.sh in ~/.shellnotes/. The user can run this script by typing sh ~/.shellnotes/update.sh + - Or just type "shellnotes --update" in your terminal and shellnotes will find your shell and redirect you to the correct update script. About updating: diff --git a/docs/warnings.txt b/docs/warnings.txt index a9c76f7..a6110e9 100644 --- a/docs/warnings.txt +++ b/docs/warnings.txt @@ -1,6 +1,5 @@ -Some warnings: (text from help page) +Some warnings WARNING: Installing/Uninstalling/Disabling/Updating is NOT possible unless ALL the source code files are IN THE SAME DIRECTORY. -WARNING: install.sh must be run from the folder where it was downloaded WITH the other files from the repo. Otherwise, installation will fail. uninstall.sh must be run from ~/.shellnotes/ because shellnotes is already installed. If you choose to run update.sh manually, it must be done from ~/.shellnotes as well. Type 'sh ~/.shellnotes/update.sh'. Otherwise, run 'shellnotes -u' or 'shellnotes --update' to run the script instantly. -WARNING: Automatic Installation, uninstallation and update is a feature for shellnotes <2.5. Older versions require manual installation, uninstallation and update. Disabling is also a <2.5 feature. -WARNING: The default shell for installing/uninstalling/updated is bash. However, shellnotes will find your shell if it's different and continue installing according to it. If your shell is not supported though, the installation/uninstallation/update will FAIL. \ No newline at end of file +WARNING: Automatic Installation, uninstallation and update is a feature for shellnotes >2.5. Older versions require manual installation, uninstallation and update. Disabling is also a >2.5 feature. +WARNING: The default shell for this program is bash. However, shellnotes will identify your shell if it's different. If your shell is not supported though, the installation will FAIL. \ No newline at end of file