Coder Social home page Coder Social logo

tag's Introduction

tag

file tagging system

Specification

The following specification is used for the tag script: All files that are allowed to be tagged shall be in a directory called $TAG_DEFAULT_DIR (the default of that is all). Tags are stored as symlinks within neighboring directories, you should never change TAG_DEFAULT_DIR after you have chosen a name for it (or redo all symlinks).

This specification allows for:

  • Easy reproducibility
  • Good integration with the file system
  • You can throw away the tag script and manage it yourself

Installation (Linux)

Put the tag script somewhere on your path for convenience. Create a dedicated directory for the tag directories (named $TAG_DEFAULT_DIR) and put some files into there. Now call the script for the first time within that directory: tag -h. If there is no error message at the beginning and only the usage, all went fine.

If you want to test this program:

cd /tmp &&
git clone https://github.com/thepsauce/tag &&
cd tag &&
./test

If you have yazi, the test program will detect this, put configuration files in ~/.config/yazi and start yazi. If you did not yet bind [ to anything else, it will be usable to tag a file. To clean up after the tests, remove ~/.config/yazi/plugins/tag.yazi and remove the keybind from ~/.config/yazi/keybind.toml (search for run = "plugin tag").

Integration with yazi

Using the yazi file manager, you can put the tag.yazi directory into .config/yazi/plugins/tag.yazi (best to put the repository somewhere (I keep mine in ~/.repos) and then create this as symlink for updates).

Then create a keybind to call the plugin, for example:

[[manager.prepend_keymap]]
on = [ "[" ]
run = "plugin tag"
desc = "add tags"

Then using [ within yazi on a file within a child directory of $TAG_DEFAULT_DIR/.. and having the tag script on the path.

tag's People

Contributors

thepsauce avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.