lvidarte / lai-client Goto Github PK
View Code? Open in Web Editor NEWA command line program to store notes and keep them synchronized between multiple computers.
Home Page: http://lai.nerdlabs.com.ar
License: GNU General Public License v3.0
A command line program to store notes and keep them synchronized between multiple computers.
Home Page: http://lai.nerdlabs.com.ar
License: GNU General Public License v3.0
Este issue es un epic ya que no hay ningún test.
Debido a los cambios de estructura del documento la funcion para enviar docs a gits quedó desactivada.
Hay que arreglarla y activarla nuevamente.
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.
The method was enabled in Client class. What are you waiting for implement it in the sqlite driver?
$ 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
"
Ahora la configuración se hace copiando config.py a local_config.py ya que este está en .gitignore.
Habría que hacer que lai pueda leer la configuración desde un archivo fuera del repo, posiblemente desde ~/.lai-client
En la librería estándar está ConfigParser: http://docs.python.org/library/configparser.html
Cambiar la interfaz usando el módulo argparse.
La idea es usar comandos:
lai search
lai add
lai edit
etc.
The status option must show docs with bigger tid or synched in False
Transform words to lowercase to simplifly search
When I do an client update from a doc that has local modifications, the client must offer the options to:
The fields are necessary in order to know if a document has to be deleted or not.
Como modelo tomar el driver de mongo.
When everything goes ok the output of the following commands must be nothing, silent:
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:
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
Implement the same method used in mongo driver to get a unique auto increment ID for tid
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"
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
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'
Clear doc.data and doc.keys on client update when the user was removed from users list.
Fix sqlite driver according new doc structure: https://github.com/lvidarte/lai-server/wiki
If sid and tid are None, there is no reason to move user from users to usersdel
Now when a doc is saved the keys are generated manually or automatically.
In order to know if the change was applied or not the methods Document.add user and Document.deluser must return a boolean
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.
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.