AutoFetcher-IG-Stories-to-GDrive

A simple tool to save IG Stories of any user to your Google Drive with just Google Sheets and Apps Script

AGPL-3.0 License

Stars
101
AutoFetcher-IG-Stories-to-GDrive - lib-v10 Latest Release

Published by chriskyfung 8 months ago

What's Changed

๐Ÿ› Bug Fixes

  • Standardized log datetime format (#80)

    • Enhanced the insertNewLog function in logger.js to receive a JavaScript
      Date object for the datetime parameter instead of a string.
    • Retrieve the time zone from the spreadsheet's locate setting.
    • Transformed the datetime parameter to a datetime string in the format of
      "yyyy-MM-dd HH:mm:ss" using the Utilities.formatDate() method.
    • Adjusted the fetcher.js file to pass the date and time as a Date object
      when calling the insertNewLog function.
  • Resolved the "No item with the given ID could be found" error (#112)

    • Enclosed the DriveApp.getFileById method call in a try-catch block in
      logger.js.
    • Included error logging in the catch block if an exception is thrown.

โฌ† Dependencies

  • Updated:
    • jekyll (3.9.0 โ†’ 3.9.5)
    • nokogiri (1.16.0 โ†’ 1.16.2) in /docs (#96)
    • apps-script-oauth2 (72d4dbc โ†’ 6ae908a) (#101)
    • eslint-plugin-googleappsscript (1.0.4 โ†’ 1.0.5) (#106)
    • @babel/preset-env (7.23.7 โ†’ 7.24.0) (#107)
    • @rollup/plugin-multi-entry (6.0.0 โ†’ 6.0.1) (#108)
    • eslint (8.34.0 โ†’ 8.57.0) (#109)
    • rollup (3.15.0 โ†’ 4.12.0) (#110)

๐Ÿ“ Documentation

  • Corrected the permalink URLs of "Release Notes" and "Advanced Configurations"
    pages.

  • Updated API endpoint URLs for status badges.

  • Enhanced formatting of H2 headers in release notes:

    • Eliminated build numbers from H2 headers.
    • Enclosed release dates with parentheses.
  • Refined and styled the changelog.

๐Ÿ’š CI/CD Integration

  • Implemented automated version updates via Dependabot.
  • Upgraded github/codeql-action (1 โ†’ 3) and actions/checkout (2 โ†’ 4) in
    codeql-analysis.yml

Full Changelog: https://github.com/chriskyfung/AutoFetcher-IG-Stories-to-GDrive/compare/lib-v9...lib-v10

AutoFetcher-IG-Stories-to-GDrive - Build240205a (Library V9)

Published by chriskyfung 9 months ago

What's Changed

โœจ New Features

  • Add custom menu and menu items to Google Sheets

  • Allow moving downloaded files to other Google Drive folder via Google Sheet

  • Allow logging HTTP status code and headers from the Instagram API response

  • Add new error codes to identify if the API request returns response in HTML instead of JSON:

    • 0xf3: Include not-logged-in in the HTML content
    • 0xf4: Other HTML responses
  • Add the dist/instance/code.js file for developers to deploy a Google Sheet project with a standalone script

๐Ÿ› Bug Fixes

  • Fix TypeError: Cannot read properties of undefined (reading 'split') #82. Validate the object type before using the String.Split method
  • Fix issue in deleting row without file name #90. Skip the row with missing data when deleting selected log entries
  • Fix blank spots in "Saved Filename" column #84. Skip log entry when download fails
  • Fix Error: Address unavailable:... (code: 0xf1) #86. Continue to process the next Instagram user instead of terminating the script execution immediately

โ™ป Refactors

  • Use npx clasp to simplify the npm scripts in the package.json file
  • Unnested if-else statements inside the fetch() function in fetcher.js
  • Modularize the fetch() function with a new utility function called getFileDetails() located in the utils.js file
  • Renamed the html parameter to data inside the tryGetStories() function

๐Ÿ“ฆ Packaging Updates

  • Add [email protected], @babel/[email protected], [email protected], [email protected] as development dependencies for developing unit tests
  • Add Jest extension setting for VS Code
  • Add npm test script in package.json to run jest with a custom configuration file in jest.config.js
  • Exclude unit tests from being bundled by rollup
  • Update to print the copyright notice with the current year when being bundle by rollup
  • Pin Jekyll version to 3.9.3 and add webrick gem to the docs/_config.yml file
  • Add Front Matter CMS for VS Code to improve Jekyll documentation editing

๐Ÿ“ Documentation

  • Rename the LICENSE.md to LICENSE.txt file
  • Replace SVG badges with dynamic JSON badges in the README and docs/index.md files #95
  • Reword the README file to make more concise and readable
  • Split the sections for Advanced Configurations and Release Notes to new web pages
  • Style and reword the Jekyll site files in the docs directory to make GitHub project pages more appealing, informative and readable
  • Add new screenshots and demo video to the GitHub project pages' landing page
  • Apply the Google Documentation Guide recommendation to limit lines to 80 characters where possible in the README file for helping newcomers to configure the clasp
  • Update the CHANGELOG.md file

๐Ÿงช Unit Test

  • Add the utils.test.js file, which contains a test suite for the getFileDetails() function in utils.js, in the test folder

Full Changelog: https://github.com/chriskyfung/AutoFetcher-IG-Stories-to-GDrive/compare/build230216a...build240205a

AutoFetcher-IG-Stories-to-GDrive - 4.3.0-alpha

Published by chriskyfung 9 months ago

AutoFetcher-IG-Stories-to-GDrive - Build 2023.02.16 (Library V8)

Published by chriskyfung over 1 year ago

AutoFetcher-IG-Stories-to-GDrive - Build 2023.02.14 (Library V7)

Published by chriskyfung over 1 year ago

AutoFetcher-IG-Stories-to-GDrive - Build 2022.09.04a (Library V5)

Published by chriskyfung about 2 years ago

AutoFetcher-IG-Stories-to-GDrive - Build 2022.08.23a (Library V4)

Published by chriskyfung about 2 years ago

What's Changed

Full Changelog: https://github.com/chriskyfung/AutoFetcher-IG-Stories-to-GDrive/compare/build2206b...build220823a

AutoFetcher-IG-Stories-to-GDrive - Build 2022.06.05 (Library V3)

Published by chriskyfung over 2 years ago

AutoFetcher-IG-Stories-to-GDrive - Build 2021.12.07 (Library V2)

Published by chriskyfung almost 3 years ago

What's Changed

  • New Features to Log Sheet by @chriskyfung in https://github.com/chriskyfung/AutoFetcher-IG-Stories-to-GDrive/pull/22

    • Save the filename of downloaded files in Column E on log sheet page.

    • Show the thumbnail preview and open the file on Drive by hovering and clicking on a hyperlinked filename.

      Thumbnail preview shown while hovering a saved filename in Column E on log sheet page

    • Delete multiple items and their corresponding files from Drive by selecting the checkboxes in Column F and then clicking on "Delete Selected" of log sheet page.

      Delete selected items from spreadsheet

Full Changelog: https://github.com/chriskyfung/AutoFetcher-IG-Stories-to-GDrive/compare/build2111a...build2112a

โ›ฝ How To Add The New Features To Your Existing Google Sheet File

To use the new version in your existing Google Sheet file, you need to update it by:

  • making a new copy of our Google Sheet template, or

  • following the below steps to manually update your Google Sheet file.

    1. Go to Logs sheet, add Saved Filename and Select to the cells E1 and F1 as the column headings, respectively.

    2. Select Insert > Drawing from the main menu.

    3. In the Drawing dialog, create a button-like shape with adding the text Delete Selected on it. Then, click Save and Close button.

    4. Move and scale the button drawing it to appropriate size and position.

    5. Select Extensions > Apps Script from the main menu to open the Apps Script Editor.

    6. Double-click IGStoriesToGDrive under the Libraries section in the left pane.

    7. Change the Version to 2 from the dropdown (as the picture below). Then, click Save.

      IGSToriesToGDrive library settings

    8. Add the following code to your Google Sheet's Apps Script:

      function deleteSelected() {
        const IGSF = IGStoriesToGDrive.getInstance();
        IGSF.deleteSelected();
      }
      
    9. Click the Save project icon to save the change.

    10. Go back to your Google Sheet file, right-click the button drawing and then select the three-dots ( โ‹ฎ ) icon > Assign script.

    11. Enter deleteSelected (as the picture below). Then, click OK to close the dialog.

      What script do you want to assign?

    12. Test the script by clicking the Delete Selected button. You should see a prompt like this:

      Are you sure you want to delete these 0 items and their files from your Drive?

    13. Click No to cancel running the script.

AutoFetcher-IG-Stories-to-GDrive - Build 2021.11.11 Integrate Google Sheet (Library V1)

Published by chriskyfung almost 3 years ago

๐ŸŒŸ๐Ÿš€ MAJOR UPGRADE

Integration of Google Sheet was made to provide a user-friendly GUI for configurations and loggings. The new version allows you to set up your subscriptions and user settings easily and systematically, rather than hard coding them in the Apps Script. Logs will also store in the same Google Sheet file instead of saving separately in multiple Google Doc files.

What's Changed

Full Changelog: https://github.com/chriskyfung/AutoFetcher-IG-Stories-to-GDrive/compare/build2109a...build2111a

AutoFetcher-IG-Stories-to-GDrive - Build 2021.09.12 Fix for Google Drive Security Update (#17)

Published by chriskyfung about 3 years ago

๐Ÿ— MAJOR CHANGES:

  • Rebuilt badge update functions with Class DriveApp
  • Removed the functions that were dependent on Drive API v3
  • Removed unused script files
  • Split testing codes to a separated script file
AutoFetcher-IG-Stories-to-GDrive - Build 2020.12.09

Published by chriskyfung almost 4 years ago

Fixes #11

  • Replaced the query path with the new IG endpoint
  • Updated the header for the HTTP request
  • Updated to look up the download URLs from the new data structure
  • Updated the README file
AutoFetcher-IG-Stories-to-GDrive - Build 2020.10.08

Published by chriskyfung about 4 years ago

  • Introduce Status Badges to display the last tested date and the ig fetch test result.
  • Updated README file
AutoFetcher-IG-Stories-to-GDrive - Build 2020.06.05

Published by chriskyfung over 4 years ago

Fixed and improved test function

New function called test_pipeline() has been added to check if there are any stories shown from the Instagram accounts of BBCNews, NASA and Medium.

AutoFetcher-IG-Stories-to-GDrive - Build 2020.06.02

Published by chriskyfung over 4 years ago

The version Build 2020.05.14 failed on 2020-06-02 due to the suspension of the download source, storydownloader.net. The data of IG stories has been changed to fetch from the official site in the new version Build 2020.06.02.

AutoFetcher-IG-Stories-to-GDrive - Build 2020.05.14

Published by chriskyfung over 4 years ago

IMPORTANT UPDATE

Due to the suspension of storyig.com, the former version has failed since 2020-05-08.
The new script fetches IG stories from storydownloader.net.