Local html to blogger
Local html to blogger
# HelloBlogger Local HTML
This example shows how to create a new Blogger post from a local HTML file by using PowerShell.
## What The Script Does
The script in this folder:
- reads a local HTML file
- extracts the first `<title>...</title>` tag
- uses that title as the Blogger post title
- sends the full HTML file content as the Blogger post body
- opens a browser-based Google consent flow at runtime and exchanges the returned authorization code for an OAuth access token
- stores the access token and refresh token in a local cache file encrypted with a password variable so future runs can reuse them when they are still valid
- creates Blogger drafts by default instead of publishing them immediately
## Important Constraint
Blogger does not allow creating posts with only an API key. An API key identifies your Google Cloud project, but Blogger write operations also require an OAuth access token for a Google ac...