DEV Community 👩‍💻👨‍💻

Cover image for Switchboard - Simplify file organisation on your machine/s.
Cian Gallagher
Cian Gallagher

Posted on

Switchboard - Simplify file organisation on your machine/s.

Image description

GitHub logo Cian911 / switchboard

Switchboard is a tool to help simplify file organisation on your machine/s.

Switchboard

GitHub Actions Status GitHub Actions Status Go Report Card Downloads GitHub go.mod Go version of a Go module GoDoc reference example GitHub stars GitHub forks

Gomerge logo

Description

Do you ever get annoyed that your Downloads folder gets cluttered with all types of files? Do you wish you could automatically organise them into seperate, organised folders? Switchboard is a tool to help simplfy file organization on your machine/s.

Switchboard works by monitoring a directory you provide (or list of directories), and uses file system notifications to move a matched file to the appropriate destination directory of your choosing.

See the video below as example. Here, I give switchboard a path to watch, a destination where I want matched files to move to, and the file extension of the type of files I want to move.

You can also visit https://goswitchboard.io/ for all your documentation needs, news, and updates!

asciicast

Installation

You can install switchboard pre-compiled binary in a number of ways.

Homebrew
brew tap Cian911/switchboard
brew install switchboard
// Check everything is working as it should be
Enter fullscreen mode Exit fullscreen mode

Do you ever get annoyed that your Downloads folder gets cluttered with all types of files? Do you wish you could automatically organise them into separate, organised folders? Switchboard is a tool to help simplify file organisation on your machine/s.

Switchboard works by monitoring a directory you provide (or list of directories), and uses file system notifications to move a matched file to the appropriate destination directory of your choosing.

Motivation

I built switchboard out of a frustration with the sporadic mess of files strewn throughout my local machine and network file servers. I thought what best way to try and fix this problem then build something, in Go no less :)

Switchboard is new, so I'd love to get it into peoples hands to be used. I'd also love to here any suggestions or improvements you'd like to see - please head over to Github Discussions to have a chat!

Usage

See the video below as example. Here, I give switchboard a path to watch, a destination where I want matched files to move to, and the file extension of the type of files I want to move.

You can also visit https://goswitchboard.io/ for all your documentation needs, news, and updates!

asciicast

Installation

You can install switchboard pre-compiled binary in a number of ways.

Homebrew
brew tap Cian911/switchboard
brew install switchboard

// Check everything is working as it should be
switchboard -h
Enter fullscreen mode Exit fullscreen mode
Go Install
go install github.com/Cian911/switchboard@latest
Enter fullscreen mode Exit fullscreen mode
Manually

You can download the pre-compiled binary for your specific OS type from the OSS releases page. You will need to copy these and extract the binary, then move it to you local bin directory. See the example below.

wget https://github.com/Cian911/switchboard/releases/download/${VERSION}/${PACKAGE_NAME}
sudo tar -xvf ${PACKAGE_NAME} -C /usr/local/bin/
sudo chmod +x /usr/local/bin/switchboard
Enter fullscreen mode Exit fullscreen mode

Quick Start

Using switchboard is pretty easy. Below lists the set of commands and flags you can pass in.

Run the switchboard application passing in the path, destination, and file type you'd like to watch for.

Usage:
   watch [flags]

Flags:
      --config string        Pass an optional config file containing multiple paths to watch.
  -d, --destination string   Path you want files to be relocated.
  -e, --ext string           File type you want to watch for.
  -h, --help                 help for watch
  -p, --path string          Path you want to watch.
Enter fullscreen mode Exit fullscreen mode

To get started quickly, you can run the following command, passing in the path, destination, and file extenstion you want to watch for. See the example below.

switchboard watch -p /home/user/Downloads -d /home/user/Movies -e .mp4
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Your PRs make a difference 😍

We've got a great set of issues to finish documenting our v1 API. Can you help?