• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
OSSBarCamp Talk on Dexy
 

OSSBarCamp Talk on Dexy

on

  • 1,615 views

 

Statistics

Views

Total Views
1,615
Views on SlideShare
1,242
Embed Views
373

Actions

Likes
0
Downloads
8
Comments
0

4 Embeds 373

http://blog.dexy.it 370
http://twitter.com 1
http://static.slidesharecdn.com 1
http://webcache.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

OSSBarCamp Talk on Dexy OSSBarCamp Talk on Dexy Presentation Transcript

  • 240 115260 126280 137300 1482.1 Right-Align DegreesPrefer right-aligning the columns.#include <stdio.h>/* print Fahrenheit-Celsius table * for fahr = 0, 20, ..., 300 */main(){ int fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; fahr = lower; while (fahr <= upper) { celsius = 5 * (fahr-32)/9; printf( " % 4d t %4d n " , fahr, celsius); fahr = fahr + step; }} 0 -17 20 -6 40 4 60 15 80 26 100 37 120 48 140 60 160 71 180 82 Dexy Makes You Awesome 200 93 2 How Dexy can help you and your projects succeed.
  • 10 Ways
  • 1. Promote Your ProjectQUICKLY create a website and HTML documentationincluding tutorials and reference guides for your project.
  • 2. Help Your UsersMake sure your documentation is CORRECT, easily ITERATEit based on user feedback, help your users make the most ofyour software.
  • 3. Improve Your GameWrite about your code. Writing literate documentationimproves your code. If you can’t explain your code in words,or if it looks ugly on the page, you need to refactor it.
  • 4. Get InvolvedWrite about other people’s code. This is the best way to learnabout a new library or language, and contributingdocumentation will get your foot in the door.
  • 5. Contribute with Confidence Nervous about starting to contribute to open source projects? Explain your patch in words, send this along with your patch. You’ll feel more confident, and so will the recipient.
  • 6. Express YourselfBlog about what you do, share your experiences with the restof the community. Dexy supports WordPress, Tumblr andPosterous already and should be able to work with anyblogging API.
  • 7. Write ProductivelyDexy helps you write reports and articles QUICKLY, writesource code using your favourite text editor or IDE, pull insnippets and transcripts, you’ll be amazed at how quickly itcomes together.
  • 8. Keep it CurrentWriting your documentation in Dexy makes it easy toMAINTAIN in the long term. Don’t waste your time writingdocumentation that’s going to go out of date.
  • 9. LearnKeep a coding journal as you learn new languages ortechniques, easily refer back to earlier examples and trackyour progress as you learn.
  • 10. EarnUse Dexy to create marketable content like books, trainingcourses and consulting reports.
  • 3 Ingredients
  • Filters Textile .textile .html
  • Filters clang .c .txt
  • Filters LaTeX .tex .pdf
  • Filters R .R .Rout
  • Filters Jinja R Pygments .R .R .Rout .html
  • CachingSource File Contents R Source File Name Filter Source CodePrevious Filter Steps 538d7311081c973640652e4a8d47b902.Rout
  • Dependencies R Pygments Jinja .R .Rout .html .html .html Python Pygments .py .pyout .html
  • Techniques
  • TemplatingDynamic documents {{ a[‘first’] }} a way to {{ a[‘second’]}}dynamic {{ a[‘third’] }}.a = {‘first’ : ‘need’, ‘second’ : ‘insert’, ‘third’ : ‘data’}Dexy has support for Jinja2 for now, but more templatingsystems will be added.Probably will be a system of core utilities available totemplate systems (e.g. random filename generation).
  • Sectioningboring boilerplate setup code and imports### @export “cool-stuff”really interesting cool stuff### @export “more-cool-stuff”even more cool stuff### @endboring teardown code
  • JSONData written to JSON files is made available as a dict. Greatplace to store { ‘mean-of-population’ : 5.5, ‘stdev-of-population’ : 1.2} for easy {{ a[‘stats-data’][‘mean-of-population’] }} retrieval later.
  • Filters
  • Writing Filters Can be as easy as: def process_text(self, input_text): # do stuff return modified_input_text or as sophisticated as you need. It’s shockingly easy to do complex things with Dexy filters.
  • SubprocessNon-Python code is handled using pexpect (linux/mac only).Working on subprocess() support in Windows.Windows users encouraged to run Dexy in Linux VM.
  • Running Dexy
  • Configure Dexy{ "index.html|jinja|wp" : { "allinputs" : true }, "index.txt|jinja|textile|wp" : { "allinputs" : true }, "post.json|dexy" : {}, "*.c|c" : {}, "*.c|pyg" : {}, "*.py|py" : {}, "*.py|pyg" : {}, "*.py|idio" : {}, "*.R|jinja|r|pyg" : {}, "*.R|pyg" : {}, "*.txt|dexy" : {},}
  • Run Dexy dexy .
  • Outputlogs/dexy.logartifacts/cache/
  • Important Idea
  • What documentation?What kind of documentation you are writing?Reference documentation is not the same as tutorials.Developer docs are not the same as user docs.Please do not document via source code comments.Dexy makes it easy to write many different kinds ofdocumentation, reusing the same code snippets if you want,so take advantage of this.
  • Slides for talk given at OSSBarCamp on 26September 2010 by Ana Nelson.Slides are licensed as http://creativecommons.org/licenses/by/3.0/ so feelfree to re-use with attribution.Visit http://blog.dexy.it for more information, orcontact me ana@ananelson.com