Skip to content

rm_gcomments feature #25

@ClaudioZandonella

Description

@ClaudioZandonella

I document here an "experimental" feature introduced.

Background

When collaborating online on a document, from time to time, you may need to download and compile the document for a quick check without losing suggested edits and tracked changes. Before downloading, however, you have to accept all suggested edits. Taking advantage of the “Undo” option available in Google Docs, it is possible to download the current document version at any time during the workflow without the need to accept all suggested edits permanently :

“Tools > Review suggested edits > Accept all” and, after the download, press “Undo” to restore the document to its previous state

However, this can not be done with the comments. You can not remove and restore the comments in google docs.

Issue

When downloading the document for a quick check you will download all google comments in the document as well. Therefore, before compiling the document, comments have to be removed manually. This is a repetitive, time-consuming, process.

Solution

To overcome this issue, we introduced an optional (experimental) argument to trackdown::download_file(). By specifying rm_gcomments = TRUE (default is FALSE), google comments will be automatically removed from the document.

Technical Info

Google comments are listed at the bottom of the file. Comments are of type "[a]my comment". Alphabetic indexes between square brackets (i.e., [a], [b], ... , [aa], [ab], etc.) are used as tags to identify the comment and indicate comments' position in the text.

The internal function remove_google_comments() removes comments and comments' tags. The process is conservative. If there are any issues in the comments' identification, the specific comment is not removed.

For example, it the tag "[a]" appears multiple times in the document as actual user's text (and not only as a comment tag) tags "[a]" and relative comment are not removed

Reference commit with introduced changes: 28b5224

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions