djadmin / medium-cli Goto Github PK
View Code? Open in Web Editor NEWMedium for Hackers - :computer: A CLI for Medium Stories.
Medium for Hackers - :computer: A CLI for Medium Stories.
Error using "tag" option
~ ❯❯❯ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.3
BuildVersion: 16D32
NPM version:
~ ❯❯❯ npm -v ⏎
4.4.0
~ ❯❯❯ medium tag javascript
/usr/local/lib/node_modules/mediumcli/lib/post.js:71
for (var i = 0, len = Math.min(count, items.length); i < len; i++) {
^
TypeError: Cannot read property 'length' of undefined
at processContent (/usr/local/lib/node_modules/mediumcli/lib/post.js:71:45)
at /usr/local/lib/node_modules/mediumcli/lib/post.js:128:15
at Request._callback (/usr/local/lib/node_modules/mediumcli/lib/post.js:29:4)
at Request.self.callback (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1001:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Hi ;-)
I was just writing a quick blog post about your nice project and I noticed you forgot to push v1.3.2
to npm. At least I think so, as I'm unable to fetch the latest version from the npm registry and it shows the last version there is v1.3.1
I used the command medium tag automation
and returned the following error within the output:
`/usr/local/lib/node_modules/mediumcli/lib/post.js:71
for (var i = 0, len = Math.min(count, items.length); i < len; i++) {
^
TypeError: Cannot read property 'length' of undefined
at processContent (/usr/local/lib/node_modules/mediumcli/lib/post.js:71:45)
at /usr/local/lib/node_modules/mediumcli/lib/post.js:128:15
at Request._callback (/usr/local/lib/node_modules/mediumcli/lib/post.js:29:4)
at Request.self.callback (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1091:12)
at IncomingMessage.g (events.js:291:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)`
medium read https://python.plainenglish.io/from-googles-coding-desks-to-yours-10-python-secrets-for-success-792dc03d765e
(node:91710) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
Unhandled rejection TypeError: Cannot read properties of undefined (reading 'call')
at new StringStream (/opt/homebrew/lib/node_modules/mediumcli/node_modules/string-stream/index.js:5:17)
at printArticle (/opt/homebrew/lib/node_modules/mediumcli/lib/reader.js:37:19)
at /opt/homebrew/lib/node_modules/mediumcli/lib/reader.js:62:47
at tryCatcher (/opt/homebrew/lib/node_modules/mediumcli/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/opt/homebrew/lib/node_modules/mediumcli/node_modules/bluebird/js/main/promise.js:510:31)
at Promise._settlePromiseAt (/opt/homebrew/lib/node_modules/mediumcli/node_modules/bluebird/js/main/promise.js:584:18)
at Promise._settlePromises (/opt/homebrew/lib/node_modules/mediumcli/node_modules/bluebird/js/main/promise.js:700:14)
at Async._drainQueue (/opt/homebrew/lib/node_modules/mediumcli/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/opt/homebrew/lib/node_modules/mediumcli/node_modules/bluebird/js/main/async.js:133:10)
at Async.drainQueues [as _onImmediate] (/opt/homebrew/lib/node_modules/mediumcli/node_modules/bluebird/js/main/async.js:15:14)
at process.processImmediate (node:internal/timers:478:21)
Right now, medium open <url>
is only useful if the user already knows the url, so they'd have to google for it first.
Maybe it works better as an option instead:
medium top --open
medium tag node -o
# whatever article the user selects becomes the url for the `open` function
undefined:1
<!DOCTYPE html><html xmlns:cc="http://creativecommons.org/ns#"><head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# medium-com: http://ogp.me/ns/fb/medium-com#"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=contain"><title>Popular on Medium – Medium</title><link rel="canonical" href="https://medium.com/topic/popular"><link id="feedLink" rel="alternate" type="application/rss+xml" title="RSS" href="https://medium.com/feed/topic/popular"><meta name="title" content="Popular on Medium – Medium"><meta name="referrer" content="unsafe-url"><meta name="description" content="Popular on Medium on Medium: What’s trending on Medium right now."><meta name="theme-color" content="#000000"><meta property="og:title" content="Popular on Medium – Medium"><meta property="og:url" content="https://medium.com/topic/popular"><meta property="og:image" content="https://cdn-images-1.medium.com/max/1200/1*
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Request._callback (/usr/local/lib/node_modules/mediumcli/lib/post.js:28:20)
at Request.self.callback (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:186:22)
at Request.emit (events.js:180:13)
at Request.<anonymous> (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1163:10)
at Request.emit (events.js:180:13)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:272:13)
at IncomingMessage.emit (events.js:185:15)
at endReadableNT (_stream_readable.js:1106:12)
at process._tickCallback (internal/process/next_tick.js:114:19)
Also I added the /latest path
On Medium you can search by tags: 'https://medium.com/tag/startups'
Create an option to search by tags. example usage: medium --tag (-t) startups
Or change medium top
and medium open
to --top
|| -t
--open
|| -o
-b
--browser
and then allow search of tags like so: medium startups
medium productivity
Definitely open to feedback on how this should work or how you would like it to work.
Running medium-cli on a RaspberryPI 3, latest Raspbian, through a vintage vt100 terminal. Running 'medium top' displays everything in pure html. Is it possible to have the titles translated/rendered as plain text?
Using latest nodejs 15 and npm 7.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.