github-heatmap 1.3.7__tar.gz → 1.3.8__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.
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/PKG-INFO +1 -1
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/todoist_loader.py +10 -9
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/weread_loader.py +17 -12
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap.egg-info/PKG-INFO +1 -1
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/setup.py +1 -1
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/LICENSE +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/README.md +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/__init__.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/__main__.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/circluar_drawer.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/cli.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/config.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/drawer.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/err.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/html_parser/__init__.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/html_parser/github_parser.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/html_parser/gitlab_parser.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/html_parser/jike_parse.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/html_parser/kindle_parser.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/__init__.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/apple_health_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/base_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/bbdc_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/bilibili_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/chatgpt_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/cichang_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/config.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/covid_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/dota2_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/duolingo_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/forest_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/from_github_issue_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/garmin_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/github_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/gitlab_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/gpx_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/jike_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/json_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/kindle_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/leetcode_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/multiple_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/neodb_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/notion_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/nrc_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/ns_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/openlanguage_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/shanbay_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/strava_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/summary_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/wakatime_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/youtube_loader.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/poster.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/skyline/__init__.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/skyline/config.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/skyline/font/__init__.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/skyline/skyline.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/structures.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/utils.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap.egg-info/SOURCES.txt +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap.egg-info/dependency_links.txt +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap.egg-info/entry_points.txt +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap.egg-info/requires.txt +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap.egg-info/top_level.txt +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/pyproject.toml +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/setup.cfg +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/tests/__init__.py +0 -0
- {github_heatmap-1.3.7 → github_heatmap-1.3.8}/tests/test_poster_utils.py +0 -0
|
@@ -4,10 +4,10 @@ import requests
|
|
|
4
4
|
from github_heatmap.err import DepNotInstalledError
|
|
5
5
|
from github_heatmap.loader.base_loader import BaseLoader
|
|
6
6
|
|
|
7
|
-
try:
|
|
8
|
-
|
|
9
|
-
except ImportError:
|
|
10
|
-
|
|
7
|
+
# try:
|
|
8
|
+
# import pandas as pd
|
|
9
|
+
# except ImportError:
|
|
10
|
+
# pd = None
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class TodoistLoader(BaseLoader):
|
|
@@ -24,11 +24,12 @@ class TodoistLoader(BaseLoader):
|
|
|
24
24
|
|
|
25
25
|
@classmethod
|
|
26
26
|
def try_import_deps(cls):
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
pass
|
|
28
|
+
# if pd is None:
|
|
29
|
+
# raise DepNotInstalledError(
|
|
30
|
+
# "Todoist dependencies are not installed, "
|
|
31
|
+
# "please use `pip3 install -U 'github_heatmap[todoist]'` to install."
|
|
32
|
+
# ) from None
|
|
32
33
|
|
|
33
34
|
@classmethod
|
|
34
35
|
def add_loader_arguments(cls, parser, optional):
|
|
@@ -24,27 +24,30 @@ class WereadLoader(BaseLoader):
|
|
|
24
24
|
def __init__(self, from_year, to_year, _type, **kwargs):
|
|
25
25
|
super().__init__(from_year, to_year, _type)
|
|
26
26
|
|
|
27
|
-
self.weread_cookie = kwargs.get("weread_cookie", "")
|
|
27
|
+
# self.weread_cookie = kwargs.get("weread_cookie", "")
|
|
28
28
|
self.session = requests.Session()
|
|
29
29
|
self.session.headers = headers
|
|
30
|
+
self.token = os.getenv("REFRESH_TOKEN")
|
|
31
|
+
self.activation_code = os.getenv("ACTIVATION_CODE")
|
|
32
|
+
self.device_id = os.getenv("DEVICE_ID")
|
|
30
33
|
self.refresh_token()
|
|
31
34
|
self._make_years_list()
|
|
32
35
|
|
|
33
36
|
@classmethod
|
|
34
37
|
def add_loader_arguments(cls, parser, optional):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
pass
|
|
39
|
+
# parser.add_argument(
|
|
40
|
+
# "--weread_cookie",
|
|
41
|
+
# dest="weread_cookie",
|
|
42
|
+
# type=str,
|
|
43
|
+
# required=False,
|
|
44
|
+
# help="",
|
|
45
|
+
# )
|
|
42
46
|
|
|
43
47
|
def refresh_token(self):
|
|
44
|
-
|
|
45
|
-
body = {'url': f"https://github.com/{github_repo_env}","token":os.getenv("TOKEN")}
|
|
48
|
+
body = {"deviceId":self.device_id ,"refreshToken":self.token,"activationCode":self.activation_code}
|
|
46
49
|
r = self.session.post(
|
|
47
|
-
"https://api.notionhub.app/refresh-weread-token
|
|
50
|
+
"https://api.notionhub.app/refresh-weread-token", json=body
|
|
48
51
|
)
|
|
49
52
|
if r.ok:
|
|
50
53
|
response_data = r.json()
|
|
@@ -52,6 +55,8 @@ class WereadLoader(BaseLoader):
|
|
|
52
55
|
accessToken = response_data.get("accessToken")
|
|
53
56
|
if vid and accessToken:
|
|
54
57
|
self.session.headers.update({"vid": str(vid), "accessToken": accessToken})
|
|
58
|
+
else:
|
|
59
|
+
print("Failed to refresh token")
|
|
55
60
|
else:
|
|
56
61
|
print("Failed to refresh token")
|
|
57
62
|
|
|
@@ -61,7 +66,7 @@ class WereadLoader(BaseLoader):
|
|
|
61
66
|
if not r.ok:
|
|
62
67
|
print(r.text)
|
|
63
68
|
# need to refresh cookie
|
|
64
|
-
if r.json()["errcode"] == -2012
|
|
69
|
+
if r.json()["errcode"] == -2012:
|
|
65
70
|
self.refresh_token()
|
|
66
71
|
r = self.session.get(WEREAD_HISTORY_URL)
|
|
67
72
|
else:
|
|
@@ -6,7 +6,7 @@ setup(
|
|
|
6
6
|
author_email="linkang.ma@gmail.com",
|
|
7
7
|
url="https://github.com/malinkang/GitHubPoster",
|
|
8
8
|
license="MIT",
|
|
9
|
-
version="1.3.
|
|
9
|
+
version="1.3.8",
|
|
10
10
|
description="Make everything a GitHub svg poster and Skyline!",
|
|
11
11
|
packages=find_packages(),
|
|
12
12
|
include_package_data=True,
|
|
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
|
|
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
|
{github_heatmap-1.3.7 → github_heatmap-1.3.8}/github_heatmap/loader/from_github_issue_loader.py
RENAMED
|
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
|
|
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
|
|
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
|