Giter VIP home page Giter VIP logo

dabbu-knowledge-platform / cli Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 2.61 MB

A CLI that enables you to access any of your personal information (Gmail, Google Drive, OneDrive, your hard drive, ...) as simple files and folders

Home Page: https://dabbu-knowledge-platform.github.io/

License: GNU General Public License v3.0

Shell 9.65% TypeScript 83.59% Roff 6.76%
cli dabbu dabbu-api dabbu-cli dabbu-server file-manager filestorage filesystem gmail google-drive hard-drive one-drive

cli's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar gamemaker1 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gamemaker1

cli's Issues

[FEAT]: Export/Import CLI configuration

Is your feature request related to a problem? Please describe.
While moving from one device to another, you need to setup the CLI all over again.

Describe the solution you'd like
Add commands to export and import (during setup) CLI configuration to migrate from one device to another.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[BUG]: Logs contain sensitive information

Describe the bug
Log files contain lots of unmasked sensitive information

To Reproduce
Steps to reproduce the behavior:

  1. Use the CLI to make any list/read/delete/copy request
  2. All logs in the log files are verbose

Expected behavior
Sensitive info should be masked, even if the logs are stored only locally

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Dabbu CLI Version: 3.1.0
  • OS Version: Arch Linux x64

Additional context
Add any other context about the problem here.

[BUG]: Files with a ':' in their name are interpreted to be drives

Describe the bug
When downloading/copying a file with a : in its name, the CLI assumes the : is in fact a drive separator. This only happens if the drive name is not already specified.

To Reproduce
Steps to reproduce the behavior:

  1. Rename a file to contain a : in its name (Google Drive/Gmail thread)
  2. Try downloading the file using the read command
  3. See error (drive not found)

Expected behavior
The file name with a ':' is downloaded without interpreting it as a drive

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Dabbu CLI Version: Affects all up to v3.2.0
  • OS Version: Affects Windows/MacOS/Linux

[FEAT]: Default client ID and client secret for each provider

Is your feature request related to a problem? Please describe.
When creating a new drive for a different Google/Microsoft/etc account, I need to enter the client ID - client secret again. This is a bit frustrating, especially if I have not saved them somewhere when I generated them.

Describe the solution you'd like
Allow the user to set a default client ID - client secret pair per provider which is used when creating a new drive with that provider. These default client IDs and client secrets are set automatically when you create a new drive with that provider for the first time. In the future, the prompts for client ID and client secret will default to these values if no client ID and client secret is specified. These fields can be changed using the proposed config command (see #64).

Describe alternatives you've considered

  • Using the client ID - client secret pair from the first drive of the same provider you find in the config file (possible, but inflexible: the user may want to use a different client ID - client secret pair)
  • Making the user set the client ID and secret for each provider while setting up, before creating any drives (inconvenient)

Additional context
Also related: (#14)

[TESTS]: Add unit tests for all commands

Describe the issue
No tests for any part of CLI

How could it be made better?
Add unit tests for all commands.

Screenshots
If applicable, add screenshots to help explain the benefits of your changes.

Additional context
All commands export a run function that accepts parameters. Use that to test it. A provision must be added for defining a test configuration too, since commands directly access the configuration file while running

[FEAT]: Add a desktop entry equivalent for MacOS packages

Is your feature request related to a problem? Please describe.
There is currently no way to access Dabbu CLI as an app on MacOS, it can only be accessed through the terminal as a command.

Describe the solution you'd like
Adding the equivalent of a .desktop file to the MacOS .pkg file.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[FEAT]: Use PKCE OAuth flow

Is your feature request related to a problem? Please describe.

Currently to setup an account, you need to create an app with your own Google/Microsoft account and get the client ID, secret, then authorize the app. It would be less of a hassle for users if all they needed to do was to authorize the app.

Describe the solution you'd like

Use PKCE OAuth flow (supported by Google, Microsoft, Dropbox, etc) to get an access token.

Describe alternatives you've considered

The less secure alternative is embedding the client secret into the CLI itself.

Additional context

Add any other context or screenshots about the feature request here.

[BUG]: Last modified time for all files/folders on hard drive is shown as 1/1/1970

Describe the bug
The last modified time (shown in the output of the list command) is always 1/1/1970 for all files on the hard drive

To Reproduce
Steps to reproduce the behavior:

  1. Create a drive with the provider set to hard drive
  2. Run the list command, i.e.: ls
  3. The last modified time is 1/1/1970 for all files/folders

Expected behavior
The last modified time should be the last modified time (last time I cd'ed/renamed/moved that folder OR last time I viewed/edited/moved that file)

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Dabbu CLI Version: 3.2.0-beta.0 (all versions from 3.0.0 to current)
  • OS Version: Arch Linux (latest)

Additional context
Seems the CLI tries to query for an invalid/undefined value on the file object returned by the fs-extra library, and thus while formatting the date, falls back to the default date (1/1/1970)

[FEAT]: Sync data from one drive to another

Is your feature request related to a problem? Please describe.
When copying data from Google Drive to my Hard Drive, it is always frustrating to see existing files skipped when in fact I want them overwritten, based on what their last modified time is.

Describe the solution you'd like
Implement a new sync command, that takes all files in the current/specified folder and then 'syncs' them to the specified location. It would list all files in the current folder and the destination folder, compare their last modified times (if files with the same name exist) and if the file has been updated, copy the new file over to the destination.

Describe alternatives you've considered
An alternative would be to add this functionality to the cp or mv command. Allow users to mention whether they would like files to be overwritten. The only drawback is, this feels a little unintuitive for a sync purpose and does not take into account last modified time, so it's a bit inefficient and more of an overwrite flag.

Additional context
Add any other context or screenshots about the feature request here.

[FEAT]: Add command to change server URL, delete drives and clear history

Is your feature request related to a problem? Please describe.
When running the server on my machine, the server keeps using a different port number every time. It would be easy for me to change the server URL using a command instead of editing the config file manually.

Describe the solution you'd like
Add a config command that allows you to edit the server URL, delete drives and delete command history. Example usage:

$ config set serverUrl "http://localhost:23983"
$ config del history
$ config del drives.c

[CODE]: Rewrite and re-add knowledge drive

Describe the issue
The knowledge drive was disabled in v3.0.0 pending a Typescript rewrite.

How could it be made better?
Needs to be re-written and added back. This issue serves as a progress tracker for this.

[BUG]: Have to re-create knowledge drive to see changes to files

Describe the bug
When any files change on a drive, and I go back to the knowledge drive, the topics/people/places do not update.

To Reproduce
Steps to reproduce the behavior:

  1. Create a knowledge drive and index at least one drive (any)
  2. Change a file on the drive you indexed (make sure at least one new topic is added, in my case I had rewritten a bit of the document)
  3. Go back to the knowledge drive. You will see that the new topic does not appear.

Expected behavior
The knowledge drive should update the files periodically and have a command to manually re-index all files.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Dabbu Version: 2.5.2
  • OS Version: Manjaro Cinnamon 20 x64

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.