This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jira import JIRA | |
import getpass | |
# add your JIRA instance URL here | |
jiraURL = 'https://myjira.com' | |
# update with JIRA username or replace it with | |
# username = input('Type your JIRA username') | |
# to ask for the username in the command line | |
username = 'myusername' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# number of USCIS process | |
process='SRCXXXXXXXXXX' | |
# submits POST request and retrieves HTML element removing new line and whitespaces | |
status=`curl 'https://egov.uscis.gov/cris/Dashboard/CaseStatus.do' --data 'appReceiptNum='"$process"'&submmit.y=13' -s | xmllint --html -xpath '//div[@class="controls"]/h4' - 2> /dev/null | sed -e 's/^ *//' -e 's/ *$//' | tr -d '\n\r'` | |
# extracts only the status | |
status=`echo $status | awk -v FS="(br>|</)" '{print $2}'` | |
# generates a notification on MacOS |