Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to modify existing artifact's tags, category, add comment. How to chage storage location? #102

Open
benibilme opened this issue Nov 16, 2022 · 3 comments

Comments

@benibilme
Copy link

benibilme commented Nov 16, 2022

Hello,

I have not been able to find a forum or github discussion area, I am asking here. I am sorry to generate noise. I am interested in using this sofware, and testing it now. However I could not find several important features in the documentation. I appreciate if you can provide a feedback. I presume I am missing them.

  1. How can I change, update, delete an existing artifacts category, tags, title, status etc. My expectation was --edit command. However options passed does not change anything. For example;

    kb edit --id AnId -c "newcategory" does not work. Category is not added or updated. How can I change the category for example or even delete it.

 kb edit --help
usage: kb edit [-h] [-i ID] [-t TITLE] [-c CATEGORY] [-g TAGS] [-a AUTHOR] [-s STATUS] [nameid]

positional arguments:
  nameid                Title or ID of the artifact to edit

options:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of the artifact to edit
  -t TITLE, --title TITLE
                        Title to update
  -c CATEGORY, --category CATEGORY
                        Category to update
  -g TAGS, --tags TAGS  Tags to update in the form "tag1;tag2;...;tagN"
  -a AUTHOR, --author AUTHOR
                        Author to update
  -s STATUS, --status STATUS
                        Status to update

The documentation above seems to promise to update the fields, but it does not. It just opens the text file.

It seems a command such as modify is needed to change the attributes of an artifact.

  1. Artifacts seems to be stored at ~/.local/share/kb. How can I change that path to some other location? Is there a configuration file. I have not been able to find an entry in ~/.config /usr/share etc. I have installed the package with yay at arch linux.

  2. I am not sure if understand correctly but I can only add artifacts with title etc. Is is possible to add comments or some description with several sentences. Is there any other option other than --title.

These are basic fundamental questions, maybe they will be good to be added to the README or help of kb. It may be beneficial to create a discussion section for not creating noise in the issues section.

@gnebbia
Copy link
Owner

gnebbia commented Nov 16, 2022

Hej!

Thanks for using kb, let's see if I can help you with your doubts.

  1. The edit command is just used to edit the content so it is not used in that way.
    To update the meta-information of an artifact you should use "update", for example:
kb update --id 3 --title "newtitle" --category "newcategory"

This will update the current artifact with id 3 to title "newtitle" and category "newcategory".

  1. That directory is the recommended default according to GNU standards, unfortunately now it cannot be changed unless you modify the code.

  2. You can add tags to each artifact, I wouldn't use sentences for that but it's up to you. Probably if you really need to use sentences you could just specify them inside the artifacts and then grep them with "kb grep".

For what concerns the documentation... each option is documented with the -h flag.
So for example if you type kb you will be presented with the list of commands with a short explanation.
Now if you need help/documentation on the update command, you can just do:

kb update -h

The same applies for each kb command.

Does that clear things up?

Thanks for the feedback,
we will try to implement a configurable directory for 0.1.8 + add docs on update.

@benibilme
Copy link
Author

benibilme commented Nov 17, 2022

Hello,

Thank you for the feedback. I have completely missed the update command, I guess I must have read without reading glasses. I am really angry with myself. Thank you for pointing it out. That's my bad.

On the other hand, I believe edit subcommand help is just copy paste from update command which misled me. The description of the options are the same as update. Category to update, author to update etc. Edit does not update them. I presume, they are used for selecting the artifact, based on your explanation. I believe the edit --help command output should be updated.

Being able to change the artifacts directory is a need in general. There may special directories which sinks with the cloud systems such as drop box. XDG directory structure is suggestion or convention. I presume, kb artifact directory will grow in size enormously. I would not want that directory be growing in my .local directory. I believe, it would be nice to give the user provide an alternative path. Yes, providing configuration file opens up new complexities, I believe in the long run, the software will be more usable.

Since your aim is creating a knowledge base management system, describing or commenting artifacts is essential. Adding a text file is different from a description. Categories, tags are different than descriptions or comments. They are needed for queries. Comment or description somewhat different. Title yes can be used to some degree, but with the title, I really would like to see the raw artifact name. I believe providing an optional comment or description capability will enhance title. In that case, kb list may display an additional column.

Thank you for the nice work and feedback.

@estribiyo
Copy link

Possible workaround to change location...

  1. Move ~/.local/share/kb to desired location, for example ~/user/NextCloud
  2. Link new location to the old one: ln -s ~/user/NextCloud ~/.local/share/kb

And it's done... all data will be stored in cloud folder (change it to whatever you folder is instead of ~/user/NextCloud)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants