Coder Social home page Coder Social logo

lemony's Issues

Revoke rename

As safety is imperative, Lemony could keep track of the files it renames in the event the user incorrectly renames a set of files. With the list of files it renamed and their original names, the script will be able to 'revoke' the rename.

The data may be stored in a JSON formatted document for perpetual use. Size may however become an issue as the script is used. As with logs, the renaming history may be split into days and cleared after X days. While not necessarily for users, the structure of the file itself needs to be simple and uncluttered.

Consider:
> lemony rename "path/to/ecchi/pictures" --revoke

A switch called revoke is added to the rename subparser. The files in the directory passed will be queried against the history file and renamed accordingly.

The dry run switch must be available. Being able to specify which files rename are to be revoked should be present as well.

> lemony revoke "path/to/ecchi/pictures/" --file "best_ecchi_pic.jpg;second_best_ecchi_pic.jpg" --prompt

In this example, revoke becomes a subparser as apposed to a switch on the rename subparser. It accepts a directory like rename. If the file argument is omitted, all files are processed. The names specified in file are the current names. The prompt switch presents a [Y/N] option for each reversion.

The idea is still squishy, so the implementation may be a little ways away.

Implement content filters

Doing so will allow for plugins or other methods to short-circuit the renaming. For example, a liquid-style syntax could be implemented and be decoupled from the main renaming methods.

Move end-user documentation to wiki

Remove clutter from the readme file by moving all but the bare essential commands and particulars to the wiki. New users should get a feel for the project and the way it goes about things without being overwhelmed with all of its details.

Move all renaming arguments to 'rename' sub-parser

The switches currently related to the rename operation must be moved to the "rename" sub-parser.

Current way:

lemony "path/to/ecchi/pics"

New way:

lemony rename "/path/to/ecchi/pics"

Doing so will allow for opportunities at larger functionality without cluttering the parser with options.

Employ passive logging

Log the function calls to better understand went wrong with the script and caused unexpected behavior. If possible, the logs need to be simple for non-technical users to be able to read and understand it themselves, yet provide enough information and to be useful to technical user.

Introduce directory globbing

Allow users to specify directories with globbing syntax.

> lemony "path/to/ecchi/**/*"

Result:
path/to/ecchi/pics/{files}
path/to/ecchi/vids/{files}

Allow a single path or extension to be set as a string literal instead of an array

When setting the directory in the profile, users should have the choice to set the directory as a string literal and not an array.

Current

    directory: ["path/to/ecchi/pics"]

Proposed:

    directory: "path/to/ecchi/pics"

The same will go for extensions and everything else which accepts an array which the user supplies and may only have one element. Being able to pass an array of directories and file extensions will obviously remain, however the user will not be forced into specifying them when unnecessary.

Decouple arguments

Restructure Lemony's arguments (rename etc) into plug-ins which load when it starts. Doing so will allow arguments to be added or removed in a simpler manner without affecting the core of the project.

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.