Pubblico: publish a markdown file as Medium post from the command line
an easy way to post on Medium with markdown files
getting started
pubblico
requires node>=7
you can install it globally
yarn global add pubblico
//or
npm i -g pubblico
or in a project
yarn add pubblico
//or
npm i --save-dev pubblico
usage
pubblico --src [PATH_TO_MARKDOWN_FILE] --medium-api-token [YOUR_TOKEN] --title [TITLE] --tags [TAGS] --publication [PUBLICATION]
TAGS
shall be comma-separated and can be maximum five- If omitted, parameters are read throuhg a
.pubblicorc
json file, where it is especially convenient to store the Medium token and the publication name.
To get a token click here.
options
You can pass options inline or storing them in a .pubblicorc
json file, located in the folder where you are calling the command
src
specify path of the file you want to post. REQUIREDmediumApiToken
get it here). REQUIREDpublish
The post will be submitted as draft. You can specify-publish
to post it as unlisted.title
the title of the post, it defaults to'Pubblico'
. NOT REQUIRED BUT RECOMMENDEDtags
comma separated tags, default to 'test, pubblico'. NOT REQUIRED BUT RECOMMENDEDpersonal
if you specify a publication in the.pubblicorc
,pubblico
will try to post in that publication, use-personal
to overridepublication
if you don't specify a publication in the config, or if you want to override it, use-publication publication-name
disclaimer
it doesn't basically handle errors at the moment, so just be nice :)