papi-projects 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {papi_projects-0.2.0 → papi_projects-0.2.1}/PKG-INFO +1 -1
- {papi_projects-0.2.0 → papi_projects-0.2.1}/pyproject.toml +1 -1
- {papi_projects-0.2.0 → papi_projects-0.2.1}/scripts/create_notion_project.py +11 -11
- {papi_projects-0.2.0 → papi_projects-0.2.1}/scripts/create_project.py +11 -11
- {papi_projects-0.2.0 → papi_projects-0.2.1}/scripts/create_toggl_project.py +10 -20
- {papi_projects-0.2.0 → papi_projects-0.2.1}/README.md +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/__init__.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/mocks.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/project.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/tests/__init__.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/tests/test_project.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/tests/test_user.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/tests/test_userdb.json +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/tests/test_wrappers.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/user.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/papi/wrappers.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/scripts/__init__.py +0 -0
- {papi_projects-0.2.0 → papi_projects-0.2.1}/scripts/collate_toggl_hours.py +0 -0
|
@@ -51,24 +51,24 @@ def main():
|
|
|
51
51
|
project_name = args.name
|
|
52
52
|
project_id = args.project_id
|
|
53
53
|
|
|
54
|
-
if user_id and not user_name:
|
|
55
|
-
user = User(user_id=user_id)
|
|
56
|
-
elif user_name and not user_id:
|
|
57
|
-
user = User(user_name)
|
|
58
|
-
elif user_id and user_name:
|
|
59
|
-
user = User(user_name, user_id=user_id)
|
|
60
|
-
else:
|
|
61
|
-
logger.warning("Please provide either a three-letter user ID and/or user name")
|
|
62
|
-
return
|
|
63
|
-
|
|
64
54
|
if project_id and not project_name:
|
|
65
55
|
project = Project(id=project_id)
|
|
56
|
+
user_id = project.user_id
|
|
57
|
+
user = User(user_id=user_id)
|
|
66
58
|
elif project_name and not project_id:
|
|
59
|
+
if user_id and not user_name:
|
|
60
|
+
user = User(user_id=user_id)
|
|
61
|
+
elif user_name and not user_id:
|
|
62
|
+
user = User(user_name)
|
|
63
|
+
elif user_id and user_name:
|
|
64
|
+
user = User(user_name, user_id=user_id)
|
|
67
65
|
project = Project(name=project_name, user_id=user.user_id)
|
|
68
66
|
elif project_id and project_name:
|
|
69
67
|
project = Project(name=project_name, id=project_id)
|
|
68
|
+
user_id = project.user_id
|
|
69
|
+
user = User(user_id=user_id)
|
|
70
70
|
else:
|
|
71
|
-
logger.warning("Please provide either a valid project ID
|
|
71
|
+
logger.warning("Please provide either a valid project ID or valid three-letter user ID")
|
|
72
72
|
return
|
|
73
73
|
|
|
74
74
|
# Create project on Notion
|
|
@@ -108,24 +108,24 @@ def main():
|
|
|
108
108
|
enable_toggl = args.enable_toggl
|
|
109
109
|
enable_notion = args.enable_notion
|
|
110
110
|
|
|
111
|
-
if user_id and not user_name:
|
|
112
|
-
user = User(user_id=user_id)
|
|
113
|
-
elif user_name and not user_id:
|
|
114
|
-
user = User(user_name)
|
|
115
|
-
elif user_id and user_name:
|
|
116
|
-
user = User(user_name, user_id=user_id)
|
|
117
|
-
else:
|
|
118
|
-
logger.warning("Please provide either a three-letter user ID and/or user name")
|
|
119
|
-
return
|
|
120
|
-
|
|
121
111
|
if project_id and not project_name:
|
|
122
112
|
project = Project(id=project_id)
|
|
113
|
+
user_id = project.user_id
|
|
114
|
+
user = User(user_id=user_id)
|
|
123
115
|
elif project_name and not project_id:
|
|
116
|
+
if user_id and not user_name:
|
|
117
|
+
user = User(user_id=user_id)
|
|
118
|
+
elif user_name and not user_id:
|
|
119
|
+
user = User(user_name)
|
|
120
|
+
elif user_id and user_name:
|
|
121
|
+
user = User(user_name, user_id=user_id)
|
|
124
122
|
project = Project(name=project_name, user_id=user.user_id)
|
|
125
123
|
elif project_id and project_name:
|
|
126
124
|
project = Project(name=project_name, id=project_id)
|
|
125
|
+
user_id = project.user_id
|
|
126
|
+
user = User(user_id=user_id)
|
|
127
127
|
else:
|
|
128
|
-
logger.warning("Please provide either a valid project ID
|
|
128
|
+
logger.warning("Please provide either a valid project ID or valid three-letter user ID")
|
|
129
129
|
return
|
|
130
130
|
|
|
131
131
|
if enable_toggl:
|
|
@@ -53,28 +53,18 @@ def main():
|
|
|
53
53
|
project_name = args.name
|
|
54
54
|
project_id = args.project_id
|
|
55
55
|
|
|
56
|
-
if
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
project = Project(user_id=user_id, grant_code=grant_code)
|
|
62
|
-
elif not grant_code and project_name:
|
|
63
|
-
project = Project(user_id=user_id, name=project_name)
|
|
56
|
+
if project_id and not project_name:
|
|
57
|
+
project = Project(id=project_id)
|
|
58
|
+
elif project_name and not project_id:
|
|
59
|
+
if user_id:
|
|
60
|
+
project = Project(name=project_name, user_id=user_id)
|
|
64
61
|
else:
|
|
65
|
-
project
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
project = Project(id=project_id, grant_code=grant_code, name=project_name)
|
|
70
|
-
elif grant_code and not project_name:
|
|
71
|
-
project = Project(id=project_id, grant_code=grant_code)
|
|
72
|
-
elif not grant_code and project_name:
|
|
73
|
-
project = Project(id=project_id, name=project_name)
|
|
74
|
-
else:
|
|
75
|
-
project = Project(id=project_id)
|
|
62
|
+
logger.warning("Please provide either a valid project ID or valid three-letter user ID")
|
|
63
|
+
return
|
|
64
|
+
elif project_id and project_name:
|
|
65
|
+
project = Project(name=project_name, id=project_id)
|
|
76
66
|
else:
|
|
77
|
-
logger.warning("Please provide either a
|
|
67
|
+
logger.warning("Please provide either a valid project ID or valid three-letter user ID")
|
|
78
68
|
return
|
|
79
69
|
|
|
80
70
|
# Create project on Toggl Track
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|