Giter VIP home page Giter VIP logo

bencedit's People

Contributors

manokara avatar

Watchers

 avatar  avatar

bencedit's Issues

Add insert/append command

Add a value to existing value containers without replacing them. Depending on the type of the container, the arguments would change their meaning:

If it's a dictionary, e.g. insert "newkey" = 5:

bencedit> insert "" newkey 5

If it's a list, e.g. insert "foobar" at position 2:

bencedit> insert "" 2 foobar

There could be an alias to this command called append that adds to the new value to end of the list (if the container is a list). Also, maybe I should add a special case in bencode-rs for . to be an alias for the root value.

Add clear command

clear [selector]

With no arguments, the root value becomes an empty container if it is a container, and the default value for primitives.

Clear values

  • dict: {}
  • list: []
  • int: 0
  • str: ""
  • bytes: b""

Loading and parsing transforms

Primarily a concept for batch mode, this can also be useful for a transform command in interactive, so it should be on its own module.

Add options command

Pretty-printing is configurable for example, but we still lack the actual command to control that, among other things.

Change history

bencedit would keep track of the changes done to the structure and jump back and forth to them. An undo/redo function, basically.

Commands

  • undo [n]: Go back n (or 1 if not specified) changes
  • redo [n]: Go forward n (or 1 if not specified) changes
  • changes: List all the changes in the file, prefixed by a number
  • change n: Go to a specific change n, a number from the previous command.

As usual, if you make any changes while in an earlier history, all the late changes will be discarded.

Add save command

And also save-as. Files will only be saved if there were changes made in the structure.

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.