summaryrefslogtreecommitdiff
path: root/python-driveutility.spec
blob: dcfbbd0a7ee5a366df729c5e80f2a3657f76fc79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
%global _empty_manifest_terminate_build 0
Name:		python-DriveUtility
Version:	1.1.18
Release:	1
Summary:	Google Drive tool
License:	MIT
URL:		https://github.com/PeterGabaldon/DriveUtility
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/b2/74/43bc106164ee65f76c9bb5a9972eef002c0960f15c4c77f56d4d3c19ea9d/DriveUtility-1.1.18.tar.gz
BuildArch:	noarch

Requires:	python3-oauth2client
Requires:	python3-httplib2
Requires:	python3-google-api-python-client

%description
# Google Drive Utility
## What is Google Drive Utility?
Google Drive Utility provides an easy way to use Google Drive from command line, tasks such as uploading files/folders, downloading them, moving folders/files. Additionally, using the provided .reg files it can be added to the Windows Context Menu, giving the opportunity of using it anywhere in an very easy and friendly way. It is written in Python 2.7. It is licensed under the MIT license, see LICENSE.

# Installation
## Download and installation
You can download it with Pip:
```
pip install DriveUtilityity
```

# Usage
## Command line utility
Usage:
```
DriveUtil [Args]
```
or:
```
python -m DriveUtility [Args]
```
Available options are:
```
  -h, --help            show this help message and exit
  -u, --upload Path(s) [Path(s) ...]
                        Path of folder or file to upload.
  -s, --specificf Path(s) [Path(s) ...]
                        Path of folder or file to upload to a specific folder.
  -cr, --createf        Creates a folder.
  -re, --remove         Remove access to Drive.
  -l, --list            List Drive files and folders.
  -de, --delete         Delete selected file or folder.
  -g, --get [Path]      Download file or folder. Optionally, you can specify a
                        path to downlaod there.
  -m, --move            Move file or folder.
  -cb, --clean          Clean bin.
  -co, --copy           Copy a file.
  -se, --search         Search by name.
  -aS, --addS           Star a file.
  -rS, --removeS        Remove star from an starred file.
  -sL, --shareLink      Enable share linking and get the share link.
  -dS, --disableShare   Disable link sharing.
  -rn, --rename         Rename item.
```

# Windows Context Menu
## Adding it
The provided python scripts, `addContext.py` and `removeContext.py` add new options to the Context Menu, making DriveUtility more flexible to use. These two scripts must be run with admin rights. You can use:
```
python -m DriveUtility.addContext
```
and
```
python -m DriveUtility.removeContext
```
from an elevetad Windows command prompt.

![Context Menu](https://i.imgur.com/DKaWEFH.gif)

# Examples
`example.py` is a sample script. It will upload the contents of Test folder.

# Contributing
All pull requests and issues are welcome. I'm very thankful for any type of help, improvement or tests.







%package -n python3-DriveUtility
Summary:	Google Drive tool
Provides:	python-DriveUtility
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-DriveUtility
# Google Drive Utility
## What is Google Drive Utility?
Google Drive Utility provides an easy way to use Google Drive from command line, tasks such as uploading files/folders, downloading them, moving folders/files. Additionally, using the provided .reg files it can be added to the Windows Context Menu, giving the opportunity of using it anywhere in an very easy and friendly way. It is written in Python 2.7. It is licensed under the MIT license, see LICENSE.

# Installation
## Download and installation
You can download it with Pip:
```
pip install DriveUtilityity
```

# Usage
## Command line utility
Usage:
```
DriveUtil [Args]
```
or:
```
python -m DriveUtility [Args]
```
Available options are:
```
  -h, --help            show this help message and exit
  -u, --upload Path(s) [Path(s) ...]
                        Path of folder or file to upload.
  -s, --specificf Path(s) [Path(s) ...]
                        Path of folder or file to upload to a specific folder.
  -cr, --createf        Creates a folder.
  -re, --remove         Remove access to Drive.
  -l, --list            List Drive files and folders.
  -de, --delete         Delete selected file or folder.
  -g, --get [Path]      Download file or folder. Optionally, you can specify a
                        path to downlaod there.
  -m, --move            Move file or folder.
  -cb, --clean          Clean bin.
  -co, --copy           Copy a file.
  -se, --search         Search by name.
  -aS, --addS           Star a file.
  -rS, --removeS        Remove star from an starred file.
  -sL, --shareLink      Enable share linking and get the share link.
  -dS, --disableShare   Disable link sharing.
  -rn, --rename         Rename item.
```

# Windows Context Menu
## Adding it
The provided python scripts, `addContext.py` and `removeContext.py` add new options to the Context Menu, making DriveUtility more flexible to use. These two scripts must be run with admin rights. You can use:
```
python -m DriveUtility.addContext
```
and
```
python -m DriveUtility.removeContext
```
from an elevetad Windows command prompt.

![Context Menu](https://i.imgur.com/DKaWEFH.gif)

# Examples
`example.py` is a sample script. It will upload the contents of Test folder.

# Contributing
All pull requests and issues are welcome. I'm very thankful for any type of help, improvement or tests.







%package help
Summary:	Development documents and examples for DriveUtility
Provides:	python3-DriveUtility-doc
%description help
# Google Drive Utility
## What is Google Drive Utility?
Google Drive Utility provides an easy way to use Google Drive from command line, tasks such as uploading files/folders, downloading them, moving folders/files. Additionally, using the provided .reg files it can be added to the Windows Context Menu, giving the opportunity of using it anywhere in an very easy and friendly way. It is written in Python 2.7. It is licensed under the MIT license, see LICENSE.

# Installation
## Download and installation
You can download it with Pip:
```
pip install DriveUtilityity
```

# Usage
## Command line utility
Usage:
```
DriveUtil [Args]
```
or:
```
python -m DriveUtility [Args]
```
Available options are:
```
  -h, --help            show this help message and exit
  -u, --upload Path(s) [Path(s) ...]
                        Path of folder or file to upload.
  -s, --specificf Path(s) [Path(s) ...]
                        Path of folder or file to upload to a specific folder.
  -cr, --createf        Creates a folder.
  -re, --remove         Remove access to Drive.
  -l, --list            List Drive files and folders.
  -de, --delete         Delete selected file or folder.
  -g, --get [Path]      Download file or folder. Optionally, you can specify a
                        path to downlaod there.
  -m, --move            Move file or folder.
  -cb, --clean          Clean bin.
  -co, --copy           Copy a file.
  -se, --search         Search by name.
  -aS, --addS           Star a file.
  -rS, --removeS        Remove star from an starred file.
  -sL, --shareLink      Enable share linking and get the share link.
  -dS, --disableShare   Disable link sharing.
  -rn, --rename         Rename item.
```

# Windows Context Menu
## Adding it
The provided python scripts, `addContext.py` and `removeContext.py` add new options to the Context Menu, making DriveUtility more flexible to use. These two scripts must be run with admin rights. You can use:
```
python -m DriveUtility.addContext
```
and
```
python -m DriveUtility.removeContext
```
from an elevetad Windows command prompt.

![Context Menu](https://i.imgur.com/DKaWEFH.gif)

# Examples
`example.py` is a sample script. It will upload the contents of Test folder.

# Contributing
All pull requests and issues are welcome. I'm very thankful for any type of help, improvement or tests.







%prep
%autosetup -n DriveUtility-1.1.18

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-DriveUtility -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.18-1
- Package Spec generated