Some Q's and suggestions

15 views
Skip to first unread message

Jostein Berntsen

unread,
Nov 11, 2010, 10:51:04 AM11/11/10
to notetaking...@googlegroups.com
I have some questions and suggestions for nts:

1. Is is possible to list a note text without using fine, and without
the folder hierarchy?
2. Could there be an option to list all tags that are used in the notes?
3. Will there be an export option for nts to f.ex. otl files and yaml
formats?
4. Does the notes have an ID that can be listed and referred to?


Jostein

Dan Graham

unread,
Nov 12, 2010, 9:07:55 AM11/12/10
to Note Taking Simplified
1) Do you mean from the command line without the title (fine?) and
folder hierarchy? If so, I could add this.

2) Yes, I could add the ability to get a list of tags with the number
of times each has been used.

3) What is an "f.ex. otl" file?

Do you mean export from the gui or from the command line and, if
the latter, how would you select which notes to include?

What data structure would you like for the yaml export?

4) The internal ID of a note is in the form "P:B:E" where P is the
relative path of the note file, B is the line number in the fine
containing the note title (the beginning of the note) and E is the
file line number on which the note ends. If a new note is appended to
the end of a file, it would not change the ID's of any existing notes.
On the other hand, if a note file is edited and a line is added or
removed from a note, then the ID's of all subsequent notes would be
changed.

Dan Graham

unread,
Nov 12, 2010, 11:26:55 AM11/12/10
to Note Taking Simplified
Would the following new way of specifying details on the command line
work for you? I'm guessing that "-d 1" would give what you want.

usage: -d N where N in [1, 2, 3, ... 15] is the sum of one or more
of
the following:

1: body
2: title
4: path (if outlining by path; tag if outlining by tag)
8: id & tags (if outlining by path; id and path if outlining by
tag)

Illustrations for outlining by path:

1) ######################################################
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~

body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~

body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~


2) ######################################################
title1

title2

title3


3) ######################################################
title1
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~

title2
body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~

title3
body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~


4) ######################################################
rel_path/to/1&2 (1 and 2 have the same rel_path)

rel_path/to/3



5) ######################################################
rel_path/to/1&2
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~

body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~

rel_path/to/3
body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~


6) ######################################################
rel_path/to/1&2
title1

title2

rel_path/to/3
title3


7) ######################################################
rel_path/to/1&2
title1
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~

title2
body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~

rel_path/to/3
title3
body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~


8) ######################################################
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)



9) ######################################################
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~
rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)


10) le1
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

title2
rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

title3
rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)


11) #####################################################
title1
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

title2
body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

title3
body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~
rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)


12) #####################################################
rel_path/to/1&2
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

rel_path/to/3
rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)



13) #####################################################
rel_path/to/1&2
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

rel_path/to/3
body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~
rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)


14) #####################################################
rel_path/to/1&2
title1
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

title2
rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

rel_path/to/3
title3
rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)


15) #####################################################
rel_path/to/1&2
title1
body1~~~~~~~~~~~~~~~~
body1~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin1:line_end1 (tags for 1)

title2
body2~~~~~~~~~~~~~~~~
body2~~~~~~~~~~~~~~~~
rel_path/to/1&2.EXT1&2:line_begin2:line_end2 (tags for 2)

rel_path/to/3
title3
body3~~~~~~~~~~~~~~~~
body3~~~~~~~~~~~~~~~~
rel_path/to/3.EXT3:line_begin3:line_end3 (tags for 3)




On Nov 11, 10:51 am, Jostein Berntsen <jber...@broadpark.no> wrote:

Jostein Berntsen

unread,
Nov 12, 2010, 11:37:47 AM11/12/10
to Note Taking Simplified
This looks great, and would cover what I would like. Thanks for this
overview.


Jostein

> --
> You received this message because you are subscribed to the Google Groups "Note Taking Simplified" group.
> To post to this group, send email to notetaking...@googlegroups.com.
> To unsubscribe from this group, send email to notetakingsimpli...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/notetakingsimplified?hl=en.
>

Jostein Berntsen

unread,
Nov 12, 2010, 11:50:58 AM11/12/10
to Note Taking Simplified

1) Like I said in the last mail as an answer to your mail with examples,
it would be fine to be able to list only the notes text based on regex
search or the ID for a specific note.

2) This would be a great feature to see what tags that are active.

3) I meant a file in vimoutliner format here. As nts can give a
hierarchy output with notes text it could be useful to export to an
outlining tool like VO.

For yaml export it could be a simple format like it's decsribed in the
man page:

http://linux.die.net/man/3/yaml

4) The ID reference is useful for listing a specific note or several
notes. So it would be possible to do:

n.py <note-ref>

to get the specific note listed. An option to open it directly in an CLI
editor would be great to.


Jostein

Dan Graham

unread,
Nov 12, 2010, 2:33:21 PM11/12/10
to Note Taking Simplified
3) I'm not sure I understand the reason for wanting to export to vim
outliner format. I use vim myself and, IMHO, the format of nts text
files are much simpler than the vim outline format. Plus, the gui
version of nts is already an outliner. What would you do with vim that
you couldn't do as well or better with nts? It would be fairly simple
to export from nts to vim but much more difficult to import changes
made using vim back to nts.

I have pretty much the same question about yaml. When I started
working on nts I thought of using yaml, but found the format that nts
now uses much simpler. Here, for example, is a yaml data structure
using a list of notes, each of which is a hash:

- title: title of note 1
body:
- 'line 1 of note 1 body'
- ' line 2 of note 1 body'
- '...'
tags: [tag 1, tag 2, ...]
path: path1
lines: [b1, e1]

- title: title of note 2
body:
- ' line 1 of note 2 body'
- 'line 2 of note 2 body'
- '...'
tags: [tag 1, tag 2, ...]
path: path2
lines: [b2, e2]

As another example, here is a data structure using a hash of hashes
with the note id's as the keys:

id_of_note_1:
title: title of note 1
body:
- 'line 1 of note 1 body'
- ' line 2 of note 1 body'
- '...'
tags: [tag 1 of note 1, tag 2 of note 1, ...]

id_of_note_2:
title: title of note 2
body:
- ' line 1 of note 2 body'
- 'line 2 of note 2 body'
- '...'
tags: [tag 1 of note 2, tag 2 of note 2, ...]

Neither of these if very appealing to me. Many yaml formats are
possible, of course, and you might have a simpler one in mind.

If what you really want is the data in a usable form and don't care
directly about having a readable serialization, then nts could export
the data structure as a pickle file. Perhaps if I knew more what you
ultimately want to do, then I might be able to provide more help.

4) It would not be to difficult to produce a numbered list of notes
which satisfy the filters entered on the command line with a prompt to
enter one of the numbers. The external editor you specified in your
~/.nts/rc file would then be called to open the relevant file that the
beginning line of the note. But you can already do this much more
easily in the gui by just selecting the note and then pressing F5.
Are you trying to completely avoid the use of the gui version of nts?

-Dan

Jostein Berntsen

unread,
Nov 12, 2010, 2:58:44 PM11/12/10
to Note Taking Simplified
I only use the cli version of nts and might be thinking too much on how
I can access the different notes quickly and easily, and edit many files
without having to search for them continously. Instead of a otl export
maybe a ncurses interface might be usable?

The thought behind the yaml format was to have an option to handle files
with parsing through an external language. Might be too cumbersome as
this makes the structure too complex.

tnote has an id for each notes file that makes it easy to open a
specific note from the command line. I think easy accesibility for a
note is useful, as well as having a quick way to get it opened for
editing.

Jostein

Dan Graham

unread,
Nov 12, 2010, 3:07:04 PM11/12/10
to Note Taking Simplified
Jostein,

Are you saying that you cannot use the gui version of nts?

I'm not interested in developing a curses version since it wouldn't
work under windows and, even under linux and os x, what can be done
with curses is much, much more limited than what is possible with
wxPython.

-Dan

Jostein Berntsen

unread,
Nov 12, 2010, 3:12:20 PM11/12/10
to Note Taking Simplified
I can use the gui version, but I mostly prefer CLI apps for work and
fun. :)


Jostein

Dan Graham

unread,
Nov 17, 2010, 1:11:25 PM11/17/10
to Note Taking Simplified
63 just released has some major changes for the CLI (command line
interface). In support of these changes, there are new rc settings:
EDITOR: the editor to be used with the CLI
quick: the file to which 'quick' notes should be appended. (by
default quick = 'quick.txt')
Additionally, there is a new datestamp feature. Instances of '!
d' (without the quotes) found anywhere in a note will automatically be
replaced with the current date and time when the note is saved.

The additions to the help display describe the new CLI features:

-d DISPLAY An integer from [1, ..., 7] which is the sum of one or
more of the following:
1: note title
2: note body
4: note id and tags
Default: 1.
-l LINES If LINES is 0 or if the note body contains no more
than LINES
+ 1 lines, show the entire body of the note. Else show
the
first LINES lines and append a line showing the number
of
omitted lines. Default: 0.
-n NUMBER 0: hide item numbers; 1: Show item numbers.
Default: 1.
-e EDIT If there is a note numbered EDIT among those which
satify the
current filters, then open that note for editing using
EDITOR.
-r REMOVE If there is a note numbered REMOVE among those which
satify
the current filters, then remove that note after
prompting for
confirmation.
--tag_usage Print a report showing the number of uses for each tag
and
exit.
-a Add a new note.
-q Add a quick note.

Jostein Berntsen

unread,
Nov 20, 2010, 3:53:36 AM11/20/10
to Note Taking Simplified
I just tested the different new options and these seem to work great!
Like that tag feature and having a way to reference and edit specific
notes.

I have some questions:

1. Did the path/outline option disappear? Would this be option 3 to the
-d parameter?

2. Should the editor and the editcmd variables be set already in
~/.nts/rc for the CLI setup also as this will save some time for the
user?

Jostein

Jostein Berntsen

unread,
Nov 20, 2010, 4:06:30 AM11/20/10
to Note Taking Simplified
Maybe this option should also be default for when you want to look at a
specific note?

n.py 3 -d 3


Jostein

Dan Graham

unread,
Nov 20, 2010, 10:25:31 AM11/20/10
to Note Taking Simplified
Path would have required -d 8 since 3 = 1+2 is already taken. Since id
(-d 4) already shows path plus the note lines and the tags, if any, I
thought that an option to show just the path itself was redundant and
eliminated it.

The next release will use the setting for 'editor' if 'EDITOR' is not
set.

Making -d 3 the default when an arg is provided seems problematic to
me. What if arg is 1:99 which would list 99 notes. Should -d 3 be the
default? If not, how many notes should be the limit? What if only one
note satisfies the path and other filters. Should -d 3 then be the
default? This is too complicated for me.
> ...
>
> read more »

Alexander Wagner

unread,
Dec 1, 2010, 1:30:46 AM12/1/10
to notetaking...@googlegroups.com
Hi Dan,

The datestamp feature is very nice! However, if I edit a note with the
external editor the datestamp is not converted. Would it be possible to
have nts parse the notes for !d and convert the datestamp upon start-up
and each time we return from an external editor. The latter may not be
possible, but instead, perhaps a shortcut key to initiate the
replacement of all !d can be included. This would save re-opening the
edited notes in the gui and saving them again.

Many thanks,
Alex

Dan Graham

unread,
Dec 1, 2010, 9:01:02 AM12/1/10
to Note Taking Simplified
Alex,

I'll think about this.

Meanwhile, maybe your editor is one of the many that have a datestamp
feature that could be used to enter it directly.

-Dan

On Dec 1, 1:30 am, Alexander Wagner

Dan Graham

unread,
Dec 1, 2010, 9:13:11 AM12/1/10
to Note Taking Simplified
Thinking more about this, it occurred to me that post processing
datestamps in files could enter either (1) the time the file was post
processed or (2) the last modification time of the file. Only (2)
would ever correspond to the actual time the note was entered and only
then if adding the note with the datestamp was the last time the file
was modified. This seems unsatisfactory to me.
Reply all
Reply to author
Forward
0 new messages