Skip to content

johndpope/google_docs_management

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

How to use

# After downloading client_id.json...
$ bundle install --path vendor/bundle
$ bundle exec ruby read_files.rb #{FILE_ID}

Comments APIの問題:コメントした位置が特定できない

  • Webから作ったコメントには,anchorとしてkix IDが割り振られる.GET時に得られる Comment # anchorkix.*********** が入っている.(APIドキュメントと矛盾)

    • このanchorから,コメントをつけたハイライト箇所の前後の文を取得することができないのが問題.前後の文の手掛かりはcontentしかない.
  • いっぽうで,API経由で作る際に,anchorとしてJSONを入れてcreateする.すると,GET時に得られる Comment # anchor は JSONが入っている.定義されていないキーもそのまま見えている.

    • POST https://www.googleapis.com/drive/v3/files/fileId/comments で,下記のようなリクエストを送ると,コメントは作成されるものの,狙った箇所にハイライトされない:
{
  "content": "api content json ver 6",
  "anchor": "{\"r\":6,\"a\":[{\"line\":{\"n\":1,\"l\":1, \"ml\": 1, \"description\":\"revision 6 line 1 - 1\"}}]}",
  "quotedFileContent": {
    "value": "123456789",
    "mimeType": "text/html"
  }
}

今後

About

Manage google docs comments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%