brn is a command line tool similar to vimv.

Related tags

CLI brn
Overview

bulk rename files

brn is a command line tool similar to vimv. It can be used to easily mass-rename files in your preferred text editor (i.e. vim).

Usage

When called from inside a directory, it opens a buffer in your default text editor with the list of filenames. You can then edit the filenames in the buffer and the changes will take place when you save and exit.

By default it uses $EDITOR and if that is not set then $VISUAL.

Install

Arch Linux Users

You can use the brn-git aur package

paru -S brn-git

Everyone else

Clone the repo and

sudo make install

Why use brn over something like vimv?

  • It can handle swapping names. It uses GNU/Linux's renameat2 system call to atomically swap the names of two files which means no temporary files are made either (yes, this also means you can't compile it on other Unixes).

  • It is written in C instead of bash which makes its behavior more robust and predictable.

  • It has error handling, it will safely abort if the exact number of filenames isn't provided or if some filenames are repeated.

  • It is free.

Screencast

example gif

TODO

  • Make an AUR package.

  • Version sort directory listing so initial buffer is similar to output of ls -Av.

  • Add an example GIF

License

brn is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE.

Issues
  • Crash when running in a directory containing 8 files

    Crash when running in a directory containing 8 files

    When running brn in this git repository after running make, it crashes with the following error:

    malloc(): invalid next size (unsorted)
    [1]    85812 IOT instruction (core dumped)  brn
    

    The directory looks like this:

    .git
    .gitignore
    brn
    brn.c
    brn-example.gif
    LICENSE
    Makefile
    README.md
    

    I have not been able to reproduce the error in any other git repositories. The error disappears when any file is removed, or if another file is added to the repository. It does not occur on a fresh clone (with no brn executable) and also does not occur in other directories containing the brn executable. I know nothing about C so I'm not sure what could be causing this or how to debug further.

    This is obviously not really affecting my workflow, I just noticed it because after installing I tried to test it out by renaming the readme, and got this error instead.

    Thanks for brn, I'm finding it very useful!

    opened by gadanidis 4
  • Fix: get number of line before fetching temp file

    Fix: get number of line before fetching temp file

    This removes the 100 element limit and makes the program more dynamic.

    I would suggest to use space indent instead of tabs, following standards. It's been quite annoying to edit the source file.

    opened by TheRealLorenz 2
  • Feature request: End message to show number of renamed files

    Feature request: End message to show number of renamed files

    Hi!

    I've been using vimv for quite sometime now for bulk-renaming and brn works great! The only issue is that in vimv, after the bulk-renaming, a message is shown saying N files renamed..

    I would be nice if this feature could also be implemented in brn.

    opened by paniash 1
Owner
Nimai Patel
Professional pipe installer
Nimai Patel
pbr2gltf2 is a command line tool for converting PBR images to a glTF 2.0 material.

pbr2gltf2 is a command line tool for converting PBR images to a glTF 2.0 material. The tool is detecting depending on the filename, which PBR information is stored. It swizzles the images and does reassign the channels to a glTF 2.0 image. The tool stores the images plus a minimal, valid glTF 2.0 file containing the required material, textures and images.

UX3D GmbH 23 Jul 31, 2022
A command-line tool to display colorful distro information.

sjfetch A command-line tool to display colorful distro information.

Fikret Musk 6 Apr 6, 2022
Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

GPUOpen Effects 176 Jul 29, 2022
A command line tool with no external dependencies to print information about an X server instance.

xinfo A command line tool with no external dependencies to print information about an X server instance. Building and running To build the code in thi

Jean-Michel Gorius 6 Jan 13, 2022
A command line tool for numerically computing Out-of-time-ordered correlations for N=4 supersymmetric Yang-Mills theory and Beta deformed N=4 SYM.

A command line tool to compute OTOC for N=4 supersymmetric Yang–Mills theory This is a command line tool to numerically compute Out-of-time-ordered co

Gaoli Chen 1 Oct 16, 2021
A command-line tool to extract dylib files from the dyld shared cache file.

DyldExtractor A command-line tool to extract dylib files from the dyld shared cache file. Starting with macOS 11, standalone binaries of system librar

Cyandev 8 Mar 12, 2022
Microsoft Visual TrueType(VTT) command line compile tool.

Project Microsoft Visual TrueType(VTT) is a professional-level tool for graphically instructing TrueType and OpenType fonts. For details on the tool v

Microsoft 35 Aug 10, 2022
A command-line tool to generate Linux manual pages from C source code.

mangen A command-line tool to generate Linux manual pages from C source code. Description mangen is, as said above, a program to generate Linux manual

null 2 Nov 15, 2021
This command-line tool converts an FM broadcast signal into stereo sound with de-emphasis applied.

stereodemux This command-line tool converts an FM broadcast signal into stereo sound with de-emphasis applied. It expects 16-bit signed-integer MPX (F

Oona Räisänen 10 Aug 7, 2022
nicegraf-shaderc is a command-line tool that transforms HLSL code into shaders for various graphics APIs.

User Manual Table of Contents Introduction Project Status Obtaining the Source Code and Building Running Defining Techniques Generated Header File Pip

nicebyte 90 Jul 28, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Clara v1.1.5 !! This repository is unmaintained. Go here for a fork that is somewhat maintained. !! A simple to use, composable, command line parser f

Catch Org 652 Jul 27, 2022
A library for interactive command line interfaces in modern C++

cli A cross-platform header only C++14 library for interactive command line interfaces (Cisco style) Features Header only Cross-platform (linux and wi

Daniele Pallastrelli 826 Aug 3, 2022
CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.

CLI11: Command line parser for C++11 What's new • Documentation • API Reference CLI11 is a command line parser for C++11 and beyond that provides a ri

null 2.2k Aug 15, 2022
Lightweight C++ command line option parser

Release versions Note that master is generally a work in progress, and you probably want to use a tagged release version. Version 3 breaking changes I

null 3.2k Aug 8, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Lyra A simple to use, composing, header only, command line arguments parser for C++ 11 and beyond. Obtain License Standards Stats Tests License Distri

Build Frameworks Group 350 Aug 4, 2022
A single header C++ library for parsing command line arguments and options with minimal amount of code

Quick Arg Parser Tired of unwieldy tools like getopt or argp? Quick Arg Parser is a single header C++ library for parsing command line arguments

null 46 Aug 10, 2022
CLIp is a clipboard emulator for a command line interface written in 100% standard C only. Pipe to it to copy, pipe from it to paste.

CLIp v2 About CLIp is a powerful yet easy to use and minimal clipboard manager for a command line environment, with no dependencies or bloat. Usage Sy

A.P. Jo. 12 Sep 18, 2021
null 76 Apr 18, 2022
LwSHELL is lightweight, platform independent, command line shell for embedded systems.

LwSHELL is lightweight, platform independent, command line shell for embedded systems. It targets communication with embedded systems from remote terminal to quickly send commands and the retrieve data from the device.

Tilen Majerle 64 Jul 21, 2022