This commit is contained in:
parent
0cdaabfa5d
commit
79ca90597c
BIN
dist/drstats-1.3.37-py3-none-any.whl
vendored
BIN
dist/drstats-1.3.37-py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/drstats-1.3.37.tar.gz
vendored
BIN
dist/drstats-1.3.37.tar.gz
vendored
Binary file not shown.
BIN
drstats.db
BIN
drstats.db
Binary file not shown.
3484
export/0_dataset.txt
3484
export/0_dataset.txt
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,13 +2,15 @@ Metadata-Version: 2.1
|
||||
Name: drstats
|
||||
Version: 1.3.37
|
||||
Summary: dR stats
|
||||
Home-page: UNKNOWN
|
||||
Author: Retoor
|
||||
Author-email: retoor@molodetz.nl
|
||||
License: MIT
|
||||
Platform: UNKNOWN
|
||||
Requires-Python: >=3.7
|
||||
Description-Content-Type: text/markdown
|
||||
Requires-Dist: aiohttp==3.10.10
|
||||
Requires-Dist: dataset==1.6.2
|
||||
Requires-Dist: matplotlib==3.9.2
|
||||
Requires-Dist: requests==2.32.3
|
||||
|
||||
# dRStats
|
||||
|
||||
@ -54,5 +56,3 @@ If you type `dr.` in terminal and press tab you'll see all available apps auto c
|
||||
4. `dr.rant_stats_per_day` exports graphs to export folder. don't forget to execute `dr.sync` first.
|
||||
5. `dr.rant_stats_per_hour` exports graphs to export folder. don't forget to execute `dr.sync` first.
|
||||
6. `dr.rant_stats_per_weekday` exports graphs to export folder. don't forget to execute `dr.sync` first.
|
||||
|
||||
|
||||
|
@ -5,4 +5,3 @@ dr.rant_stats_per_hour = drstats.statistics:rant_stats_per_hour
|
||||
dr.rant_stats_per_weekday = drstats.statistics:rant_stats_per_weekday
|
||||
dr.stats_all = drstats.statistics:rant_stats_all
|
||||
dr.sync = drstats.sync:sync
|
||||
|
||||
|
Binary file not shown.
@ -22,7 +22,7 @@ def dump():
|
||||
printr(statistics_text[-1])
|
||||
print("\n".join(statistics_text))
|
||||
all_content = ""
|
||||
for user in db.get_users():
|
||||
for user in list(db.get_users()):
|
||||
text = (
|
||||
db.get_all_rants_of_user(user)
|
||||
)
|
||||
|
@ -282,16 +282,16 @@ def get_contribution_average_per_user():
|
||||
|
||||
|
||||
def get_all_rants_of_user(username):
|
||||
with Db() as db:
|
||||
with Db() as _db:
|
||||
try:
|
||||
return db.db["rants_of_user"].find_one(username=username)["text"]
|
||||
except TypeError:
|
||||
return list(_db.db["rants_of_user"].find(username=username))[0]["text"]
|
||||
except IndexError:
|
||||
return ""
|
||||
|
||||
|
||||
def get_all_posts_of_user(username):
|
||||
with Db() as db:
|
||||
with Db() as _db:
|
||||
try:
|
||||
return db.db["posts_of_user"].find_one(username=username)["text"]
|
||||
except TypeError:
|
||||
return list(_db.db["posts_of_user"].find(username=username))[0]["text"]
|
||||
except IndexError:
|
||||
return ""
|
||||
|
Loading…
Reference in New Issue
Block a user