Giter Club home page Giter Club logo

arup's Introduction

Brief Introduction

ARUP - Another bulk Rename Utility with embedded Python interpreter
Arup is a another bulk rename utility, the point special is that it does not provide any renaming options.
Only use python scripts as renaming rules.
For this reason, this tool is for programmers or python-amateurs only.
Main dialog traceback for debug

The features:

  • Has built-in python interpreter, execute a python snippet to generate a desired new filename.
  • Preview the renaming result before actually renaming.
  • Can undo last renamed result.
  • Add the code snippets you wrote to the library for reuse later.
  • Sort files according to certain rules (Can also manually adjust the order).
  • Filter files according to Unix filename pattern matching rules (*.*, a*.mp3, ...).
  • Choose to ignore certain files.

Development & Deployment

The utility is developed using Python3 / PyQt5 / peewee.
Be careful to keep your own snippets database file 'data/snippets.db' during the upgrade.
github repository

Python script

ARUP execute a python function and use the result for renaming.
The signature of user function is def rename(arg).
* argument: 'arg' is a dictionary that can access elements using attributes.
* return: This function will be called for each file to rename. return the desired new filename! return an empty string to skip renaming the file.

The dictionary arg has elements:

  • totalNum: integer, total files number in list.
  • index: integer, index of current file to rename, from 0.
  • fileName: string, file name with extension.
  • dirName: string, directory name of current file.
  • fullPathName: full filename, including path, file name with extension.
  • tag(): function, ONLY for music file, you can execute arg.tag() to obtain tag object for current music archive.

    The tag object has the following attrbutes:
    • tag.album  # album as string
    • tag.albumartist  # album artist as string
    • tag.artist  # artist name as string
    • tag.audio_offset  # number of bytes before audio data begins
    • tag.bitrate  # bitrate in kBits/s
    • tag.comment  # file comment as string
    • tag.composer  # composer as string
    • tag.disc  # disc number
    • tag.disc_total  # the total number of discs
    • tag.duration  # duration of the song in seconds
    • tag.filesize  # file size in bytes
    • tag.genre  # genre as string
    • tag.samplerate  # samples per second
    • tag.title  # title of the song
    • tag.track  # track number as string
    • tag.track_total  # total number of tracks as string
    • tag.year  # year or data as string

License

ARUP is Licensed under the AGPLv3 license.

arup's People

Contributors

cdhigh avatar

Stargazers

 avatar

Watchers

 avatar  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.