Skip to content

csquared/devcenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devcenter

you might be looking for The Dev Center

devcenter is a command line tool that makes it possible to easily pull and edit a Heroku Dev Center article locally and then push that article to the Dev Center

once the article has been downloaded (or written from scratch) you can import subfiles

install

until we have a better way

$ gem source -a http://anything:[email protected]
$ gem install devcenter

usage

compile

compile an article to STDOUT from a top file and imported subfiles

$ devcenter compile article.txt

push

compile an article and send and it to the devcenter

$ devcenter push article.txt --article.title='My Title' 

$ DEVCENTER_URL=http://localhost:3000 devcenter push article.txt 

use the open flag to open the article in your browser

$ devcenter push article.txt --open 

pull

write an article to STDOUT from the devcenter

$ devcenter pull article.txt --article.title='My Title'

push and pull will prompt for your devcenter login

  • google apps auth not supported yet

article.yml

push and pull will also write the article metadata to article.yml and use that info for subsequent requests

command line arguments --article.attribute will override and replace what is in article.yml

import

compile uses the !import call to import other files

push compiles the article on the fly

Given 'filename' is a file that contains "hello, world"

a file with

!import(filename)

becomes

hello, world

a file with

!import(filename.rb)

becomes

:::ruby
hello, world

and a file with

!import(filename, syntax)

becomes

:::syntax
hello, world
  • file locations are relative
  • indentation is preserved
  • syntax highlighting is detected by filename

Todo

  • better authentication
  • have devcenter be a real API

About

Gem for locally working with Heroku Dev Center

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages