Introduction To Hyperkey
INTRODUCTION TO HYPERKEY

What is Hyperkey?

  • Hyperkey is a nifty little command-line tool that allows you to manage and manipulate your data through keys, which are named shortcuts using names or tags that you choose. It goes in a completely different direction from GUIs (Graphical User Interfaces).
  • In these times, we are buried under a mountain of information. It's all out there, but how do you find it? Modern search engines such as Google do a great job of finding content on the Internet. They achieve this by combining gobs of data about how people found stuff using various queries and they apply the heuristics to each query submitted.
  • But this does not work well for files, especially on your own machines, or your own file archives. Filenames often have very little information to help you find them, and more often than not, you did not even pick the name for them. What were those files called? If you do not know, and like many people have a huge number of files, pictures, sources, etc., you can spend quite a while drilling around looking for them.
  • Shortcut icons in folders and the desktop can be handy, provided you have very few of them. Many desktops are covered in lots of shortcuts, so that people can quickly get to stuff they use often. But when there are a lot of them, just finding the shortcut itself can take time. And there is an upper limit to how many you can have visible, and it is not very many.
  • This is to propose an alternative: The notion of a 'hyperkey'. The idea is that instead of you learning where everything is and how to find it, you access data by name, according to how you would like to think of it. You assign a short name or key to your data that is easy for you to remember, and you reference that data by that key. You can assign any number of keys to the same data, so for important things you have even less to remember. Since your data and your access to it are organized around how you think, it becomes effortless to navigate around large complex data systems, the internet, whatever.
  • That is Hyperkey.

What Hyperkey can do

  • Hyperkey is a full access system. It doesn't just do navigation, it does backup, restore, storage, retrieval, archiving, versioning, mirroring, and logging. The idea is that you manipulate content that interests you by referring to that content by a key, or keys, of your choosing.
  • That is what Hyperkey does: full access to your data, keyed to names that you choose. All in one tiny little app that barely dents even a small jump drive.
  • Like a Windows shortcut, you access all of your content (data, favorite links, working directories, etc) all based upon keys that you assign. You access that content via a small set of commands in a command window.
  • For example, you could assign the key 'g' to 'www.google.com', and start your browser with the command:
    • s g

  • You type 3 keystrokes and an Enter, and your browser launches to the Google website.
  • If you assign keys based upon the first label that comes to mind, that data is almost always easy to find later, even years later, because it is based upon how your mind works. You can assign any number of keys to the same retrieval. So you don't have to think about it. You just 'go' to the data, naturally.
  • The main purpose of Hyperkey is to shorten the amount of time it takes to access content, and for those of us battling repetitive-stress injuries, the less mouse-clicking, the better. If you set it up right, most of your common content can be accessed with a couple of keystrokes. As for the command window, it can be bound to the right-click context menu, so you can open the program more or less graphically if you wish.
  • The backup features are of tremendous use if your work is inherently iterative, that is, you make large numbers of changes to the same data, such as developing software, doing CAD design, and authoring documents. Its most useful feature is the 'snapshot' backup capability, in which you can make tiny incremental backups as your work day proceeds. Many editing programs such as CAD systems, document editors, and photo editors destructively modify the content, and once that content is corrupted, it can be very hard to get it back to health. But with incremental backups, you can repeatedly save the files, and easily back up to a version earlier in the day, or any other time. It is a power user feature, but is very handy even to general users.

Keys

  • A Hyperkey key is a simple text string that you choose. An example of a key would be "g" to access the "google' website.
    • You can assign any number of keys to the same data, and can create aliases (alternate names) for existing keys. A common case is to create a key with a long name that is very descriptive of the resource, then create a short key that is an alias for the longer one. The short key would be used to reduce the number of keystrokes, making the resource fast to access.
    • You can have any number of characters for the key, although fewer characters is usually better for commonly-used keys. In general, you want a key to be something easy to type and easy to remember.
    • Keys can have associated selection criteria, that restrict their ranges of effect. For example, a key may refer to a folder, but be restricted to only files that match a wildcard pattern.
    • Keys can specify that a specific program is to be used to access a resource. For example, the key could refer to a URL, and specify that a particular browser will be used to open it.
    • Hyperkey includes a 'find' command, which is a search function that locates database records based upon a search string. This can be very useful for finding keys that you may have forgotten. When you find a key you have forgotten, it is often a good idea to add an alias to that key that is the name you first thought of when you went looking for it. Then the next time you will be much more likely to find the resource on the first try.

How Hyperkey works: database files

  • Hyperkey associates keys, which are quoted character strings, with resource values, which typically are filenames or URLs. Hyperkey stores these key-value associations in simple text-based database files. Inside the files are database records (or dbrecs) which are single lines that list a key string and its associated resource value(s).
  • These files can be edited using an ordinary text editor such as the Gnome gedit program.
  • There can be any number of database files. How many you choose to use is up to you.

Using Hyperkeys as shortcuts

  • In its simplest usage, Hyperkey keys behave as shortcuts to files and URLs.
  • As a simple example, we could create a shortcut dbrec that associates the key 'g' with the 'Google' website:
    • "g"   "www.google.com"

  • When keys are used to define shortcuts as in the above case, only one resource value is specified (such as "www.google.com").
  • Then we could launch a browser to open the "www.google.com" web page by the simple command:
    • s g

The concept of 'local' and 'server' locations

  • The most common usage of Hyperkey keys is to do backups and folder synchronizations. These keys by necessity bind to two resource locations: a 'local' location and a 'server' location. This paired-location concept is core to the way that Hyperkey works.
  • The 'local' location would normally be be where changes would be made, such as on a user's own computer.
  • The 'server' location would be where the backup copies are stored, or the other folder location if doing synchronization.
  • The most common use of the server location is to enable backup and source-code control. By having two locations, users can have a working version of their files in the local location, but also have a clean or 'blessed' version in the server location. Changes the user wishes to keep and protect would then be copied to the server location when they are ready.
  • As a simple example, we could create a backup dbrec that allows us to backup copies of file 'mybook.txt' using the key 'mybook':
    • "mybook"  "/home/myuser/MyDocs/Books/mybook.txt"  "/Server/Ar/MyDocs/Books/mybook.txt"  -f

  • Then we could create 'snapshot' backups as we make modifications to 'mybook.txt' by the simple command:
    • b mybook

Main Functionality

  • Hyperkey provides the functionality of more complex systems, but in a simple way.
  • Shortcuts
  • With Hyperkey you have all the functionality of a Windows shortcut, accessed through a name that you assign.
  • Shortcuts on desktops can be handy to open locations or launch programs that you use frequently. But this only works well when there are a small number of them visible at a time. When the number of icons is very large, just finding a particular shortcut can be time-consuming.
  • With Hyperkey you can have access an enormous number of resources without all the clutter. More importantly, you can access resources that you rarely use, or have not used in a long time just as easily as one you use everyday. You only need remember names that you gave them.
  • Using Hyperkey keys you can launch programs, browsers, and batch files, and open folders or documents. In fact you can do anything that a Windows batch file can do, because Hyperkey actually creates and uses batch files to do the work.
  • Backup / Source-code Control
  • You can do simple source-code control using keys, including creating and maintaining log files of the changes.
  • Hyperkey supports full backup, restore, retrieval and archiving based upon keys. The backup system automatically saves the files in .zip compresssed format, and timestamps the filenames.
  • The data is not stored in a proprietary format. The storage format is as ordinary files, directories or .zip files, so no special software is needed to retrieve the archive later. Most commercial backup programs store data in proprietary formats, which can be a a huge problem when you try to retreive data from many years earlier. If special software must be used to do the retrieval, what happens when they no longer support that format, or do not have a program for your upgraded system? What happens if the company no longer exists? Proprietary formats should be avoided if you have any notion of getting to the data in the future.
  • Hyperkey stores backups in up to three locations: Incremental, Daily, and Main. Each time you back up a key, it puts a copy in the Incremental folder with an incremental version number, and overlays the Daily and Main copies. This keeps a complete record of all backups, and a record of the backups on a per-day and per-backup basis.
  • As a result of the storage format, Hyperkey can reconstruct any version ever saved using a key. You can restore any particular backed-up version of keyed data with a simple command that specifies the date and incremental version.
  • This allows you the freedom to try out changes, and restore older versions when necessary. It's an 'undo' on a file or folder level. By default, all backups are as deltas, that is, only the files that changed or were deleted are backed up, keeping the backup achives to a minimum. To further reduce backup archive size, by default, all backups are stored in compressed (.zip) format.
  • Data Mirroring
  • Hyperkey Makes it easy to keep the data on two systems synchronized. You can mirror two file locations ('local', 'server') via a key, and only files that changed are copied or deleted between them.
  • The sychronization can be done at any level, from full directories to single files to a list of files. All that is necessary to set up the relationship is a single dbrec entry in the database file.
  • Managing Projects
  • You can create project-specific Hyperkey database files. Hyperkey does not require a centralized database that knows where everything is. Instead, the database files specific to a project or task can be stored locally with the data that it manages.
  • Hyperkey database files can be placed in any folder, and you can create keys that are specific to that folder's purpose. Since a database file is a small text file, it has a minimum impact upon your storage, while allowing increased control over the folder's contents.
  • Full project-level databases can refer to inner lower-level databases, to any degree desired.
Next: The Basics