vonshednob / pter

Manage your todo.txt in a commandline user interface (TUI)
https://vonshednob.cc/pter/
MIT License
102 stars 6 forks source link

What does "N" (edit note) do? #60

Closed ironhak closed 5 months ago

ironhak commented 5 months ago

When I press "N", edit note, it say "no notes directory defined", what is that?

vonshednob commented 5 months ago

With pter you can attach notes to tasks, i.e more complex files with additional information.

To do that you would add a note:extra_file.txt to the task.

However, you have to tell pter where you want your notes stored! To do that, either create a configuration file (by default expected in $HOME/.config/pter/pter.conf) with this content:

    [Genera]
    notes = path/to/your/notes

You may also provide multiple paths to notes, like this:

    [General]
    notes =
        first/path/to/notes/
        other/notes/location

You can find more information about this in the help on notes or here, about the configuration file.

Hope this helps!

ironhak commented 5 months ago

Sorry but how do I open/see content of a note?

vonshednob commented 5 months ago

I mean, usually you'd use your editor, i.e. whatever you have set up in the environment variables $EDITOR or $VISUAL to open the note for editing. You can also use the configuration option in [General] called editor to set the editor of your choice. If none of these are set, pter will try to use the editor nano.

If you however just want to view a note, you'll have to be a bit patient. With issue #42 fixed, the next version of pter will have a separate command to view notes, too.

Not sure I was actually able to answer your question…

ironhak commented 5 months ago

I mean, usually you'd use your editor, i.e. whatever you have set up in the environment variables $EDITOR or $VISUAL to open the note for editing. You can also use the configuration option in [General] called editor to set the editor of your choice. If none of these are set, pter will try to use the editor nano.

If you however just want to view a note, you'll have to be a bit patient. With issue #42 fixed, the next version of pter will have a separate command to view notes, too.

Not sure I was actually able to answer your question…

Hello, thank's! I mean, if I attached like a png image as a note, how could I view it?

vonshednob commented 5 months ago

Oh! That's interesting, I had never consideren having just a picture as a note. I'm using markdown files as the notes; these might have pictures then.

My immediate reaction would be to set up xdg-open (or rifle, if you use ranger) as the note editor and then set up programs that you want the respective files to be opened in. With the next version of pter, I'd probably use a separate script pter_note_editor.sh that does the file type based dispatching of edit actions, and use xdg-open as the note viewer.

Let me know how you solve this, it's an interesting use case!

ironhak commented 5 months ago

Thank's for your kind availability to answer my questions. Will let you know!