Package: pocket-stats
Pocket StatsA tool to analyze yourPocketreading list.Deployed athttps://pocket-stats.nlbao.page.Pocket StatsFeaturesWord CloudArticle Count timeseriesWord Count distributionReading Speed & Reading TimeTop DomainsLanguage & FavoriteInstallationRun web app locallyData queryingTestingDeploymentContributeAuthorsLicenseAcknowledgmentsFeaturesWord CloudArticle Count timeseriesWord Count distributionStacked histogramsReading Speed & Reading TimeStacked histogramsTop DomainsStacked bar charts.Language & FavoriteInstallationPrerequisites:APocketaccount.Pocketconsumer key.Pocket access token. You can usefxneumann's OneClickPocket toolto automate this.Python 3.6+.You can install using Pip:pip3installpocket-statsOr clone this repo:gitclonehttps://github.com/nlbao/pocket_stats.gitcdpocket_statsmakesetupRun web app locally# Set necessary environment variables:exportPOCKET_STATS_CONSUMER_KEY='<your_pocket_consumer_key>'exportPOCKET_STATS_ACCESS_TOKEN='<your_pocket_access_token>'# Start the webservergunicorn--workers2'pocket_stats.app:server'-b:8050--reload# You will see something like this:# Dash is running on http://127.0.0.1:8050/Go tohttp://127.0.0.1:8050/from your web browser.Data queryingfrompocket_stats.dataimport<your_function_names>Count word in all the titles:>>>count_words_in_title(data)Counter({'-':5,'|':5,'python':3,'problem':2,'strace':1,'wow':1,'much':1,'syscall':1,'martin':1,'heinz':1,'personal':1,'website':1,'&':1,'blog':1,'call':1,'programmer,':1})Number of words in each article:>>>get_word_counts(data)[2207,0,5449,4721,3245,805,1849,4087,0,538,5054,21,866,266,1146,213,823,3551,787,0]Reading time of each article:>>>get_reading_time(data)[9.80888888888889,24.217777777777776,20.982222222222223,14.422222222222222,3.577777777777778,8.217777777777778,18.164444444444445,2.391111111111111,22.462222222222223,0.09333333333333334,3.848888888888889,1.1822222222222223,5.093333333333334,0.9466666666666667,3.6577777777777776,15.782222222222222,3.497777777777778]Number of newly added articles per day:>>>get_added_time_series(data)Allarticles2020-07-0452020-07-0382020-07-0222020-07-015Number of newly archived articles per day:>>>get_archived_time_series(data)Archivedarticles2020-07-042Number of articles per domain:>>>get_domain_counts(data)Counter({'kalzumeus.com':3,'bogleheads.org':2,'github.io':2,'brendangregg.com':1,'martinheinz.dev':1,'awealthofcommonsense.com':1,'jlcollinsnh.com':1,'callan.com':1,'engineerseekingfire.com':1,'arxiv.org':1,'popularmechanics.com':1,'dolpages.com':1,'economist.com':1,'romantomjak.com':1,'digitalocean.com':1,'deepnote.com':1})Number of articles per language:>>>get_language_counts(data)Counter({'en':17,'unknown':3})Number of favorite articles and its percent:>>>get_favorite_count(data){'count':2,'percent':0.1}TestingmakecheckDeploymentYou can deploy theapp.pyas a webserver.Example:https://dash.plotly.com/deployment.ContributePlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.AuthorsBao Nguyen.contributorswho participated in this project.LicenseMIT License - see theLICENSE.mdfile for details.AcknowledgmentsPocket Python client:https://github.com/rakanalh/pocket-apifxneumann's OneClickPocket tool:http://reader.fxneumann.de/plugins/oneclickpocket/auth.php