Tanabata file manager


Release version

Contents

About

Tanabata (jp. 七夕) is a Japanese festival. People generally celebrate this day by writing wishes, sometimes in the form of poetry, on tanzaku (jp. 短冊), small pieces of paper, and hanging them on sasa (jp. 笹), bamboo. See this Wikipedia page for more information.

Tanabata FM is a file manager for Linux that will let you enjoy the Tanabata festival. It organizes files as sasa bamboos, on which you can hang almost any number of tanzaku, just like adding tags on it.

Glossary

TFM (Tanabata File Manager) is this file manager.

Sasa (jp. 笹) is a file record. It contains 64-bit ID number, the creation timestamp, and the path to the file.

Tanzaku (jp. 短冊) is a tag record. It contains 64-bit ID number, creation and last modification timestamps, name and description.

Kazari (jp. 飾り) is a sasa-tanzaku association record. It contains the creation timestamp and associated sasa and tanzaku IDs.

Sasahyou (jp. 笹表) is a database of sasa.

Sappyou (jp. 冊表) is a database of tanzaku.

Shoppyou (jp. 飾表) is a database of kazari.

Usage

First of all, compile the source code with ./build.sh. By default, it builds all targets to the ./build/ directory, but you can specify your custom build directory and target with ./build.sh -b <build_dir> -t <target>. For example, if you want to build just the CLI app to the ./tfm-cli/ directory, run ./build.sh -t tfm -b ./tfm-cli/.

For better experience, you can move the CLI executable to the /usr/bin/ directory (totally safe unless you have another app named tfm) or add the directory with it to PATH.

Then just open the terminal and run tfm -h. If you are running it for the first time, run it with sudo or manually create the /etc/tfm/ directory and check its permissions. This is the directory where TFM stores its config file. If everything is set up properly, you should get the following.

(C) Masahiko AMANO aka H1K0, 2022—present
(https://github.com/H1K0/tanabata)

Usage:
tfm <options>

Options:
-h        Print this help and exit
-I <dir>  Initialize new Tanabata database in directory <dir>
-O <dir>  Open existing Tanabata database from directory <dir>
-a        View all
-s        Set or add
-u        Unset or remove
-f        File-sasa menu
-t        Tanzaku menu
-k        Kazari menu (can only be used with the '-s' or '-u' option)
-w        Weed (defragment) database
-V        Print version and exit

No database connected

So, let's take a look at each option.

Using the -I <dir> option, you can initialize the TFM database in the specified directory. The app creates empty sasahyou, sappyou and shoppyou files and saves the directory path to a configuration file. The new database will be used the next time you run the app until you change it.

Using the -O <dir> option, you can open the TFM database in the specified directory. The app checks if the directory contains the sasahyou, sappyou and shoppyou files, and if they exist and are valid, saves the directory path to a configuration file. The new database will be used the next time you run the app until you change it.

Using the -a option, you get the full list of what you specify. For example, -af prints the full list of sasa.

Using the -s option, you can add new sasa, tanzaku, or kazari. For example, -st launches a menu for adding new tanzaku. Just enter its name and description.

Using the -u option, you can remove sasa, tanzaku, or kazari. For example, -uk launches a menu for removing kazari. Just enter the sasa and tanzaku IDs to dissociate them.

Using the -f option without others, you can view the info about a specific sasa. Just enter the sasa ID.

Using the -t option without others, you can view the info about a specific tanzaku. Just enter the tanzaku ID.

The -k option can be used only with the -s or -u option.

Using the -w option, you can weed the database. It's like defragmentation. For example, if you had 4 files with sasa IDs 0, 1, 2, 3 in your database and you removed the 1st one, then your database would only have sasa IDs 0, 2, 3 and ID 1 would be a hole. Weeding fixes this hole by changing sasa ID 2 to 1, 3 to 2, and updating all associated kazari, so for large databases this can take a while.

Using the -V option, you just get the current version of TFM.


© Masahiko AMANO aka H1K0, 2022—present
Description
🎋Tanabata — web file manager with tags!
Readme 3.9 MiB
Languages
Go 47.4%
Svelte 41.9%
TypeScript 9.8%
PLpgSQL 0.4%
HTML 0.3%
Other 0.2%