bjorns / aem-cmd Goto Github PK
View Code? Open in Web Editor NEWCommand line tool for Adobe AEM
License: MIT License
Command line tool for Adobe AEM
License: MIT License
Create a 'groups' tool for managing groups.
There is no good way of clearing the dispatcher cache since it requires a separate url from other operations and therefor a separate server config. Not ideal.
Create a replication tool for tree activation and deactivation.
See Replication tool
Create a 'users' tool for managing users.
If it was possible to send parameters to a server side groovy script users could use that to write much more powerful tools server-side only.
Setting booleans or arrays does not work as expected.
acmd setprop acmd1="{Boolean}true",acmd2="[1,2,3,4,5]" /content/geometrixx/jcr:content
A boolean and an array.
Two string properties:
acmd1={Boolean}true
acmd2=[1
The packages tool is lacking support for the following commands:
I've built acmd from source, and most of the commands fail with 'TypeError: 'dict' object is not callable'
09:10:52|vagrant@author1:~ 0 $ acmd bundles list
Traceback (most recent call last):
File "/usr/local/bin/acmd", line 5, in
pkg_resources.run_script('aem-cmd==0.6', 'acmd')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/aem_cmd-0.6-py2.7.egg/EGG-INFO/scripts/acmd", line 7, in
main(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/aem_cmd-0.6-py2.7.egg/acmd/main.py", line 82, in main
status = run(options, config, args, cmdargs)
File "/usr/local/lib/python2.7/dist-packages/aem_cmd-0.6-py2.7.egg/acmd/main.py", line 50, in run
return cmd.execute(server, cmdargs)
File "/usr/local/lib/python2.7/dist-packages/aem_cmd-0.6-py2.7.egg/acmd/tools/bundles.py", line 28, in execute
return list_bundles(server, options)
File "/usr/local/lib/python2.7/dist-packages/aem_cmd-0.6-py2.7.egg/acmd/tools/bundles.py", line 52, in list_bundles
bundles = get_bundle_list(server)
File "/usr/local/lib/python2.7/dist-packages/aem_cmd-0.6-py2.7.egg/acmd/tools/bundles.py", line 47, in get_bundle_list
bundles = response.json()['data']
TypeError: 'dict' object is not callable
The system i'm using is debian wheezy with the following python packages installed:
09:10:59|vagrant@author1:~ 0 $ dpkg -l | grep python
ii libpython2.7 2.7.3-6+deb7u2 amd64 Shared Python runtime library (version 2.7)
ii python 2.7.3-4+deb7u1 all interactive high-level object-oriented language (default version)
ii python-apt 0.8.8.2 amd64 Python interface to libapt-pkg
ii python-apt-common 0.8.8.2 all Python interface to libapt-pkg (locales)
ii python-chardet 2.0.1-2 all universal character encoding detector
ii python-crypto 2.6-4+deb7u3 amd64 cryptographic algorithms and protocols for Python
ii python-debian 0.1.21 all Python modules to work with Debian-related data formats
ii python-debianbts 1.11 all Python interface to Debian's Bug Tracking System
ii python-fpconst 0.7.2-5 all Utilities for handling IEEE 754 floating point special values
ii python-gevent 0.13.6-1+nmu3 amd64 gevent is a coroutine-based Python networking library
ii python-greenlet 0.3.1-2.5 amd64 Lightweight in-process concurrent programming
ii python-lxml 2.3.2-1+deb7u1 amd64 pythonic binding for the libxml2 and libxslt libraries
ii python-minimal 2.7.3-4+deb7u1 all minimal subset of the Python language (default version)
ii python-oauthlib 0.1.2-1 all generic, spec-compliant implementation of OAuth for Python
ii python-pkg-resources 0.6.24-1 all Package Discovery and Resource Access using pkg_resources
ii python-reportbug 6.4.4+deb7u1 all Python modules for interacting with bug tracking systems
ii python-requests 0.12.1-1+deb7u1 all elegant and simple HTTP library for Python, built for human beings
ii python-setuptools 0.6.24-1 all Python Distutils Enhancements (setuptools compatibility)
ii python-six 1.1.0-2 all Python 2 and 3 compatibility library (Python 2 interface)
ii python-soappy 0.12.0-4 all SOAP Support for Python
ii python-support 1.0.15 all automated rebuilding support for Python modules
ii python2.6 2.6.8-1.1 amd64 Interactive high-level object-oriented language (version 2.6)
ii python2.6-minimal 2.6.8-1.1 amd64 Minimal subset of the Python language (version 2.6)
ii python2.7 2.7.3-6+deb7u2 amd64 Interactive high-level object-oriented language (version 2.7)
ii python2.7-minimal 2.7.3-6+deb7u2 amd64 Minimal subset of the Python language (version 2.7)
How do we know whether it was successful or not?
Currently the documentation shows that If you want to store any server configuration i.e host name, username and password, you need to update the ~/.acmd.rc file.
For security reasons we cannot store our server passwords outside of encrypted files, so we could not make use of this solution to update content.
Could we have an option other than --server
so that we can pass through the --host
--username
and --password
so that we don't have to store the password in a file
Create an 'rm' tool for deleting a node in JCR.
If no argument is given it should take node paths on stdin and delete all of them.
Create a 'jobs' tools for listing pending and blocking jobs.
See http://www.wemblog.com/2011/12/how-to-use-curl-command-to-find-pending.html
Create a tool for running groovy code against https://github.com/Citytechinc/cq-groovy-console
I tried to make use of the groovy console to run scripts on a server that run's both an author and publish instance of AEM.
I was able to run the script that I had loaded against the author instance but I was not able to pass a server argument to then target another AEM instance.
Then when I checked the help command I saw the read out :
Usage: acmd groups <list|create|adduser> [options] <groupname> <username>
Options:
-h, --help show this help message and exit
-r, --raw output raw response data
This seems to be copy and pasted from another command, not sure if this is an indication of the full functionality
Please can the help info be corrected for the groovy command
This is just a placeholder for re-opening issue #19 given that requests
has support for multipart/form-data
either directly via requests.post(url, files=payload)
(where payload
is a tuple rather than a dictionary, so that same field names can be used repeatedly), (also see the docs) or via requests_toolbelt. This will allow proper support for typehints.
More details are provided in the original issue #19.
Is there an option to build a package with given set of filters?
I'm not sure if Adobe changed anything but trying to use acmd user list
results in
error: Failed to get users list:
b'["/home/users.1.json","/home/users.0.json"]'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.