Skip to content

Expand blog automation to include information from Google Form (author name etc) as well as copying the image file to our repo#644

Open
silkenodwell wants to merge 5 commits intoWomen-Coding-Community:mainfrom
silkenodwell:expand-blog-automation
Open

Expand blog automation to include information from Google Form (author name etc) as well as copying the image file to our repo#644
silkenodwell wants to merge 5 commits intoWomen-Coding-Community:mainfrom
silkenodwell:expand-blog-automation

Conversation

@silkenodwell
Copy link
Contributor

@silkenodwell silkenodwell commented Jan 27, 2026

Description

  • Update the .yaml header for the blog export with information from the spreadsheet associated to the Google Form responses for blog submissions
  • Copy the image file to the repo
  • Create a GitHub Actions workflow to check the spreadsheet for new rows, run the blog exporter and commit the changes

Change Type

  • Bug Fix
  • New Feature
  • Code Refactor
  • Mentor Update
  • Data Update
  • Documentation
  • Other

Related Issue

#643

Screenshots

Pull request checklist

Please check if your PR fulfills the following requirements:

  • I checked and followed the contributor guide
  • I have tested my changes locally.
  • I have added a screenshot from the website after I tested it locally

@silkenodwell silkenodwell requested a review from a team as a code owner January 27, 2026 23:31
@silkenodwell silkenodwell changed the title Expand blog automation Expand blog automation to include information from Google Form (author name etc) as well as copying the image file to our repo Jan 31, 2026
@nora-weisser
Copy link
Contributor

I was thinking about the trigger we need to consider. Actually we have to publish the blog after it's been reviewed and approved. In this case we can introduce two columns: isReviewed and isPublished. First, this pipeline will check if some articles unpublished and then if they are reviewed. If they are not published and reviewed, the generation will be triggered. What do you think?

@@ -1,23 +1,280 @@
affine @ file:///home/conda/feedstock_root/build_artifacts/affine_1733762038348/work
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most entries in requirements.txtuse @ file:///... URLs pointing to local build artifact paths on your machine. I think, these paths don't exist when someone else tries to install from them.
There should be a requirements.txt file with just package names and versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And there are soo many dependencies, do we need them all? :)

## Run Automation
1. Activate virtual environment: `source venv/bin/activate`
2. Run the script: `python doc_to_html_conversion.py <DOC_ID>`
2. Run the script: `python blog_exporter [--row_index <ROW_INDEX>]`, where the row_index refers to the row of the CSV. This defaults to -1, or the last row in the CSV.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to provide a document id while executing blog_exporter.py?

## Run Automation
1. Activate virtual environment: `source venv/bin/activate`
2. Run the script: `python doc_to_html_conversion.py <DOC_ID>`
2. Run the script: `python blog_exporter [--row_index <ROW_INDEX>]`, where the row_index refers to the row of the CSV. This defaults to -1, or the last row in the CSV.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Run the script: `python blog_exporter [--row_index <ROW_INDEX>]`, where the row_index refers to the row of the CSV. This defaults to -1, or the last row in the CSV.
2. Run the script: `python blog_exporter.py [--row_index <ROW_INDEX>]`, where the row_index refers to the row of the CSV. This defaults to -1, or the last row in the CSV.

@@ -0,0 +1,92 @@
name: Import Meetup Events
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: Import Meetup Events
name: Publish Blogs

python -m pip install --upgrade pip
pip install -r tools/requirements.txt

- name: Export new blogs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this step I don't see service_account_key.json secret file to be passed into pipeline, will it still work?

Comment on lines +46 to +50





Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@@ -0,0 +1,31 @@
,url,doc_id,author_name,author_role,description,source,image_link
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure we want to expose snapshot publicly...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another approach would be - add two columns in excel (isReviewed and isProcessed):

  1. Read the spreadsheet
  2. Filter rows where "isReviewed" is yes and "Processed" column is empty
  3. Export those blogs
  4. Mark them as "Processed" by writing timestamp back to the sheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants