Skip to content

LensPlaysGames/CNOTE

Repository files navigation

C-NOTE

C-NOTE is a file organization tool to help sort files that aren’t easily sorted in directory hierarchies. C-NOTE uses a tagging system, to associate tags with entries; an entry can be a file, directory, or any valid filepath.

CNOTE_LINUX.png CNOTE_WIN32.png

Usage

On Linux, hold CTRL when (de)selecting tags. Bugs are due to wxGTK, and I can’t do much about them at the moment, barring a major refactor.

Tags are listed in the upper panel, and files/entries are listed below (as buttons). Clicking a tag will select or deselect it. Clicking an entry will launch it, similar to double clicking in a file explorer.

When a tag is selected or de-selected, all entries shown /must/ have that tag present. If they do not, they are hidden. Once this occurs, the tags are then updated to a new list of tags, consisting only of those present in the freshly updated entry list. This allows for very efficient and intuitive searching of files, simply by selecting the right tags.

How Files can be Tagged

At startup, the program searches the current working directory for files with the tag marker at the beginning of the file: #:. It then looks at the rest of the line following this tag marker, and splits it by whitespace into words.

After all entries in a directory are searched, the .tag file is handled.

Tag Marker at Beginning of File

> example_tagged_file.txt

#: my-tag another-tag some_other<>totally_f*#!$%&_crazy.tag| and'another

... file contents ...

Resulting tags for example_tagged_file.txt:

  • my-tag
  • another-tag
  • some_other<>totally_f*#!$%&_crazy.tag|
  • and'another

For ease of use, a single set of C (// or /*), LISP (any amount of ;), and LaTeX comment characters (%) are skipped.

Identical:

  • #: my-tag another-tag
  • #: my-tag another-tag
  • % #: my-tag another-tag
  • %#: my-tag another-tag
  • ;#: my-tag another-tag
  • ;;; #: my-tag another-tag
  • // #: my-tag another-tag
  • //#: my-tag another-tag
  • /*#: my-tag another-tag

The .tag file

However, you may also want to tag files that have strict formats; formats that don’t allow for this tag marker and tags inserted at the beginning. For that, we have a solution: the .tag file.

The .tag file is an associative list of filepaths to lists of tags. This allows files that have a strict format to still be tagged, like png, jpg, pdf, and more! Plus, they can be launched and navigated to in the same way as regular tagged entries.

Example Directory:

a
|-- 1.txt (tagged with "my-tag")
|-- 1.png
|-- 2.txt (tagged with "my-tag another-tag")
|-- b
|   `-- ... lots of files ...
`-- .tag

Example .tag Contents:

1.png #: my-tag
b     #: another-tag

About the .tag Format: there must be whitespace in between the filepath and the tag marker. Multiple files can be tagged by using multiple lines.

Building

Dependencies

Instructions

There are three ways to build this program on Linux and Windows:

  1. Run `./build.sh` on Linux or `build.bat` on Windows. If you don’t trust the script, just take a look at it before running it; it’s like 10 LOC. This uses CMake automatically and generates a build system.
  2. Use CMake, wait for it to do nothing, and PRAY that it hasn’t crashed and it’s actually just been downloading submodules for 30 minutes because your internet connection is trash
  3. Run `git submodule update –init –recursive && cmake -B out && cmake –build out`.

If, by some evil and unfortunate twist of fate, you are using a mac, just er, idk, follow step 1, I guess. It’s basically just unix anyway.