Code Monkey home page Code Monkey logo

lai-client's People

Contributors

alfredormz avatar lvidarte avatar pablodo avatar vdg01 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lai-client's Issues

Tests

Este issue es un epic ya que no hay ningún test.

Agregar el campo help a los docs

La ayuda del texto debería guardarse en otro lugar:

data {
    'body': str,
    'help': str,
}

Para esto habría que ajustar la interfaz de usuario, los listados, las búsquedas.. etc.

PEM encryption format not supported. [Solved]

$ lai sync

Traceback (most recent call last):
File "/home/mariano/projects/lai-client/lai/app.py", line 266, in
locals()args.command
File "/home/mariano/projects/lai-client/lai/app.py", line 215, in sync
client.sync()
File "/home/mariano/projects/lai-client/lai/client.py", line 42, in sync
response = self._send(request)
File "/home/mariano/projects/lai-client/lai/client.py", line 120, in _send
msg = crypto.decrypt(enc, CLIENT_PRV_KEY)
File "/home/mariano/projects/lai-client/lai/lib/crypto.py", line 55, in decrypt
key = RSA.importKey(private_key)
File "/home/mariano/projects/lai-client/env/lib/python2.7/site-packages/Crypto/PublicKey/RSA.py", line 641, in importKey
raise ValueError("PEM encryption format not supported.")
ValueError: PEM encryption format not supported.

Solution: http://hustoknow.blogspot.com.ar/2012/01/using-pycrypto-instead-of-m2crypto-on.html

"
You can use the openssl command to convert your public/private key PEM file to DER format. You'll also need to the same if you're using a PEM certificate too:

openssl rsa -outform der privkey.pem > privkey.der
openssl rsa -outform der < cert.pem > cert.der
"

Nueva interfaz

Cambiar la interfaz usando el módulo argparse.
La idea es usar comandos:

lai search
lai add
lai edit

etc.

Handle merge of documents

When I do an client update from a doc that has local modifications, the client must offer the options to:

  • Update from server
  • Keep local modifications (ignore server changes)
  • Edit the actual document

Improve the app output

  • When everything goes ok the output of the following commands must be nothing, silent:

    • --add
    • --del
    • --edit
    • --adduser
    • --deluser
  • In search results the output must be simple:

    ID: data

  • I would be nice to have two different output for get a document: --get and --show (or something like that). One that just get the data and other that get (show) all the doc:

    id | sid | tid | synched | users | usersdel

    keys

    data

  • Update

    Connecting to server..
    Updated N documents | Nothing to update

  • Commit

    Connecting to server..
    Commited N documents | You must update first | Nothing to commit

  • Status must show if there are documents for commit (synched=True), probably showing those documents

    ID : data (truncated..) : users : usersdel

  • Get all documents: It would be nice to have an option (--getall ?) that returns all documents in the format

    ID: data

pygithub must be optional?

If I don't have the pygithub module I get the message:

Traceback (most recent call last):
  File "/home/xleo/src/lvidarte/lai/client/lai/app.py", line 13, in <module>
    from lai import Client, Database, Document
  File "/home/xleo/src/lvidarte/lai/client/lai/__init__.py", line 2, in <module>
    from lai.client import Client
  File "/home/xleo/src/lvidarte/lai/client/lai/client.py", line 8, in <module>
    from lai.gist import Gist, GistException
  File "/home/xleo/src/lvidarte/lai/client/lai/gist.py", line 1, in <module>
    from github import Github, InputFileContent
ImportError: No module named github

I don't know if pygithub must be required.
Moreover, the error message is not clear because github module doesn't exist.
May be something like that:

"You need the pygithub module"

usersdel must be checked after response

After an update or commit, if user is in usersdel field, then the data and keys fields must be set with None.

if config.USER in doc.usersdel:
    doc.data = None
    doc.keys = None

La función para copiar un doc al portapapeles no funciona

Traceback (most recent call last):
  File "/home/xleo/src/lvidarte/lai-client/lai/app.py", line 255, in <module>
    locals()[args.command](args)
  File "/home/xleo/src/lvidarte/lai-client/lai/app.py", line 222, in copy
    elif args.to_clip:
AttributeError: 'Namespace' object has no attribute 'to_clip'

Instalador

Estaría bueno empaquetar lai en formato pip,
cosa de poder hacer pip install lai-client

Pero también tendría que tener un setup.py

No tengo idea de esto, así que hay que averiguar.

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.