Skip to content

Commit 6b56b87

Browse files
committed
updated link filter to ignore go.iu.edu links
1 parent b1047d7 commit 6b56b87

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
4949
with:
50-
tag_name: v1.2.1
51-
release_name: Release v1.2.1
50+
tag_name: v1.2.2
51+
release_name: Release v1.2.2
5252
body: |
53-
Replaced the deprecated findAll() BeautifulSoup function with the updated find_all() function. Riveting.
53+
go.iu.edu links will no longer have UTM query strings attached to them.
5454
draft: false
5555
prerelease: false
5656
- name: Upload Release Asset
@@ -61,5 +61,5 @@ jobs:
6161
with:
6262
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
6363
asset_path: dist/utm-link-editor-windows-amd64.exe
64-
asset_name: utm-link-editor-windows-amd64-1.2.1.exe
64+
asset_name: utm-link-editor-windows-amd64-1.2.2.exe
6565
asset_content_type: application/zip

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ The program also reads the text of every hyperlink and sets the utm_content para
1414

1515
I chose Python simply because that is the language that I am most familiar with, and I've learned a lot over the last few months of working on this! In the future, there are a few features I'd like to implement:
1616

17-
- Functionality that allows it to be used on the "informal" emails meant to mimic emails sent from an individual sometimes sent by my team
1817
- Handling for non-unicode characters (which currently throw an error and keep the program from continuing)
1918
- Basic error handling/checking
2019
- Proper tests

functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def link_filter(links):
1010
#filter for IU links
1111
if 'indiana.edu' in link or 'iu.edu' in link or "{{Form-Link}}" in link or "{{Form-Survey-Link}}" in link:
1212
#filter out non-webpage and unnecessary IU links
13-
if "mailto:" not in link and ".png" not in link and "tel" not in link and ".jpg" not in link and 'https://one.iu.edu' not in link and "machform" not in link:
13+
if "mailto:" not in link and ".png" not in link and "tel" not in link and ".jpg" not in link and 'https://one.iu.edu' not in link and "machform" not in link and "go.iu.edu" not in link:
1414
storage_list.append(link)
1515

1616
return storage_list
@@ -27,7 +27,7 @@ def content_grabber(html):
2727
for link in soup.findAll('a'):
2828
# filter out the links that don't need to be updated
2929
if 'indiana.edu' in link['href'] or 'iu.edu' in link['href'] or "{{Form-Link}}" in link['href'] or "{{Form-Survey-Link}}" in link['href']:
30-
if "mailto:" not in link['href'] and ".png" not in link['href'] and "tel:" not in link['href'] and ".jpg" not in link['href'] and 'https://one.iu.edu' not in link['href'] and "machform" not in link['href']:
30+
if "mailto:" not in link['href'] and ".png" not in link['href'] and "tel:" not in link['href'] and ".jpg" not in link['href'] and 'https://one.iu.edu' not in link['href'] and "machform" not in link['href'] and "go.iu.edu" not in link['href']:
3131
# case if link is not a button
3232
# this code chops and screws the content and appends the anchor tag to the end of the content if it exists
3333
if len(link.contents) == 1:

0 commit comments

Comments
 (0)