Skip to content

Commit

Permalink
Updated to v1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaikech committed Dec 30, 2018
1 parent ade40ad commit d2f720e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ggsrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func main() {
app.Author = "Tanaike [ https://github.com/tanaikech/ggsrun ] "
app.Email = "[email protected]"
app.Usage = "This is a CLI application for managing Google Drive and Google Apps Script (GAS)."
app.Version = "1.7.0"
app.Version = "1.7.1"
app.Commands = []cli.Command{
{
Name: "exe1",
Expand Down
3 changes: 1 addition & 2 deletions help/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,6 @@ On the other hand, what Service Account can do with ggsrun is as follows.
Basically, when you use Service Account, please add an option of ``-sa credentials.json``. ``-sa`` and ``credentials.json`` are the option for using Service Account and JSON file including credentials retrieved by creating Service Account, respectively.

#### 1. Get file list of Google Drive

~~~bash
$ ggsrun ls -sa credentials.json -s
~~~
Expand All @@ -1541,7 +1540,7 @@ or
$ ggsrun d -sa credentials.json -i root -l
~~~

By this, the metadata of all files in Google Drive of Service Account can be retrieved.
**By this, the metadata of all files and folders in Google Drive of Service Account can be retrieved.**


#### 2. Download files
Expand Down
6 changes: 6 additions & 0 deletions help/UpdateHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ ggsrun
1. [**ggsrun got to be able to be used by not only OAuth2, but also Service Account. By this, using ggsrun, Google Drive for Service Account got to be able to be managed.**](https://github.com/tanaikech/ggsrun/blob/master/help/README.md#useserviceaccount)
1. Some modifications.

<a name="v171"></a>

* v1.7.1 (December 30, 2018)
1. A bug was removed.
- When a project is downloaded and zipped, there was a case that "createdTime" and "modifiedTime" of the project cannot be retrieved by Apps Script API. This was modified.

**You can read "How to install" at [here](https://github.com/tanaikech/ggsrun/blob/master/README.md#howtoinstall).**


Expand Down
30 changes: 20 additions & 10 deletions utl/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,29 @@ func (f *zipFileHeads) doFilesZip(comment string) *bytes.Buffer {
// zipComment : Add information of project to zip file as a comment.
func (p *FileInf) zipComment() string {
commentStruct := struct {
Name string `json:"projectName"`
ID string `json:"fileId"`
CreatedTime string `json:"cretedTime"`
ModifiedTime string `json:"modifiedTime"`
OwnerName string `json:"ownerName"`
OwnerEmail string `json:"ownerEmail"`
LastModifyingUserName string `json:"lastModifyingUserName"`
LastModifyingUserEmail string `json:"lastModifyingUserEmail"`
Name string `json:"projectName,omitempty"`
ID string `json:"fileId,omitempty"`
CreatedTime string `json:"cretedTime,omitempty"`
ModifiedTime string `json:"modifiedTime,omitempty"`
OwnerName string `json:"ownerName,omitempty"`
OwnerEmail string `json:"ownerEmail,omitempty"`
LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
LastModifyingUserEmail string `json:"lastModifyingUserEmail,omitempty"`
}{
p.FileName,
p.FileID,
p.CreatedTime.In(time.Local).Format("20060102 15:04:05 MST"),
p.ModifiedTime.In(time.Local).Format("20060102 15:04:05 MST"),
func() string {
if p.CreatedTime != nil {
return p.CreatedTime.In(time.Local).Format("20060102 15:04:05 MST")
}
return ""
}(),
func() string {
if p.CreatedTime != nil {
return p.ModifiedTime.In(time.Local).Format("20060102 15:04:05 MST")
}
return ""
}(),
p.Owners[0].Name,
p.Owners[0].Email,
p.LastModifyingUser.Name,
Expand Down

0 comments on commit d2f720e

Please sign in to comment.