You are not logged in.

#26 2014-01-13 13:47:16

nsmathew
Member
From: Asia
Registered: 2012-08-18
Posts: 31

Re: pynote - manage notes on the commandline

rumpelsepp wrote:
nsmathew wrote:

Hi, is there any plan to introduce an option to show all the notes, like 'note show all' ? Also is there a way to edit the title?
And thanks for the software!

Implemented with http://cgit.sevenbyte.org/pynote/commit … daef526c43
Available in the most recent pynote-git package as well.

$ note edit KEY --title

This works fine as well. Thanks.


Is man one of God's blunders? Or is God one of man's blunders?
Friedrich Nietzsche

Offline

#27 2014-01-22 16:59:17

Divinorum
Member
Registered: 2011-08-16
Posts: 44

Re: pynote - manage notes on the commandline

Great program. This consolidated my notes effectively. Using abook for mutt-integrated contact information, taskwarrior for todo lists and pynote for notations is a solid combination. I feel that pynote is much better than hnb and has cemented itself among the simple and powerful group of commandline utility programs. Good job and thank you.

During build from the AUR it complained about tests.py not being in the source directory. I edited the pkgbuild by removing these last lines:

check() {
  cd "$srcdir/${_pkgname}"
  python tests.py
}

pynote builds smoothly then.

Offline

#28 2014-01-22 17:05:42

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

Divinorum wrote:

Great program. This consolidated my notes effectively. Using abook for mutt-integrated contact information, taskwarrior for todo lists and pynote for notations is a solid combination. I feel that pynote is much better than hnb and has cemented itself among the simple and powerful group of commandline utility programs. Good job and thank you.

smile Nice to hear, thank you very much! smile

During build from the AUR it complained about tests.py not being in the source directory. I edited the pkgbuild by removing these last lines:

check() {
  cd "$srcdir/${_pkgname}"
  python tests.py
}

pynote builds smoothly then.

Damn I forgot to add test.py to MANIFEST... I will fix this immediately...

edit: Should work again!

Last edited by rumpelsepp (2014-01-22 17:21:17)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#29 2014-01-24 10:35:49

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

I need your help guys!

Currently I'm implementing tags (see feature branch here: http://cgit.sevenbyte.org/pynote/?h=feature/tags). Everything works quite well but I stuck with the design of the command line interface...

I have already implemented this:

# print a filtered table based on tags 'foo' and 'bar'
$ note list --tags "foo bar"

# print out all used tags
$ note tags

I'm wondering what would be the best workflow for

  • adding tags to a note

  • editing tags

  • deleting tags

  • maybe some other, additional things?

What do you think?

Last edited by rumpelsepp (2014-01-24 12:59:02)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#30 2014-01-28 20:05:19

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

Just merged 'feature/tags' branch into develop.

I have chosen the following design:

# print a filtered table based on tags 'foo' and 'bar'
$ note list --tags "foo bar"

# print out all used tags
$ note tags

# print out all tags of a note
$ note tags 8

# add tags
$ note tags 8 --add "foo bar"

# delete tags
$ note tags 8 --delete "foo"

Available in pynote-git!

Last edited by rumpelsepp (2014-01-28 20:05:43)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#31 2014-01-31 17:20:39

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

I have released pynote 0.2, check out the release notes: http://redmine.sevenbyte.org/projects/p … 2014-01-31
I have also started some basic documentation in my redmine wiki: http://redmine.sevenbyte.org/projects/pynote/wiki

I hope you like my stuff. smile
Updated AUR packages are available as well.


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#32 2014-02-01 15:31:31

tonk
Member
Registered: 2013-05-15
Posts: 38

Re: pynote - manage notes on the commandline

Great little program, many thanks.
I have some problems with version 0.2.1-1
$ note output

Traceback (most recent call last):
  File "/usr/bin/note", line 4, in <module>
    import pynote.__main__
  File "/usr/lib/python3.3/site-packages/pynote/__main__.py", line 5, in <module>
    import pynote.command as note
  File "/usr/lib/python3.3/site-packages/pynote/command.py", line 9, in <module>
    from pynote import config
  File "/usr/lib/python3.3/site-packages/pynote/config.py", line 24, in <module>
    config.read()
TypeError: read() missing 1 required positional argument: 'filenames'

0.2 works fine

Offline

#33 2014-02-01 16:04:38

null
Member
Registered: 2009-05-06
Posts: 398

Re: pynote - manage notes on the commandline

There is also an error in pynote/init.py:53, it should be os.mkdir(..) not os.mkdirs(..)
After fixing this comes:

Traceback (most recent call last):
  File "/usr/bin/note", line 15, in <module>
    pynote.__main__.run()
  File "/usr/lib/python3.3/site-packages/pynote/__main__.py", line 134, in run
    pynote.init.run(args.config, args.force)
  File "/usr/lib/python3.3/site-packages/pynote/init.py", line 53, in run
    os.mkdir(notedir)
NameError: global name 'notedir' is not defined 

Last edited by null (2014-02-01 16:06:50)

Offline

#34 2014-02-01 19:23:31

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

Hey,
yesterday unfortunately I messed up something in the code... I will fix the problems on Monday. I'm sorry for the inconvenience. :-)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#35 2014-02-05 11:42:28

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

With a little delay, here is pynote 0.2.2: http://redmine.sevenbyte.org/projects/p … 2014-02-05


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#36 2014-02-26 10:58:14

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

stewie wrote:

Do we need an export/import function to plain text files?

I think that would be a great idea. That way would help to keep a bunch of misc. text files together in one place,
or if you needed to save a note somewhere else.

I started this here: http://cgit.sevenbyte.org/pynote/commit … c122d09e79

Usage:

# Export all notes
$ note export

# Export a specific note
$ note export 5

Currently pynote takes the current working dir and creates a folder called "pynote-export". --no-header and --force are supported as well.


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#37 2014-04-08 19:26:26

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

A few news:

- I am working on version 0.3 now, any ideas will be appreciated.
- Documentation is now hosted on read the docs: http://pynote.readthedocs.org/en/latest/ The docs build automatically after changes; very nice one!
- I moved the issue tracker to github. Maybe I will get a few more contribution some day... :-)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#38 2014-06-14 08:46:23

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

There were a lot of new ideas in the last months. I decided to tag the next pynote version as 1.0 and reworked the whole data storage design. Now pynote stores notes in single plain text files and extracts the meta data from the files. You'll find everything in the docs and on the github page. Furthermore I created split packages in the AUR. You can install pynote and the docs seperately. The docs package includes man pages and html documentation.

https://github.com/rumpelsepp/pynote
https://pynote.readthedocs.org
https://aur.archlinux.org/pkgbase/pynote-git/

Last edited by rumpelsepp (2014-06-14 08:48:49)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#39 2014-06-14 11:29:19

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: pynote - manage notes on the commandline

might try it out - any plans to allow simple encryption of a note? you might have a note with sensitive data like email passwords
also when I tried to install the docs package from aur I got the message
"Could not read pynote-docs-git PKGBUILD: badly packaged tarball"

Last edited by chickenPie4tea (2014-06-14 11:31:49)


You can like linux without becoming a fanatic!

Offline

#40 2014-06-14 11:32:40

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

chickenPie4tea wrote:

might try it out - any plans to allow simple encryption of a note? you might have a note with sensitive data like email passwords

Thanks! Pynote 1.0 is in development. If you find any bugs please let me know. smile
Currently I do not have any plans about encryption, but I think it is a good idea. I will add this in a future release.

chickenPie4tea wrote:

"Could not read pynote-docs-git PKGBUILD: badly packaged tarball"

You'll have to use an AUR helper with split package support. Aura works for me.

Last edited by rumpelsepp (2014-06-14 11:34:19)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#41 2014-06-22 10:54:27

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

Some more interesting changes for pynote 1.0:

- short commands: you can use "note s" instead of "note show"
- pager support: if the text is longer than your terminal a pager will be used

stay tuned smile


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#42 2014-08-12 15:20:30

ag4ve
Member
Registered: 2014-08-12
Posts: 1

Re: pynote - manage notes on the commandline

Did a python setup.py install and then:

% note list                                                                                                                       gits/pynote (master) swlap1
Error: Your data directory does not exist!
Please create a data directory.
You can do this with "mkdir /home/swilson/.note".
% mkdir ~/.note                                                                                                                   gits/pynote (master) swlap1
% note list                                                                                                                       gits/pynote (master) swlap1
Traceback (most recent call last):
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/bin/note", line 5, in <module>
    pkg_resources.run_script('pynote==0.3', 'note')
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/distribute-0.6.49-py3.4.egg/pkg_resources.py", line 507, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/distribute-0.6.49-py3.4.egg/pkg_resources.py", line 1273, in run_script
    exec(compile(open(script_filename).read(), script_filename, 'exec'), namespace, namespace)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/pynote-0.3-py3.4.egg/EGG-INFO/scripts/note", line 16, in <module>
    pynote.__main__.cli()
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 488, in __call__
    return self.main(*args, **kwargs)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 474, in main
    self.invoke(ctx)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 758, in invoke
    return self.invoke_subcommand(ctx, cmd, cmd_name, ctx.args[1:])
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 767, in invoke_subcommand
    return cmd.invoke(cmd_ctx)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 659, in invoke
    ctx.invoke(self.callback, **ctx.params)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 325, in invoke
    return callback(*args, **kwargs)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 325, in invoke
    return callback(*args, **kwargs)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/pynote-0.3-py3.4.egg/pynote/__main__.py", line 76, in list
    echo(str(Table(notes, headline=header)))
UnboundLocalError: local variable 'header' referenced before assignment

% note new test                                                                                                                   gits/pynote (master) swlap1
Traceback (most recent call last):
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/bin/note", line 5, in <module>
    pkg_resources.run_script('pynote==0.3', 'note')
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/distribute-0.6.49-py3.4.egg/pkg_resources.py", line 507, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/distribute-0.6.49-py3.4.egg/pkg_resources.py", line 1273, in run_script
    exec(compile(open(script_filename).read(), script_filename, 'exec'), namespace, namespace)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/pynote-0.3-py3.4.egg/EGG-INFO/scripts/note", line 16, in <module>
    pynote.__main__.cli()
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 488, in __call__
    return self.main(*args, **kwargs)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 474, in main
    self.invoke(ctx)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 758, in invoke
    return self.invoke_subcommand(ctx, cmd, cmd_name, ctx.args[1:])
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 767, in invoke_subcommand
    return cmd.invoke(cmd_ctx)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 659, in invoke
    ctx.invoke(self.callback, **ctx.params)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/click-2.6-py3.4.egg/click/core.py", line 325, in invoke
    return callback(*args, **kwargs)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/pynote-0.3-py3.4.egg/pynote/__main__.py", line 173, in new
    note = Note.create(title)
  File "/home/swilson/.pythonbrew/pythons/Python-3.4.1/lib/python3.4/site-packages/pynote-0.3-py3.4.egg/pynote/container.py", line 109, in create
    path = Path(os.path.join(config.DATA, filename))
AttributeError: 'module' object has no attribute 'DATA'

ENV: Debian 7; zsh 5.0.5-dev

Last edited by ag4ve (2014-08-12 15:22:01)

Offline

#43 2014-08-12 20:02:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pynote - manage notes on the commandline

ag4ve, please edit your post.
When posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Does it run OK on Arch?

Offline

#44 2014-08-12 21:10:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: pynote - manage notes on the commandline

ag4ve.  I see you are running Debian.  I understand your posting in the Arch Forums for this problem, as this thread is probably the only place to get support for this program.  As a moderator, I am okay with that.

Does Debian use Python 3 or Python 2?  Arch uses Python 3.  Trying to run this under Python2 might not be fruitful.

Last edited by ewaller (2014-08-12 21:10:28)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#45 2014-08-13 09:33:58

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

Hi ag4ve,
thanks for trying out my little project and reporting this problem. Pynote 1.0 is a major rework and I think there are many bugs left.

on the first error:
It should be fixed with: https://github.com/rumpelsepp/pynote/co … c3b8eb33c8

on the second error:
I have fixed this almost two weeks ago but I forgot to push the fix to github. Sorry for that.
https://github.com/rumpelsepp/pynote/co … 1374abfae0

@ewaller

Does Debian use Python 3 or Python 2?  Arch uses Python 3.  Trying to run this under Python2 might not be fruitful.

He did use python3 so everything is fine. smile

Last edited by rumpelsepp (2014-08-13 09:50:04)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#46 2014-09-02 12:58:11

leonteale
Member
Registered: 2014-09-02
Posts: 1

Re: pynote - manage notes on the commandline

$ note new "test"
Traceback (most recent call last):
  File "/usr/bin/note", line 4, in <module>
    import pynote.__main__
  File "/usr/lib/python2.6/site-packages/pynote/__main__.py", line 4, in <module>
    import pynote.init
  File "/usr/lib/python2.6/site-packages/pynote/init.py", line 100
    with open(data, 'w') as d, open(trash, 'w') as t, open(revisions, 'w') as r:
                             ^
SyntaxError: invalid syntax

i receive the above when trying to run note. i have tried this on both centos and ubuntu. using differnt version of python. any thoughts guys. im a little stuck.

thank you

Offline

#47 2014-09-02 16:47:59

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

Hi, currently I am on holiday. You use python 2.6, pynote only supports python >= 3.4 :-)


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

#48 2014-10-22 13:00:48

rumpelsepp
Member
From: Bavaria
Registered: 2012-11-13
Posts: 105
Website

Re: pynote - manage notes on the commandline

I just realized that I have forgotten to post an announcement here. On 2014-09-12 pynote 1.0 has been released.
Feel free to check it out and report any bugs. smile

Changelog: http://pynote.readthedocs.org/en/1.0.0/ … 2014-09-12
Updating from 0.2 to 1.0: http://pynote.readthedocs.org/en/1.0.0/ … 0-2-to-1-0


Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).

Offline

Board footer

Powered by FluxBB