]> git.armaanb.net Git - charsel.git/blobdiff - README.md
update formatting, refactor
[charsel.git] / README.md
index a6d2af2562ef95753a56352a3bba3da8acdc2fa5..f0a7f3fe5b5dfad157b2588f97447d631cbaf155 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,36 +1,36 @@
 # CHARSEL
-A very simple shell script to make copying frequently used special characters to your clipboard easy.
+A simple bash script to make copying frequently used special characters to your clipboard easy.
 
-It uses a plain-text file known as a "charfile" to define shortcuts to special characters that are easy to access on the keyboard.
+It uses a plain-text file known as a "charfile" to define easy to reach shortcuts to special characters
 
 ## Installation
-Running the INSTALL shell script should work fine for most people, or you could manually copy the files into place using it as a template.
-
-If it is run as root or with sudo, the program and charfiles will be installed for all users. If it is run without elevated privileges, it will just be installed for the local user.
+- Run `make install` as root to install
+- Run `make uninstall` as root to remove. Will not delete your personal charfiles
+- Run `make purge` to remove charsel files from your home directory
+- Run `make install-completions` to install the shell completions
 
 ## Dependencies
-  * Posix shell  
-  * util-linux  
-  * xclip  
-  * A terminal with UTF-8 encoding enabled  
-
-## USAGE
-To start the program, run `charsel <charfile>`
-This will start the program with the specified charfile. There are a few installed by default, to see them, use `charsel list`.
+  * Bash
+  * Linux
+  * Xclip (using the -n flag bypasses this)
+  * A terminal with UTF-8 encoding enabled (most desktop environment's default terminal will be fine)
 
-Once you have started the program, simply type the shortcut listed on the left side of the table to copy the character on the right side of the table to your clipboard. If the charfile you used has multi-character shortcut keys, then you must hit enter after using a single letter shortcut. If the only shortcuts are single-letter, however, you can simply type the shortcut without clicking enter.
+## Usage
+For argument usage, use `charsel -h`
 
-The default charfiles all have hidden shortcuts for capital letters that are not shown on the table. Simply type a capital version of the shortcut key to access the capital version of the special character.
+Once you have started the program, simply type the shortcut listed on the left side of the table to copy the character on the right side of the table to your clipboard. Shortcodes the same length as the longest one will automatically be entered. To quit, type ';' as a shortcode
 
-## CREATING A CHARFILE
-Make a new file in `~/.local/share/charsel/` or `/usr/share/charsel` with the name that you would like to use to call the charfile in the command.
+Some of the default charfiles have hidden shortcuts for capital letters that are not shown on the table. Simply type a capital version of the shortcut key to access the capital version of the special character.
 
-Fill it in, using the provided examples as a template. Hidden shortcuts go above the '---'
+## Creating a charfile
+Make a new file in `~/.local/share/charsel/charfiles/` or `/usr/share/charsel/charfiles/` with the name that you would like to use to call the charfile in the command.
 
-## LICENSE
-Charfile is GNU GPLv3 licensed, see COPYING for more information
-Charfile is written by [Armaan Bhojwani](https://armaan.bhojwani.org), [Email](mailto:3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me)
+Fill in your shortcodes, using the provided examples in `/usr/share/charsel/charfiles` as a template. There are just 4 rules to follow.
+  1. The pattern is "shortcode,output"
+  2. Hidden shortcuts go above the line with "---"
+  3. Lines can be commented out using a "#" at the start
+  4. Shortcodes may not contain ";" (semicolon) as that is used to quit the program
+  5. Shortcodes cannot start with - as that confuses grep
 
-## BRANCHES
-Development happens on the "development" branch, which then gets merged into the "master" branch once its ready for a stable release
+## License
+Copyright Armaan Bhojwani 2020, MIT License, see the LICENSE file for more information