Posts

Showing posts with the label files

How to merge PDF files in Ubuntu (14.04)

You can merge PDF files in Ubuntu using pdftk tool: $ pdftk file1.pdf file2.pdf cat output mergedfile.pdf Pretty neat huh?!

Google Drive API - Rename a file

We can use the patch function of Google Drive's Files API to rename a file / folder: def rename_file (service, file_id, new_title):     """Rename a file.     Args:     service: Drive API service instance.     file_id: ID of the file to rename.     new_title: New title for the file.     Returns:     Updated file metadata if successful, None otherwise.     """     try:         file = {'title': new_title}         # Rename the file.         updated_file = service.files().patch(                             fileId=file_id,                             body=file,...