• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

skilion/onedrive: Free Client for OneDrive on Linux

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

skilion/onedrive

开源软件地址(OpenSource Url):

https://github.com/skilion/onedrive

开源编程语言(OpenSource Language):

D 98.8%

开源软件介绍(OpenSource Introduction):

OneDrive Free Client

A complete tool to interact with OneDrive on Linux. Built following the UNIX philosophy.

Features:

  • State caching
  • Real-Time file monitoring with Inotify
  • Resumable uploads
  • Support OneDrive for Business (part of Office 365)
  • Shared folders (only OneDrive Personal)

What's missing:

  • While local changes are uploaded right away, remote changes are delayed
  • No GUI

Getting Started

Prerequisites

Prerequisites: Ubuntu/Debian

sudo apt install git libcurl4-openssl-dev libsqlite3-dev

# Ubuntu 18+
sudo snap install --classic dmd

# Ubuntu 17 & Debian
sudo wget https://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list
sudo apt-get update --allow-insecure-repositories
sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring
sudo apt-get update && sudo apt-get install dmd-compiler

Prerequisites: Fedora/CentOS

sudo yum install git libcurl-devel sqlite-devel
curl -fsS https://dlang.org/install.sh | bash -s dmd

Prerequisites: Arch Linux

sudo pacman -S git dlang-dmd

Installation

git clone https://github.com/skilion/onedrive.git
cd onedrive
make
sudo make install

Using LDC:

make DC=ldmd2

First run

After installing the application you must run it once from an interactive terminal to authorize it.

onedrive

You will be asked to open a specific link using your web browser where you will have to login into your Microsoft Account and give the application the permission to access your files. After giving the permission, you will be redirected to a blank page. Copy the URI of the blank page into the application.

Uninstall

sudo make uninstall
# delete the application state from your home directory
rm -rf ~/.config/onedrive

Configuration

Configuration is optional. By default all files are downloaded in ~/OneDrive and only hidden files are skipped. If you want to change the defaults, you can copy and edit the included config file into your ~/.config/onedrive directory and edit it:

mkdir -p ~/.config/onedrive
cp ./config ~/.config/onedrive/config
nano ~/.config/onedrive/config

Available options:

  • sync_dir: directory where the files will be synced
  • skip_file: any files or directories that match this pattern will be skipped during sync.

Patterns are case insensitive. * and ? wildcards characters are supported. Use | to separate multiple patterns.

Note: after changing skip_file, you must perform a full synchronization by executing onedrive --resync

Selective sync

Selective sync allows you to sync only specific files and directories. To enable selective sync create a file named sync_list in ~/.config/onedrive. Each line of the file represents a relative path from your sync_dir. All files and directories not matching any line of the file will be skipped during all operations. Here is an example of sync_list:

Backup
Documents/latest_report.docx
Work/ProjectX
notes.txt

Note: after changing the sync list, you must perform a full synchronization by executing onedrive --resync

Shared folders

Folders shared with you can be synced by adding them to your OneDrive through the web interface. Go to the Shared files list, right click on the folder you want to sync and then click on "Add to my OneDrive".

OneDrive service

If you want to sync your files automatically, enable and start the systemd service:

systemctl --user enable onedrive
systemctl --user start onedrive

To see the logs run:

journalctl --user-unit onedrive -f

Note: systemd is supported on Ubuntu 15.04 onward

Using multiple accounts

You can run multiple instances of the application specifying a different config directory in order to handle multiple OneDrive accounts. To do this you can use the --confdir parameter. Example:

onedrive --monitor --confdir="~/.config/onedrivePersonal" &
onedrive --monitor --confdir="~/.config/onedriveWork" &

--monitor keeps the application running and monitoring for changes

& puts the application in background and leaves the terminal interactive

Extra

Reporting issues

If you encounter any bugs you can report them here on Github. Before filing an issue be sure to:

  1. Check the version of the application you are using onedrive --version
  2. Run the application in verbose mode onedrive --verbose
  3. Have the log of the error (preferably uploaded on an external website such as pastebin)
  4. Collect any information that you may think it is relevant to the error
    • The steps to trigger the error
    • What have you tried to do to solve it

All available commands:

Usage: onedrive [OPTION]...

no option        Sync and exit
       --confdir Set the directory used to store the configuration files
-d    --download Only download remote changes
        --logout Logout the current user
-m     --monitor Keep monitoring for local and remote changes
   --print-token Print the access token, useful for debugging
        --resync Forget the last saved state, perform a full sync
       --syncdir Set the directory used to sync the files
-v     --verbose Print more details, useful for debugging
       --version Print the version and exit
-h        --help This help information.

File name limitations

The files and directories in the synchronization directory must follow the Windows naming conventions. The application will crash for example if you have two files with the same name but different case. This is expected behavior and won't be fixed.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
webtorrent/webtorrent-desktop: ❤️ Streaming torrent app for Mac, Windows, and ...发布时间:2022-08-15
下一篇:
jeffacode/Learning-Linux发布时间:2022-08-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap