From 9d133ecea557b3787c7c56ac823530b7e9ae74ab Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Fri, 14 Oct 2022 17:14:14 -0400 Subject: [PATCH] confluence script updates --- CustomerNotes/Humly.md | 4 + CustomerNotes/Walmart.md | 12 +++ Scripts/Confluence_Notes/confluence_get.py | 100 +++++++++++++----- Timetagger/_timetagger/users/norm~bm9ybQ==.db | Bin 94208 -> 114688 bytes 4 files changed, 90 insertions(+), 26 deletions(-) diff --git a/CustomerNotes/Humly.md b/CustomerNotes/Humly.md index ee78b9e1..ac312d27 100644 --- a/CustomerNotes/Humly.md +++ b/CustomerNotes/Humly.md @@ -73,6 +73,9 @@ Status is they are mapping out and deciding what Northpass involvment should be * Those 5-6 courses _should_ be done in order, but its not necessary * A few quizzes across the 5-6 courses +## 10/14/2022 +* They are not sure about the Miro graphic + # Feature Requests |**Request**|**Date** | **Product/PM** | |---------|------|------------| @@ -81,3 +84,4 @@ Status is they are mapping out and deciding what Northpass involvment should be | Title of Course should be RTE | 10/6/2022 | LX Team | |--|--|--| + diff --git a/CustomerNotes/Walmart.md b/CustomerNotes/Walmart.md index c835cdc9..1e958bc2 100644 --- a/CustomerNotes/Walmart.md +++ b/CustomerNotes/Walmart.md @@ -5,3 +5,15 @@ * He will send Figma file with all the screens so that Walmart can review and ensure they are up to date. * Cam may also be able to provide a process to make this approval sequence even more * Talks about a Figma shared space, but usuing the existing OneDrive may be best. +* Can we tag in 1Drive? An approval folder, a pending tag? A finals folder? +* New resources from Walmart - tagging or batching resources? +* Rock22 - what is that? Mentioned by Krystal + * Sounds like a new resource cirriculum +* Travis addressed analytics +* Krystal asked if this was specific for walmart, or how they were set up? Or is this for most users? +* Travis said "some things about Walmart are nuanced, but there are some underlying issues we need to address" +* Krystal replied with the start course button and when someone is marked as "started". 36,000 enrolled but 1,200 started? Not a great number to report back to leadership. +* Wants to get that data back or are we SOL? +* Travis: Nope! The data is intact. We can provide this data, outside of our native analytics system. + +## 10/13/2022 diff --git a/Scripts/Confluence_Notes/confluence_get.py b/Scripts/Confluence_Notes/confluence_get.py index cff40bab..1c9b22f9 100644 --- a/Scripts/Confluence_Notes/confluence_get.py +++ b/Scripts/Confluence_Notes/confluence_get.py @@ -1,34 +1,82 @@ import requests from requests.auth import HTTPBasicAuth import json +import os -url = "https://northpass.atlassian.net/wiki/rest/api/content/2210463745/child/page" - -#auth = HTTPBasicAuth("bnJhc211c3NlbkBub3J0aHBhc3MuY29tOnFmOUlsN1g0d2t0aGdRS0JPSWx5NTczNw==") +# Information +#url = "https://northpass.atlassian.net/wiki/rest/api/content/2210463745/child/page" +url = "https://northpass.atlassian.net/wiki/rest/api/content/" auth = HTTPBasicAuth("nrasmussen@northpass.com", "qf9Il7X4wkthgQKBOIly5737") -headers = { - "Accept": "application/json", -} - -#payload = json.dumps( { -# "type":"page", -# "ancestors":[{"id":2210463745}], -# "space": -# {"key":"~350535240"}, -# } ) - -response = requests.request( - "GET", - url, - headers=headers, - auth=auth -) - -jsonResponse = response.json() -for response in jsonResponse['results']: - if response['title'] == 'Flink': - print("Found") - print(response['title']) +rootdir = "~/Documents/Northpass/CustomerNotes/" +def getCompany(): + rootdir = "/Users/normrasmussen/Documents/Northpass/CustomerNotes/" + companyName = os.listdir(rootdir) + for fileName in companyName: + company = fileName[:-3] + getPages(company) + +def readNewNotes(company): + rootdir = "/Users/normrasmussen/Documents/Northpass/CustomerNotes/" + with open(rootdir+company+".md", "r") as companyfile: + notes = companyfile.readlines() + createNewPage(company, notes) + print(notes) + +def getPages(company): + headers = { + "Accept": "application/json", + } + response = requests.request( + "GET", + url, + headers=headers, + auth=auth + ) + jsonResponse = response.json() + for response in jsonResponse['results']: + if response['title'] == company: + print(f"{company} Found. Updating page....") + else: + print(f"{company} not found. Create new page...") + readNewNotes(company) + +def createNewPage(company="Example", + notes="h1. 10/06/2022\n', '* Cami and Soner to pull their own analytics \n', '* Unsure what those key metrics are\n', '* However, they currently look at:\n', ' * Completion % of courses\n', ' * Number of completed courses \n', '* Planning needs to happen about what those analytics are \n', '* Main priorities, cateogries, ensure the front end is Flinky, \n', '* Reduce banner slightly, Cami to send a picture of what she wants\n', '* They want to launch ASAP, but need to find a window that works best\n', '* Wednesdays are generally slow and could be a good transfer day\n', '* Wednesday 10/19 - tentative \n', '\n'"): + url = "https://northpass.atlassian.net/wiki/rest/api/content/" + auth = HTTPBasicAuth("nrasmussen@northpass.com", "qf9Il7X4wkthgQKBOIly5737") + headers = { + "X-Atlassian-Token": "no-check", + "Accept": "application/json", + "Content-Type": "application/json" + } + payload = json.dumps( { + "type":"page", + "title": company, + "ancestors":[{"id":2210463745}], + "space": + {"key":"~350535240"}, + "body": + {"storage": + {"value": notes, + "representation":"storage"}} + } ) + + response = requests.request( + "POST", + url, + data=payload, + headers=headers, + auth=auth + ) + print("createNewPage function has run") + response = json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")) + print(response) + #jsonResponse = response.json() + #print(jsonResponse) + +if __name__ == "__main__": + createNewPage() + #readNewNotes(company="Flink") diff --git a/Timetagger/_timetagger/users/norm~bm9ybQ==.db b/Timetagger/_timetagger/users/norm~bm9ybQ==.db index abca2781c46c901bed6a0403e855846af5483a80..eb4d39325531adc4fc55d682a7d50cca6ca7efea 100644 GIT binary patch delta 2170 zcmb7_e{2(F7{~9uUhl5gUa!E!GPY3~#38u#?%LiJA#)7JZ37)_1Gn&N>-Ztev9Tco zQ97q_LcpCDso*aNzY;9;$$Nr2okoaVKEz-3Nij6`d+)Yc<4X&kLG>9 z_gtRm^S;mbxk$e?5~12AT2EsbmZo}g!0Fh^Lpe?xvjadSg~hpQXOHfB`nrvW3gr-(6UbQzU$jVXRi#t?7Fg@L*Knv~5Eg0iQTE-_`e08MqoGY0TMW%Vj#KWfX6} zLd~;tq+fFv&vB8oeW^X49dT@6YnV)OoVL2yCy>(|4sJE|Ej5cQbKGS9V0V!@oP~B% zZ_yt(s+m&ysQod@MNM@aVPA8SbOo8ApDmtgox|Yi^VgIq6?wJK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