confluence script updates
This commit is contained in:
@ -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 |
|
||||
|
||||
|--|--|--|
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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")
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user