Revolver 1.1 is Released!

2

January 15, 2010 by Alistair Deneys

It’s been a very long ride, but the next minor version of Revolver has finally been released. If you currently hold a license for Revolver you can download the new version from the Revolver downloads page on the codeflood website. The quick start guide has also been updated.

In case you haven’t seen it yet, Revolver is a module I wrote for Sitecore to provide a command prompt inside the Sitecore desktop. This allows the developer or administrator to interact with Sitecore in a much different way (through text) which is much better for performing certain actions like executing ad-hoc queries against the content tree or performing bulk update operations.

So what’s new in Revolver 1.1? There have been lots of updates. Some you’ll be able to see, some you won’t. There has been a bit of a reworking of some of the internal code to make it more consistent and easier to maintain in the future. The following is a list of the new features and commands of Revolver 1.1 in implementation order.

  1. No Stats for find and query. I’ve added the -ns flag to pass to the find and query commands. This causes the command to not output the count of how many items were found. This will allow you to use these commands in sub commands.

  2. Path parameters for query. Now, this is kind of a funny one. Sitecore query already allows you to specify a path. But to remain consistent with the rest of the Revolver commands I added the ability to specify a path to run the query at.

  3. Slash = root. The cd command has been updated to allow the use of slash (/) to refer to the root item of the content tree (sitecore item).

    cd /
    
  4. Added the split command. The split command allows you to split a string on a given token, newline characters or tab characters then execute a command against each element. So I could split a multilist field and display the names of each item.

    split -s | < (gf -f multilist) (ga -a name $current$)
    

    The token $current$ can be used in the command parameter and represents the current element from the split string. I could also do something like create a bunch of items based on a text file on the file system that contains a single name per line.

    split -n < (echo -i -f itemnames.txt) (touch -t document $current$)
    
  5. Added the ct command. The ct command allows you to change the template of an item. The command checks to ensure the target template contains the right fields so you don’t lose field data. You can force the change if you want to change to a new template which doesn’t contain all the currently used fields and you’re happy to lose that field data by using the -f flag.

  6. Case insensitive regexs The regular expressions used on the ls and find commands previously were case sensitive, but more often than not we don’t care about the case. So the regexs are now case insensitive by default and you can pass the -c flag to the command to make them case sensitive.

  7. Added the users command The users command can be used to list the current sessions of the Sitecore application and also to kick a session. Note though, even though the session is kicked to allow another session to start, if the owner of the kicked session makes another request before the available sessions runs out they will have a new session automatically created for them.

  8. Fast query support Revolver now supports Sitecore’s fast query. Simply prefix the Sitecore query you pass to the query command with fast:

  9. Added support for branches Sitecore 6.0 did away with masters and introduced branches. Revolver now supports branches on a number of commands.

  10. Purge all languages The rmv command now supports passing an -a flag to indicate you want to remove versions in all languages and not just the current language.

  11. Comments in scripts You can now include comments in your scripts by starting the line with a hash (#) symbol.

  12. Help for scripts The script data template now has fields to support the help system of Revolver including adding examples.

  13. Added lsdb command The lsdb command lists all the databases of the current system.

  14. Added the lm command The lm command allows you to manipulate lists. So now you can add an ID to a multilist field and be sure it won’t add it twice.

    sf multilist < (lm -a < (gf -f multilist) | {945F96B9-5A7D-459C-8240-3A61362A0D32})
    

    Or you could remove the ID and not have to worry about where it appears in the list or having an empty element resulting in two pipes next to each other in the field.

    sf multilist < (lm -r < (gf -f multilist) | {945F96B9-5A7D-459C-8240-3A61362A0D32})
    
  15. Added exit command You can now close a Revolver window by simply typing exit. Although I say it is a command, it’s not actually…

  16. Ajax submission The previous version of Revolver used Sitecore’s postEvent function which causes the entire form to post back to the server. That includes all the text in the command window including all the commands you’ve typed and all the responses. The new version of Revolver now uses Ajax to send only the current command to the server, then inserts the response into the textbox. Much more efficient.

  17. More operations in expressions Expressions (used in the find command) now support the following operations. Starts with ([), ends with (]) and contains (?). So I could now look for any child item of the current context that starts with “abc”.

    find -e (@@name [ abc) pwd
    

    Or search for items which contain “Sitecore” in the text field.

    find -e (@text ? sitecore) pwd
    
  18. Added support for UNC paths to echo The echo command now supports files on UNC paths and not just local files.

  19. Ensure output folder in echo The echo command now also ensures folders which you’re outputting to exist before writing any output files, and if the folder doesn’t exist it will create it.

  20. Sorting on ls command The ls command now supports sorting of the content. By default the items will be displayed in Sitecore order. But they can be reversed using the -d flag or alphabetically using the -a flag.

  21. Output text limit Revolver now contains an outputbuffer environment variable which defines the maximum number of characters that can be contained in the output window.

  22. Input a newline in a field The Revolver UI now allows you to use shift + enter to input a newline. This can be used to enter multiple lines into a rich text or multiline text field.

  23. Added grep command The grep command works the same way as grep on a unix or linux system. grep is used to filter multiple lines and match each line against a regular expression. This allows you to search through a lot of input. So you could search through a list of sessions returned by the users command.

    grep admin < users
    
  24. Added links command The links command allows you to list incoming, outgoing and bad links for the context item.

And remember, you can always use the help command to get detailed help for any command in Revolver.

Advertisements

2 thoughts on “Revolver 1.1 is Released!

  1. Hey Al,
    Great work on updating Revolver, it reminds me of powershell ever time i see it, cough cough maybe you could make a powershell interface šŸ™‚
    Chris

  2. Alistair Deneys says:

    Thanks Chris.
    A powershell interface is on the todo list, along with a standard Windows CLI interface as well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

The views expressed on this blog are solely my own and do not necessarily reflect the views of my employer.
%d bloggers like this: