Skip to content

techstreams/TSDynamicUrls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TSDynamicUrls

If you enjoy my Google Workspace Apps Script work, please consider buying me a cup of coffee!


TSDynamicUrls is an Apps Script powered dynamic URL generator for Google Docs, Sheets, Slides, Drawings & Forms which assists document creators and consumers in leveraging the URL power of Google documents. πŸ’₯

See the following blog posts for more information and getting started guides:

TSDynamicUrls is intended for use within a G Suite for Business or G Suite for Education domain.



Supported Formats & Options

TSDynamicUrls supports the Google document files types/formats and Google Sheets PDF options outlined in the tables below.


TSDynamicUrls Supported Google Document File Types & Formats - *See below for more on sharing Google Forms.

FORMAT DOCS SHEETS SLIDES DRAWINGS FORMS
Preview βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
Copy βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ *
Copy w/ Comments βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βž–
Template βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ *
MobileBasic βœ”οΈ βž– βž– βž– βž–
PDF (Portable Document Format) βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βž–
JPEG (Joint Photographic Experts Group Image) βž– βž– βž– βœ”οΈ βž–
PNG (Portable Graphics Format Image) βž– βž– βž– βœ”οΈ βž–
PNG (Portable Graphics Format Image) - Individual Slide Only βž– βž– βœ”οΈ βž– βž–
SVG (Scalable Vector Graphics Image) βž– βž– βž– βœ”οΈ βž–
RTF (Rich Text Format) βœ”οΈ βž– βž– βž– βž–
TXT (Plain Text) βœ”οΈ βž– βœ”οΈ βž– βž–
HTML (Web Page, Zipped) βœ”οΈ βœ”οΈ βž– βž– βž–
DOCX (Microsoft Word) βœ”οΈ βž– βž– βž– βž–
ODT (OpenDocument Document) βœ”οΈ βž– βž– βž– βž–
EPUB (EPUB Publication) βœ”οΈ βž– βž– βž– βž–
XLSX (Microsoft Excel) βž– βœ”οΈ βž– βž– βž–
ODS (OpenDocument Spreadsheet) βž– βœ”οΈ βž– βž– βž–
CSV (Comma-separated values) - Individual Sheet Only βž– βœ”οΈ βž– βž– βž–
TSV (Tab-separated values) - Individual Sheet Only βž– βœ”οΈ βž– βž– βž–
PPTX (Microsoft PowerPoint) βž– βž– βœ”οΈ βž– βž–
ODP (OpenDocument Presentation) βž– βž– βœ”οΈ βž– βž–

TSDynamicUrls Supported Google Sheets PDF Options

GOOGLE SHEETS PDF OPTIONS
Size (Letter, Tabloid, Legal, Statement, Executive, Folio, A3, A4, A5, B4, B5) βœ”οΈ
Orientation (Portrait, Landscape) βœ”οΈ
Scale (Normal 100%, Fit to Width, Fit to Height, Fit to Page) βœ”οΈ
Page Order (Down, then over; Over, then down) βœ”οΈ
Horizontal Alignment (Left, Center, Right) βœ”οΈ
Vertical Alignment (Top, Middle, Bottom) βœ”οΈ
Repeat Frozen Rows βœ”οΈ
Repeat Frozen Columns βœ”οΈ
Show Gridlines βœ”οΈ
Show Spreadsheet Title βœ”οΈ
Show Sheet Names βœ”οΈ
Show Page Numbers βœ”οΈ
Show Notes βœ”οΈ
Custom Margins (Top, Bottom, Left, Right) βœ”οΈ
All Sheets / Single Sheet βœ”οΈ
Named Range (Single Sheet) βœ”οΈ
Custom Range (Single Sheet) βœ”οΈ


Share Google Forms With View Only Access

See this guide for more on sharing Google Forms. Script below.


function share() {
 
    var formId = "<FORM FILE ID>";
    var file = DriveApp.getFileById(formId);

    file.setSharing(
      DriveApp.Access.ANYONE_WITH_LINK, 
      DriveApp.Permission.VIEW
    );
  
}

Change DriveApp.Access to desired access level.

ACCESS LEVEL DESCRIPTION
ANYONE Anyone on the Internet can find and access. No sign-in required.
ANYONE_WITH_LINK Anyone who has the link can access it. No sign-in required.
DOMAIN People in your G Suite domain can find and access it. Sign-in required.
DOMAIN_WITH_LINK People in your G Suite domain who have the link can access it. Sign-in required.
PRIVATE Only people explicitly granted permission can access. Sign-in required.


FAQ

How do I ask general questions about TSDynamicUrls? For general questions, submit an issue through the issue tracker.

How do I submit bug reports for TSDynamicUrls For bug reports, fork this repository, create a test which demonstrates the problem following the procedures outlined in the "Tests" section below and submit a pull request. If possible, please submit a solution along with the pull request.

Tests

TSDynamicUrls for Google Forms unit tests can be found in form/tests folder.

To perform TSDynamicUrls for Google Forms unit tests:

  • Add the appropriate test file from the form/tests folder to the TSDynamicUrls form script editor. IMPORTANT: Each test is configured as a web app so only install one test at a time to avoid conflicts.

  • Install QUnit for Google Apps Script by adding the project library (see the project documentation for proper install instructions).

  • Deploy the script as a web app (execute script as self).

  • Set the desired unit test configuration entry in the testConfig object to true (see each file for information on where to modify these values to enable tests). NOTE: Some tests can take longer to run so best to run them individually.

  • Access the deployed web app for test results.


Change Log

  • 2021-03-19 - Added /mobilebasic option for Google Docs. To test:
    • Make a copy of this Google Form.
    • Add a MobileBasic option to the Google Docs URL Modification Type? section.
    • Replace the Code.gs in the copied form.

License

TSDynamicUrls License

Β© Laura Taylor (github.com/techstreams). Licensed under an MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.