Skip to content

Commit 1f86c26

Browse files
big module replacing to main dir (step 2 of great refactoring)
1 parent 44c2b8a commit 1f86c26

File tree

16 files changed

+114
-389
lines changed

16 files changed

+114
-389
lines changed

common_grade_export/checker_export/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

common_grade_export/checker_export/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

common_grade_export/checker_export/utils.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

common_grade_export/checker_export/yadisk_manager.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

common_grade_export/checker_export/exporter.py renamed to common_grade_export/exporter.py

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,18 @@
11
# /bin/python3
22
import pygsheets
33
import pandas as pd
4-
import argparse
54
import requests
65
from io import StringIO
7-
import urllib.parse
86
import yadisk
9-
import logging
10-
import sys
117

8+
from utils.arg_parser import parse_args
129

1310
INT_MASS = [{"one": 1, "two": 2, "what?": 3}]
1411

1512

1613
EXPORT_URL = "https://slides-checker.moevm.info/get_csv/?limit=0&offset=0&sort=&order="
1714

1815

19-
def parse_args():
20-
parser = argparse.ArgumentParser()
21-
parser.add_argument(
22-
"--google_token",
23-
type=str,
24-
required=False,
25-
default="conf.json",
26-
help="Specify path to google token file",
27-
)
28-
parser.add_argument(
29-
"--checker_token",
30-
type=str,
31-
required=True,
32-
help="Specify session cookie for slides-checker",
33-
)
34-
parser.add_argument(
35-
"--checker_filter",
36-
type=str,
37-
required=False,
38-
help="Specify filter for slides-checker",
39-
)
40-
parser.add_argument(
41-
"--table_id",
42-
type=str,
43-
required=False,
44-
help="Specify Google sheet document id (can find in url)",
45-
)
46-
parser.add_argument(
47-
"--sheet_name",
48-
type=str,
49-
required=False,
50-
help="Specify title for a sheet in a document in which data will be printed",
51-
)
52-
parser.add_argument(
53-
"--sheet_id",
54-
type=str,
55-
required=False,
56-
help="Specify ID for a sheet in a document in which data will be printed. If set, sheet_name is ignored",
57-
)
58-
parser.add_argument(
59-
"--yandex_token",
60-
type=str,
61-
required=False,
62-
help="Specify Yandex token from https://oauth.yandex.ru/client/new application",
63-
)
64-
parser.add_argument(
65-
"--yandex_path",
66-
type=str,
67-
required=False,
68-
help="Specify output filename on Yandex Disk",
69-
)
70-
args = parser.parse_args()
71-
return args
72-
73-
7416
def load_data_from_dis(checker_filter, checker_token):
7517
url = f"{EXPORT_URL}&{checker_filter}&access_token={checker_token}"
7618
csv_data = requests.get(url).content.decode("utf-8")
File renamed without changes.

common_grade_export/moodle_export/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

common_grade_export/moodle_export/args_parser.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

common_grade_export/moodle_export/sheets.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

common_grade_export/moodle_export/utils.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)