6

GitHub - jalada/gdrive-search: A TUI to quickly find files in your Google Drive

 2 years ago
source link: https://github.com/jalada/gdrive-search
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

gdrive-search

Warning: I used this to learn Rust. It might be the worst Rust ever. Feedback to help me learn is very welcome!

Fifty percent learning Rust, fifty percent building a CLI to very quickly search & access files in your Google Drive.

On my Mac I had the Google Drive desktop app, and an Alfred workflow to use that synchronised filesystem to quickly search & open Drive files. But I haven't found an equivalent super-fast autocompleting search & open for Linux so I decided to build one.

What does it look like?

Hitting enter would then open in your browser

What works?

  • Sign in with Google Drive (if you follow setup below).
  • Sync files & folders (currently fetches incrementally, every 5 minutes) and save to file.
  • Interface for searching for file/folders.
  • Open chosen file/folder in your web browser.

How do I get it?

Download a release from GitHub if there is one for your platform.

Or if you have Rust installed you can download and compile it from Cargo:

$ cargo install gdrive-search

Google Drive API application setup

This dance will be familiar if you've used any other open source tools that use the Google Drive API.

  • Create a new project

  • Enable the Google Drive API for your project

  • Setup oauth consent screen

  • Create a new oauth client ID

  • Download the JSON provided and put it in the configuration directory. This varies depending on operating system:

    Platform Value Example Linux $XDG_CONFIG_HOME or $HOME/.config/gdrive-search/clientsecret.json /home/alice/.config/gdrive-search/clientsecret.json macOS $HOME/Library/Preferences/gdrive-search/clientsecret.json /Users/Alice/Library/Preferences/gdrive-search/clientsecret.json Windows {FOLDERID_RoamingAppData}\gdrive-search\clientsecret.json C:\Users\Alice\AppData\Roaming\gdrive-search\clientsecret.json

Roadmap

  • Some indication of what type of file/folder each entry is.
  • Can we fetch in the background whilst skim loads to make it even faster?
  • A way of resetting the configuration.
  • Better error handling if config files are in an invalid state.
  • Multi-account support.
  • A way to force a fetch from scratch.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK