Skip to content

Instantly share code, notes, and snippets.

View tanaikech's full-sized avatar

Kanshi TANAIKE tanaikech

View GitHub Profile
@tanaikech
tanaikech / submit.md
Created December 12, 2024 03:07
Workaround: Export web-published Google Docs as PDFs using Google Apps Script

Workaround: Export web-published Google Docs as PDFs using Google Apps Script

Abstract

This report outlines a Google Apps Script solution for directly exporting web-published Google Docs to PDF. By circumventing limitations in published URLs, the script enables convenient PDF generation without manual intervention.

Introduction

Google Sheets and Google Docs offer the convenient feature of web publishing, providing readily accessible URLs for sharing. Ref

@tanaikech
tanaikech / submit.md
Last active December 5, 2024 01:19
Streamlining Gmail Processing Including Attachment Files Using Gemini with Google Apps Script

Streamlining Gmail Processing Including Attachment Files Using Gemini with Google Apps Script

Abstract

A new library, MimeTypeApp, simplifies using Gmail messages and attachments with the Gemini API for tasks like text analysis. It converts unsupported formats for seamless integration with Google Apps Script and Gemini.

Introduction

@tanaikech
tanaikech / submit.md
Created December 4, 2024 05:52
MimeTypeApp: Flexible MimeType Converter with Google Apps Script

MimeTypeApp: Flexible MimeType Converter with Google Apps Script

Abstract

This is a Google Apps Script library for converting files from various MIME types to a specified target MIME type. The library accepts both file IDs and blobs as input values.

Introduction

@tanaikech
tanaikech / submit.md
Created November 6, 2024 00:20
Exporting Google Sheets Tables as PDFs using Google Apps Script

Exporting Google Sheets Tables as PDFs using Google Apps Script

Description

Recently, I reported on a workaround for effectively working with Google Sheets tables using Google Apps Script: Ref. This approach addressed limitations in directly retrieving table data and ranges within Apps Script. In this follow-up report, I'm excited to provide a sample script that leverages this workaround to export your valuable Google Sheets tables directly as PDF files. This functionality empowers you to easily share and distribute your data in a clear and universally accessible format.

Sample tables on a Google Spreadsheet

@tanaikech
tanaikech / submit.md
Created November 2, 2024 01:15
Workaround: Using Google Sheets Tables with Google Apps Script

Workaround: Using Google Sheets Tables with Google Apps Script

Abstract

Google Sheets' new Tables feature enhances data organization but lacks direct management via Apps Script. This report proposes a workaround solution using Apps Script until native support arrives.

Introduction

@tanaikech
tanaikech / submit.md
Created October 17, 2024 00:08
Unlocking Power: Leverage the Google Docs API Beyond Apps Script's Document Service

Unlocking Power: Leverage the Google Docs API Beyond Apps Script's Document Service

Abstract

Google Apps Script offers Document service for basic document tasks and Google Docs API for advanced control, requiring more technical expertise. This report bridges the gap with sample scripts to unlock the API's potential.

Introduction

@tanaikech
tanaikech / submit.md
Created October 12, 2024 07:13
Place Rows from a Sheet to Multiple Sheets on Google Spreadsheet using New Javascript Methods with Google Apps Script

Place Rows from a Sheet to Multiple Sheets on Google Spreadsheet using New Javascript Methods with Google Apps Script

Abstract

This report showcases a practical application of Google Apps Script, demonstrating how new JavaScript methods can be used to create a script that automatically transfers selected rows between sheets in a Google Sheet.

Introduction

JavaScript, a fundamental pillar of contemporary web development, has experienced a significant rise in popularity due to its versatility and widespread adoption. As JavaScript's influence has expanded, so too has Google Apps Script, a cloud-based scripting language constructed on the V8 JavaScript engine. This evolution has led to the introduction of novel methods and features, thereby expanding the capabilities of developers working within the Google Workspace ecosystem.

@tanaikech
tanaikech / submit.md
Created October 8, 2024 23:57
Improving Gemini's Text Generation Accuracy with Corpus Managed by Google Spreadsheet as RAG

Improving Gemini's Text Generation Accuracy with Corpus Managed by Google Spreadsheet as RAG

Abstract

Gemini excels at text generation with RAG for large datasets, but smaller ones benefit from prompting or data upload. This report explores using Gemini 1.5 Flash/Pro with RAG on medium-sized, Google Spreadsheet-stored datasets for improved accuracy and effectiveness.

Introduction

@tanaikech
tanaikech / submit.md
Last active January 31, 2025 22:07
Pseudo Function Calling for Gemini API Through Prompt Engineering

Pseudo Function Calling for Gemini API Through Prompt Engineering

Abstract

This research explores "pseudo function calling" in Gemini API using prompt engineering with JSON schema, bypassing model dependency limitations.

Introduction

Large Language Models (LLMs) like Gemini and ChatGPT offer powerful functionalities, but their capabilities can be further extended through function calling. This feature allows the LLM to execute pre-defined functions with arguments generated based on the user's prompt. This unlocks a wide range of applications, as demonstrated in these resources (see References).

@tanaikech
tanaikech / submit.md
Created September 25, 2024 06:39
Harnessing Gemini's Power: A Guide to Generating Content from Structured Data

Harnessing Gemini's Power: A Guide to Generating Content from Structured Data

Abstract

This report presents a method to train AI to effectively generate content from smaller, structured datasets using Python. Gemini's token processing capabilities are leveraged to effectively utilize limited data, while techniques for interpreting CSV and JSON formats are explored.

Introduction

In the era of rapidly advancing artificial intelligence (AI), the ability to analyze and leverage large datasets is paramount. While RAG (Retrieval Augmented Generation) environments are often ideal for such tasks, there are scenarios where content generation needs to be achieved with smaller datasets.