gnebbia / kb

A minimalist command line knowledge base manager
GNU General Public License v3.0
3.16k stars 101 forks source link

Permission Issue When Reading Artifact In Editor (Windows) #23

Closed MrADevelopers closed 4 years ago

MrADevelopers commented 4 years ago

I am using windows 8.1 every thing seems to work fine its an excellent work. Just one problem, when i use this command kb view -i 0 -e

it says permission denied error13

err

gnebbia commented 4 years ago

Thanks Sir! Yes I am aware of this issue, we are working toward resolving it! If you find any other issues let me know! Let's keep the issue open until it isn't solved!

MrADevelopers commented 4 years ago

Great! By the way good work.

MrADevelopers commented 4 years ago

I have one more question, is there any way to move .kb file in C://Users/user name/.kb to any other drive or location since if the windows get corrupted for any reason all the data will be lost ?

gnebbia commented 4 years ago

@MrADevelopers Thanks for your appreciation! For what concerns the corruption of data, I have some words about it. 1 - We are working on a synchronization infrastructure that will be git-based, unluckily for this you should wait for version 0.2 2 - At the moment I suggest you frequently do: kb export or if you only want to export raw data: kb export --data So do it frequently and backup, then you can import the package exported by kb export back by doing: kb import 3 - At the moment we decided that the user cannot choose the default position of the kb folder, maybe in the future we could customize the location, but still one would need a configuration file sitting in the home directory.

gnebbia commented 4 years ago

Another note about why I designed the kb export --data. I added this option, since I thought that some user would like to export the raw data organized by categories as an archive, so that you could: 1 - use (or import) this data with other software related to knowledge management 2 - restart from scratch with kb if the database in some way is corrupted, in this case, if you only have the data archive organized by directories you can do this: Let's say you had three categories in kb, hence you will have three directories in the data archive (e.g., default, cheatsheet, theory) now you can import your data back by doing: kb add path/to/default/ --category "default" kb add path/to/cheatsheet/ --category "cheatsheet" kb add path/to/theory/* --category "theory" I hope that is clear!

MrADevelopers commented 4 years ago

Thank you! appreciate your clarifications

yihong0618 commented 4 years ago

Another note about why I designed the kb export --data. I added this option, since I thought that some user would like to export the raw data organized by categories as an archive, so that you could: 1 - use (or import) this data with other software related to knowledge management 2 - restart from scratch with kb if the database in some way is corrupted, in this case, if you only have the data archive organized by directories you can do this: Let's say you had three categories in kb, hence you will have three directories in the data archive (e.g., default, cheatsheet, theory) now you can import your data back by doing: kb add path/to/default/ --category "default" kb add path/to/cheatsheet/ --category "cheatsheet" kb add path/to/theory/* --category "theory" I hope that is clear!

Cool, I used to write an issues blog based on GitHub Actions gitblog--In Chinese, I think I can combine issues and issues comments with your wonderful work -- kb like using Python log

issue label is category and comment is one new kb, when issue or issue comment add, the GitHub action trigger, add it too kb, then export to file add auto commit.

Using that I can auto share my kb on GitHub, and grep in my local cmd.

gnebbia commented 4 years ago

@yihong0618 thanks Sir, and thanks a lot for your valuable help!

MrADevelopers commented 4 years ago

And pls share the installation directory of the project so I can have a loot at the source too.

gnebbia commented 4 years ago

Sorry ? What do you mean by the installation directory of the project ? You mean where artifacts are saved? Look into $HOME/.kb/

MrADevelopers commented 4 years ago

No where the source code of the KB is, that handles all the commands etc.

gnebbia commented 4 years ago

The source code is on github you can get it by doing: git clone https://github.com/gnebbia/kb

MrADevelopers commented 4 years ago

Yeah but i want to know where it sits on my PC

gnebbia commented 4 years ago

Well this depends on your configuration, are you installing it with pip? do you have pyenv? are you using python from the app store or downloaded online? Are you using the git repo? It really depends on how you installed kb.

MrADevelopers commented 4 years ago

i installed it from pip, i installed python from internet (sorry i am not good at python)

gnebbia commented 4 years ago

It also depends on you python version then, I would suggest to use git and github to tinker with code!

gnebbia commented 4 years ago

This bug has been fixed! Update kb with git and everything will work!

yihong0618 commented 4 years ago

Another note about why I designed the kb export --data. I added this option, since I thought that some user would like to export the raw data organized by categories as an archive, so that you could: 1 - use (or import) this data with other software related to knowledge management 2 - restart from scratch with kb if the database in some way is corrupted, in this case, if you only have the data archive organized by directories you can do this: Let's say you had three categories in kb, hence you will have three directories in the data archive (e.g., default, cheatsheet, theory) now you can import your data back by doing: kb add path/to/default/ --category "default" kb add path/to/cheatsheet/ --category "cheatsheet" kb add path/to/theory/* --category "theory" I hope that is clear!

Cool, I used to write an issues blog based on GitHub Actions gitblog--In Chinese, I think I can combine issues and issues comments with your wonderful work -- kb like using Python log

issue label is category and comment is one new kb, when issue or issue comment add, the GitHub action trigger, add it too kb, then export to file add auto commit.

Using that I can auto share my kb on GitHub, and grep in my local cmd.

@gnebbia

Done! I combine the two system~ with GItHub Actions

Thank you for your great work!

image

image

gnebbia commented 4 years ago

That's cool! I am happy to hear that! And again thanks for your contributions and helping me finding and solving bugs!