Compare commits
6 Commits
master
...
mapel_data
Author | SHA1 | Date |
---|---|---|
|
d4f1a79ccf | |
|
e959c8109a | |
|
5bcd4eb5b4 | |
|
8b66cd3659 | |
|
3a4f103ab1 | |
|
2b809673c1 |
|
@ -1,3 +1,5 @@
|
||||||
client_secret.json
|
client_secret.json
|
||||||
token.*
|
token.*
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
.~*.*#
|
||||||
|
*.xml
|
||||||
|
|
|
@ -7,7 +7,7 @@ from gservice import gservice
|
||||||
class gdoc(gservice):
|
class gdoc(gservice):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(gdoc, self).__init__()
|
super(gdoc, self).__init__()
|
||||||
self.image_temp_service_url = "https://git.manakin-gentoo.ts.net/a2nr/boring_edu_doc/raw/branch/master"
|
self.image_temp_service_url = "https://git.manakin-gentoo.ts.net/a2nr/boring_edu_doc/raw/branch/mapel_data_science"
|
||||||
# self.image_temp_service_url = "https://tmpfiles.org/api/v1/upload"
|
# self.image_temp_service_url = "https://tmpfiles.org/api/v1/upload"
|
||||||
# self.image_temp_service_url = "https://tmpfiles.org/api/v1/upload"
|
# self.image_temp_service_url = "https://tmpfiles.org/api/v1/upload"
|
||||||
# self.image_temp_service_url = "https://uguu.se/upload.php"
|
# self.image_temp_service_url = "https://uguu.se/upload.php"
|
||||||
|
@ -67,6 +67,7 @@ class gdoc(gservice):
|
||||||
state = self.service.documents().get(documentId=self.main_docs["documentId"]).execute()
|
state = self.service.documents().get(documentId=self.main_docs["documentId"]).execute()
|
||||||
content = state['body']['content']
|
content = state['body']['content']
|
||||||
endIndex = content[len(content)-1]['endIndex']
|
endIndex = content[len(content)-1]['endIndex']
|
||||||
|
self.questionKey.reverse()
|
||||||
requests = [
|
requests = [
|
||||||
{'insertText': { 'text' : "\r\n\r\n"+"\r\n".join(["{}".format(chr(64+key)) for key in self.questionKey]), 'location': {'index': endIndex-1}}},
|
{'insertText': { 'text' : "\r\n\r\n"+"\r\n".join(["{}".format(chr(64+key)) for key in self.questionKey]), 'location': {'index': endIndex-1}}},
|
||||||
{'insertPageBreak': {'location': {'index': endIndex}}},
|
{'insertPageBreak': {'location': {'index': endIndex}}},
|
||||||
|
|
|
@ -11,7 +11,7 @@ class gquiz(gservice):
|
||||||
templateId : get the id from link GoogleForm
|
templateId : get the id from link GoogleForm
|
||||||
'''
|
'''
|
||||||
super(gquiz, self).__init__()
|
super(gquiz, self).__init__()
|
||||||
self.image_temp_service_url = "https://git.manakin-gentoo.ts.net/a2nr/boring_edu_doc/raw/branch/master"
|
self.image_temp_service_url = "https://git.manakin-gentoo.ts.net/a2nr/boring_edu_doc/raw/branch/mapel_data_science"
|
||||||
# self.image_temp_service_url = "https://tmpfiles.org/api/v1/upload"
|
# self.image_temp_service_url = "https://tmpfiles.org/api/v1/upload"
|
||||||
# self.image_temp_service_url = "https://uguu.se/upload.php"
|
# self.image_temp_service_url = "https://uguu.se/upload.php"
|
||||||
self.submition = {"requests":[]}
|
self.submition = {"requests":[]}
|
||||||
|
|
|
@ -138,4 +138,25 @@ def MoodleQuiz():
|
||||||
ui.SetStatusbar("Done!")
|
ui.SetStatusbar("Done!")
|
||||||
_statusBarInfoUpdate("Check *.xml file in curent folder!",100)
|
_statusBarInfoUpdate("Check *.xml file in curent folder!",100)
|
||||||
|
|
||||||
g_exportedScripts = (MakeTemplate, GoogleQuiz, GoogleDocs, MoodleQuiz)
|
def BackupCode():
|
||||||
|
import zipfile
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Path ZIP dan folder tujuan ekstrak
|
||||||
|
zip_path = curpath + '/myedu.ods'
|
||||||
|
extract_to = curpath
|
||||||
|
folder_dalam_zip = 'Scripts/' # Pastikan ada '/' di akhir untuk folder
|
||||||
|
_kode_info = ""
|
||||||
|
|
||||||
|
# Buka ZIP
|
||||||
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
||||||
|
# Iterasi semua file dalam ZIP
|
||||||
|
for file_info in zip_ref.infolist():
|
||||||
|
# Cek apakah file berada di dalam folder yang diinginkan
|
||||||
|
if file_info.filename.startswith(folder_dalam_zip):
|
||||||
|
# Ekstrak file ke folder tujuan
|
||||||
|
zip_ref.extract(file_info, extract_to)
|
||||||
|
_kode_info = _kode_info + f"\r\n\t- {file_info.filename}"
|
||||||
|
bas.MsgBox("Ini adalah sumber kode yang ter ekstrak :{}".format(_kode_info) ,0 ,"Ekstrak Sumber Kode")
|
||||||
|
|
||||||
|
g_exportedScripts = (MakeTemplate, GoogleQuiz, GoogleDocs, MoodleQuiz, BackupCode)
|
||||||
|
|
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 380 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 92 KiB |