-
Notifications
You must be signed in to change notification settings - Fork 7
Installation Guide
The Alfresco shell tools use the jshon tool to parse JSON output from the alfresco REST API. It is very valuable tool to work with JSON on the command line. Compare it to the xmlstarlet tool with xml.
Please see how you can install the jshon tool. The alfresco shell tools project has made precompiled packages available to ease the installation. Installation with ready-to-use packages
On the downloads page a precompiled package of jshon for linux (Ubuntu .deb package) and for Mac OS X (just the executable) is available. Edit: From Ubuntu 14.x onwards jshon can be installed directly from the package manager!
sudo apt-get install jshon
How to install this tool is described here in detail.
-
Compile and install Jansson library
On ubuntu 12.x there is a jansson package: apt-get install libjansson-dev
All details are here http://www.digip.org/jansson/doc/2.3/gettingstarted.html#compiling-and-installing-jansson and is a standard autotools based project with configure && make && make install.
-
Compile and install jshon program
- Download tgz from here: wget http://kmkeen.com/jshon/jshon.tar.gz
- extract to a directory of your choise: devenv/lib/jshon and cd into that directory
- be sure to have the packages libc6-dev and build-essentials
- do a 'make' which creates the jshon binary
- the jshon binary has to put on your path, e.g. /usr/local/bin or /usr/bin
If you get the error "library libjansson" not found you may need a ldconfig run. Maybe the environment variable LD_LIBRARY_PATH=/usr/local/lib has to be set, so that the jansson libary can be found while executing jshon
cd /usr/local/share/
sudo git clone https://github.com/ecm4u/alfresco-shell-tools.git
sudo chmod +x /usr/local/share/alfresco-shell-tools/bin/*.sh
export ALFTOOLS_ENDPOINT=http://localhost:8080/alfresco
export ALFTOOLS_USER=admin
export ALFTOOLS_PASSWORD='admin'
export ALFTOOLS_HOME=/usr/local/share/alfresco-shell-tools
export PATH=$PATH:$ALFTOOLS_HOME/bin
You need to put the webscript from alfresco-shell-tools/alfresco/templates/webscripts to the Alfresco Repository.
The easiest way would be to copy them using a file protocol. Once they're in place you can of course use shell-tools to update ;-)
sudo mkdir /mnt/alfresco
sudo mount -t cifs -o user=admin,port=1445 //localhost/alfresco /mnt/alfresco/
sudo cp -r /usr/local/share/alfresco-shell-tools/alfresco/templates/webscripts/ecm4u /mnt/alfresco/Data\ Dictionary/Web\ Scripts/de/
Restart alfresco or refresh webscripts using "Refresch Webscripts" button on http:///alfresco/service/index