Compare commits

...

6 Commits

20 changed files with 27 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
client_secret.json client_secret.json
token.* token.*
__pycache__/ __pycache__/
.~*.*#
*.xml

View File

@ -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}}},

View File

@ -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":[]}

View File

@ -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)

BIN
asset/2024-03-05_19-23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
asset/2024-03-06_09-10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
asset/2024-03-07_05-56.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
asset/2024-03-07_06-09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
asset/2024-03-07_11-51.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
asset/2024-03-07_11-57.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
asset/2024-03-07_19-49.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
asset/2024-03-08_14-28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

BIN
myedu.ods

Binary file not shown.