Code Monkey home page Code Monkey logo

aem-cmd's People

Contributors

bjorns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aem-cmd's Issues

Complete packages tool

The packages tool is lacking support for the following commands:

  • upload
  • install
  • update
  • rebuild

Use multipart/form-data for POST requests

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.

Groovy command has incorrect help text

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

Setprop only works with strings

Setting booleans or arrays does not work as expected.

Steps:

acmd setprop acmd1="{Boolean}true",acmd2="[1,2,3,4,5]" /content/geometrixx/jcr:content

Expected:

A boolean and an array.

Actual:

Two string properties:

acmd1={Boolean}true
acmd2=[1

TypeError: 'dict' object is not callable

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)

The ability to pass the host,username and password in the command

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

Fix dispatcher clear

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.

Send parameters to server-side code

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.

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.