Mc-nbt-edit: Command line editor for Minecraft's NBT files

Hello everyone! This is a little script I wrote for personal use but after all I decided to share it, after all someone might find it useful.
So, mc-nbt-edit is a simple python script that edits nbt files using Thomas Woolford's NBT Library. I wrote it so some repetitive actions became faster (using the same command again and again instead of navigating a GUI).
Some usage examples:
mc-nbt-edit ~/.minecraft/saves/map/level.dat Data.GameType 1
Converts the given map to Creative.
mc-nbt-edit ~/.minecraft/saves/map/level.dat Data.Player.health 20
Fills up player's health.
mc-nbt-edit ~/.minecraft/saves/map/level.dat Data.Time 12000
Set's time to 'sunset'.
For more values read here.
Also please check the README file before using.
GIT Repository
AUR Package
Note: Please make backup of your files before using this utility, I take no responsibility whatsoever about anything that goes wrong.
Note 2: This is one of my first python scripts (the others being simple math problem solvers for school) so please if you have any suggestions, please do tell them.
Hope you find it useful
Last edited by sakisds (2011-10-08 17:21:24)

I used to use aliases, but I like qfi better because adding and changing shortcuts is faster, and I don't have to restart all of my shells afterwards. It also keeps the files in a separate namespace, so, if I want shortcuts to a lot of different files, I don't have to worry about overriding actual commands. Also, if I forget the exact name of the target, I can just use tab-completion, which I couldn't do with aliases, because I would get a huge list of results.
Speaking of aliases, I have qfi aliased to q and I have "pac" as a target to "/etc/pacman.conf" so I can just type
$ q pac
to open up that file. It's only three more characters, and I get the aforementioned benefits. I could also just make it "p", so I could just run:
$ q p
By the way, surfraw looks like a pretty nifty project, I'll have to look into it. Thanks!

Similar Messages

  • Need command line tool for batch converting rtf files to XSL-FO files

    Hi,
    We are executing a projects with more than 200 RTF templates.
    I am looking for a tool which can convert all my RTF's to XSL-FO files in one GO.
    Regards
    Satish

    Hmm... I guess I never thought about doing it in Terminal. Honestly, I'm not sure if textutil can read the content of the textClipping files, as I've read elsewhere that they are strange in that they store the data in resource forks, which makes it tricky to programmatically manipulate them. But I'll look into it to see what I can find out from the manual. Thanks for your reply. I appreciate it.
    Some of them are in folders, but they are all over the hard drive, not necessarily all congregated in a single folder. I was thinking spotlight could, at the very least, display them all for me in the "All Files" option of Finder, so I could drag them all into an app capable of converting them in a batch. But maybe this command-line textutil could accomplish the same thing. I use Terminal for a lot of things, but this is not a command I have tried before. I'll have to read up on it.

  • Command line parameters for automator?

    I'm trying to setup a cron job to so that every morning at 8 am "New Mail.workflow" will open and run. I'm able to get it to open but I was wondering if there were command line parameters for Automator that could open AND run a workflow file? Ideally I'd like it to close after running, but I'll worry about that later. Thanks in advance.

    The preferred way is to save your workflow as an application and then call usr/bin/open on it. If for some reason you must have the workflow run inside of Automator (not self-contained) then you're looking at some quality time with man osascript. As it happens Apple has removed even the need for Cron for most users. A click to File -> Save As Plug-In -> for iCal handles it from start to finish.
    Edit: I forgot to mention that Automator has its own simple command line utility for running *.workflow files. Check out man automator

  • Command line parameters for al_engine.exe

    If you go to a command line window on a DS server and type al_engine.exe with no parameters it prints "Usage" information.  Some of the parameters it mentions are known to the community (like -XX, -XI, etc).  However there are some which sound pretty interesting, but I can't find any information or examples how it should be used.  Examples:
    -L<list of value> : List of Object Labels from UI (separated by , or ; or space) to filter.
    -Je<XML file> Execute the Installation scenario defined in XML file.
    -jd"datastore delta file in quotes>" : Modify datastore values using "file"
    -Jf, -Ja, -We,  and many more.
    I am particularily interested in -Je functiohnality - it sounds like it can be used to automate deployment.  I am using import/export options to do some automation, but real automation would include deletion of some objects, adding jobs to projects, etc.
    Can anybody help with the documentation/examples?

    The preferred way is to save your workflow as an application and then call usr/bin/open on it. If for some reason you must have the workflow run inside of Automator (not self-contained) then you're looking at some quality time with man osascript. As it happens Apple has removed even the need for Cron for most users. A click to File -> Save As Plug-In -> for iCal handles it from start to finish.
    Edit: I forgot to mention that Automator has its own simple command line utility for running *.workflow files. Check out man automator

  • Command Line Parameters for Run Application.vi in the LVWUtil

    I am trying to use the "Run Application.vi" located in the LVWUtil.llb.  I am sending a command line similiar to this:
    "C:\WINXP\system32\msiexec.exe" /i "C:\qc data\ZVMS Program Updates\Application Installer\install.msi"
    this command line works from the Start>Run dialog but the Run Application.vi only sees the beginning of the line "C:\WINXP\system32\msiexec.exe" so it opens the windows installler but does not go to the install.msi file and run it.  Does anyone know the correct command line formats for the Run Application.vi to run the entire command line?
    Thanks,
    BethV

    Hello BethV,
    I downloaded the LVWUtil32.zip file from the Windows API Function Utilities (32-bit) for LabVIEW example program.  In that zip file, is a library entitled Winevent.lib, which includes the Run Application.vi.  When you used this VI, I believe the string you passed in as a input had too many quotation marks.  Namely, you do not need quotes around the msiexec.exe call.  I passed the following string into the Run Application.vi and got the expected results:
    C:\WINDOWS\system32\msiexec.exe /i "C:\mymsi.msi"
    Please let me know if it helps.
    Message Edited by Wendy L on 10-21-2005 02:34 PM
    Wendy L
    LabWindows/CVI Developer Newsletter - ni.com/cvinews
    Attachments:
    RunApplication.GIF ‏2 KB

  • Flo – A command line app for organizing events, to-dos, and deadlines

    Example
    $ flo watch movie,d020
    Ids are updated.
    $ flo eat lunch,d11100-d11130
    Ids are updated.
    $ flo
    0 08-16 20:00 d0 watch movie
    1 08-17 11:00 d1 eat lunch
    11:30 d1
    Usage
    flo [-a] [-c id] [-f from] [-r id] [-t to] [-w what] [what[,from][-to]]
    Options
        -a all items
    -c id change item
    -f from from date
    -r id remove item
    -t to to date
    -w what
    When changing an item, setting -f or -t to r removes the field.
    Date formats
    YYYYMMDDhhmm, MMDDhhmm, DDhhmm, DDhh, and DD are the valid date
    formats. Replace DD with dn to set the date n days from today's date.
    If the year or the month isn't specified, the current year and month is used.
    For formats without a month, if the date specified is before today's date, the
    month is set to the next month.
    The value for hours and minutes is set to 00 if no other value is specified.
    flo runs fast since it's written in C, and the goal is to keep it as simple as possible. It uses between 1–2 milliseconds to start when it's cached by the OS.
    The package is named flo-git in AUR. The development happens on GitHub.
    Last edited by alexanderte (2010-08-22 10:50:05)

    alexanderte wrote:
    Installation
    git clone git://github.com/alexanderte/flo.git
    cd flo
    make
    cp flo /usr/local/bin/
    # optional
    echo "alias f='flo'" >> ~/.bashrc
    You should always use Pacman to install packages on Arch. Here's a PKGBUILD:
    # Contributor: Xyne
    pkgname=flo-git
    pkgver=1
    pkgrel=1
    pkgdesc="A command line app for organizing events, to-dos, and deadlines."
    arch=('i686' 'x86_64')
    url="http://github.com/alexanderte/flo"
    license=('ISC')
    makedepends=('git')
    provides=('flo')
    conflicts=('flo')
    _gitroot="git://github.com/alexanderte/flo.git"
    _gitname="flo"
    build() {
    cd "$srcdir"
    if [ -d "$_gitname" ] ; then
    cd "$_gitname" && git pull origin
    else
    git clone "$_gitroot" "$_gitname"
    cd "$_gitname"
    fi
    make
    install -Dm755 flo "${pkgdir}/usr/bin/flo"
    You can learn more about PKGBUILDs in the wiki: http://wiki.archlinux.org/index.php/PKGBUILD
    I recommend that you upload it to the AUR as well, with any changes that you deem necessary. Don't forget to add yourself as the maintainer at the top of the file.

  • Is there a command line option for VNC to automatically launch in fullscreen mode?

    I can launch a VNC window from the command line, as such:
    open vnc://username:password@hostname
    ... but I'd like it to automatically start in full screen mode. Is there a command line option for this?
    I'm using an old MacMini purely to connect to another Mac over screen sharing, but when the MacMini boots I'd like it to go straight into the fullscreen of the other desktop.
    Many thanks!

    Set the Integer pref browser.sessionstore.max_resumed_crashes to 0 on the about:config page to get the about:sessionrestore page immediately with the first restart after a crash has occurred or the Task Manager was used to close Firefox.
    * http://kb.mozillazine.org/browser.sessionstore.max_resumed_crashes
    That will allow you to deselect the tab(s) that you do not want to reopen, but will allow to reopen other tabs.
    See:
    * http://kb.mozillazine.org/Session_Restore#Restoring_a_session_after_a_crash
    * http://kb.mozillazine.org/Browser.sessionstore.max_resumed_crashes

  • Command Line Parameters for Silent Install with Status for BI4.0 Products

    For the XI3.1 product installations, which clearly leveraged MSIEXEC installation files, it was possible to use the /qb+ command line parameter to trigger a silent install which showed the progress of the installation with a final prompt to acknowledge the completion of the installation.
    For the new BI4.0 installation package, it's not clear how to trigger a silent installation which also shows the installation progress.  The installation guide describes using -q in the command line to run a silent installation, or leveraging a response.ini file to trigger a silent install, but in neither case does it show how to modify the silent installation command to enable a display of the installation progress.
    Does anyone know the syntax, either command line or embedded in a response.ini file, to trigger a silent installation for the BI4.0 products which ALSO shows the progress of the installations?
    Thanks,
    Josh

    Yes, I've tried the same switch that I used for the XI3.1 installations, namely "/qb".  In XI3.1 I was able to use this switch either directly in the MSIEXEC command line or in the Response.ini file as "QUIET=/qb".  In either case, this switch resulted in a silent install that showed a progress bar window for the installation, completing with a confirmation prompt indicating that the installation had completed.
    Neither approach works with the BI4.0 installation packages.  My suspicion is that SAP has switched to a different installation engine as I can't find the typical .msi installation files that would indicate this is a MSIEXEC installation.  I'm hoping someone knows what type of installation engine is being used and what the switching syntax is for silent installs. But it can't be a completely transparent silent install (I know how to do this); it must provide an option to show an installation progress bar.
    Thanks,
    Josh

  • What are the commands for compiling c++ using the command line tools for xcode?

    Hi, I am taking a class in school for c++ and i would like ot be able to practice at home i found the command line tools for xcode and went ahead and installed it on my computer. now i need to know the commands and procedure to be able to compile and run c++.

    c++ testfile.cc

  • Using Command Line Tool for Linux

    I have to use the command lines of Linux for SCM commands(like repcmd, set workarea, checkin etc...)
    should I have to install something?
    I have documentation for using the oracle repository command line Toll for Windows and Unix, but I didn't found anything about using the oracle repository command line Toll for Linux.

    JDeveloper runs excellent on Linux and is supposed to be able to use the repository, but that's a GUI...

  • Command line tools for xcode??

    I am used to compiling code much like the java sdk works from terminal where I say javac the filename and then i get a .class file that i can run by doing the command java and then the .class file after. I am now wanting to learn c++ and I dont feel like installing xcode all i want is a compiler that can run from terminal. i found command line tools for xcode on the apple developers site and i was wondering do i need xcode for this to run and after that what the commands are and how i compile/run the code. But my biggest question is still wether or not i need xcode to let command line tools work. ive read in a couple places i dont need it but in other ive read you do can i get help?!

    You don't need Xcode to compile your apps with; just the compiler/linker.
    Xcode is Apple's IDE.  One could write the same code in TextEdit but that wouldn't be easy nor fun.
    (Missed it by THAT much!) 

  • How to get the command line interface for WRT160NL router

    hi,
    How can I get the command line interface for WRT160NL router. please suggest.

    If you’re trying to access the web-based interface of your router, just use its default IP address (192.168.1.1). The Username is left blank and the Password is "admin". Here’s a quick link on how to do that.

  • Q. Any command-line options for Digimarc and Elements 7 batch file processing?

    Q. Any command-line options for Digimarc and Elements 7 batch file processing?

    Are you a digimarc subscriber? You would be better off asking them, if so.

  • Command line tools for xcode mac os x 10.6.8

    Hi,
    Will the latest command line tool work for mac os x 10.6.8 also? If yes, I will go ahead and download them.
    If no, please help find a download location for command line tools for mac os x 10.6.8.
    Also, please let me know if that will support the development of latest ios apps.

    developing for "the latest iOS Apps" is supported by the latest X-code tools, which does NOT run under 10.6.8.
    Version 3.2.6 will run under 10.6.6 and later.
    Version 5.0.1 requires 10.8.4 or later.
    Version 6.1.1 (currently the latest) requires 10.9.4 or later.

  • Compiling command line utilities for Linux with static libc

    Hi,
    The following command used to compile and link BerkeleyDB with both static libdb and static libc:
    make clean
    env LDFLAGS=-static ../dist/configure --disable-shared
    make
    Now the command only statically links libdb and not libc.
    [root@fedora8 ~]# ldd /usr/local/BerkeleyDB.5.3/bin/db_dump
    linux-gate.so.1 => (0x00110000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00c15000)
    libc.so.6 => /lib/libc.so.6 (0x00a88000)
    /lib/ld-linux.so.2 (0x00a69000)
    [root@fedora8 ~]#
    It appears that the link of the command line utilities has now been moved into "make install".
    Can anyone suggest how to also force a static link of libc?

    The command line utils are in /opt/novell/ncl/bin. There are man pages for
    them to describe how they work. If you run "ncl_man" it will list all the
    NCL man pages.
    >>> On 9/1/2006 at 8:42 AM, in message
    <[email protected]> , Joseph
    Marton<[email protected]> wrote:
    > Are there any command-line utilities for the 1.2 client? I'm thinking
    > what if my X gets hosed and I want to access my server. It'd be nice to
    > be able to still login and map drives. Granted there's always
    > samba/CIFS,
    > but if I have a working Novell Client installation and my X just fails
    > for
    > some reason it'd be nice to still utilize the Novell Client.
    >
    > Joe

Maybe you are looking for