SlideShare une entreprise Scribd logo
1  sur  34
240          115
260          126
280          137
300          148


2.1    Right-Align Degrees
Prefer 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 Project



QUICKLY create a website and HTML documentation
including tutorials and reference guides for your project.
2. Help Your Users


Make sure your documentation is CORRECT, easily ITERATE
it based on user feedback, help your users make the most of
your software.
3. Improve Your Game


Write about your code. Writing literate documentation
improves 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 Involved


Write about other people’s code. This is the best way to learn
about a new library or language, and contributing
documentation 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 Yourself


Blog about what you do, share your experiences with the rest
of the community. Dexy supports WordPress, Tumblr and
Posterous already and should be able to work with any
blogging API.
7. Write Productively


Dexy helps you write reports and articles QUICKLY, write
source code using your favourite text editor or IDE, pull in
snippets and transcripts, you’ll be amazed at how quickly it
comes together.
8. Keep it Current


Writing your documentation in Dexy makes it easy to
MAINTAIN in the long term. Don’t waste your time writing
documentation that’s going to go out of date.
9. Learn


Keep a coding journal as you learn new languages or
techniques, easily refer back to earlier examples and track
your progress as you learn.
10. Earn



Use Dexy to create marketable content like books, training
courses 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
Caching
Source File Contents         R
 Source File Name
 Filter Source Code
Previous Filter Steps




  538d7311081c973640652e4a8d47b902.Rout
Dependencies

      R       Pygments
                                             Jinja
 .R         .Rout    .html
                                     .html           .html

       Python       Pygments

      .py       .pyout       .html
Techniques
Templating

Dynamic 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 templating
systems will be added.

Probably will be a system of core utilities available to
template systems (e.g. random filename generation).
Sectioning

boring boilerplate setup code and imports
### @export “cool-stuff”
really interesting cool stuff
### @export “more-cool-stuff”
even more cool stuff
### @end
boring teardown code
JSON


Data written to JSON files is made available as a dict. Great
place 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.
Subprocess


Non-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 .
Output


logs/dexy.log

artifacts/

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 of
documentation, reusing the same code snippets if you want,
so take advantage of this.
Slides for talk given at OSSBarCamp on 26
September 2010 by Ana Nelson.

Slides are licensed as   http://creativecommons.org/licenses/by/3.0/   so feel
free to re-use with attribution.

Visit http://blog.dexy.it for more information, or
contact me ana@ananelson.com

Contenu connexe

En vedette (8)

Dexy on rails
Dexy on railsDexy on rails
Dexy on rails
 
нэг
нэгнэг
нэг
 
NAVIDAD BAMBOO 2011
NAVIDAD BAMBOO 2011NAVIDAD BAMBOO 2011
NAVIDAD BAMBOO 2011
 
Előadás az okkultizmusról
Előadás az okkultizmusrólElőadás az okkultizmusról
Előadás az okkultizmusról
 
Refresh Austin - Intro to Dexy
Refresh Austin - Intro to DexyRefresh Austin - Intro to Dexy
Refresh Austin - Intro to Dexy
 
2009 a Kispesti Baptista Gyülekezetben
2009 a Kispesti Baptista Gyülekezetben2009 a Kispesti Baptista Gyülekezetben
2009 a Kispesti Baptista Gyülekezetben
 
Testvérek a Bibliában
Testvérek a BibliábanTestvérek a Bibliában
Testvérek a Bibliában
 
Durkó Anett előadása
Durkó Anett előadásaDurkó Anett előadása
Durkó Anett előadása
 

Similaire à OSSBarCamp Talk on Dexy

Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014
Joseph Gentle
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
kannikadg
 

Similaire à OSSBarCamp Talk on Dexy (20)

Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014
 
The future will be Realtime & Collaborative
The future will be Realtime & CollaborativeThe future will be Realtime & Collaborative
The future will be Realtime & Collaborative
 
H2O World - Intro to R, Python, and Flow - Amy Wang
H2O World - Intro to R, Python, and Flow - Amy WangH2O World - Intro to R, Python, and Flow - Amy Wang
H2O World - Intro to R, Python, and Flow - Amy Wang
 
maXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazinemaXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_Magazine
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 
maXbox starter30 Web of Things
maXbox starter30 Web of ThingsmaXbox starter30 Web of Things
maXbox starter30 Web of Things
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
Kohana 3.2 documentation
Kohana 3.2 documentationKohana 3.2 documentation
Kohana 3.2 documentation
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
 
Intro
IntroIntro
Intro
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - Intro
 
Python and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data management
 
Next .NET and C#
Next .NET and C#Next .NET and C#
Next .NET and C#
 
Python tools for testing web services over HTTP
Python tools for testing web services over HTTPPython tools for testing web services over HTTP
Python tools for testing web services over HTTP
 
Book
BookBook
Book
 
Maxbox starter18
Maxbox starter18Maxbox starter18
Maxbox starter18
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
 
DV10 HTML5: The Future of Web Development
DV10 HTML5: The Future of Web Development DV10 HTML5: The Future of Web Development
DV10 HTML5: The Future of Web Development
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

OSSBarCamp Talk on Dexy

  • 1. 240 115 260 126 280 137 300 148 2.1 Right-Align Degrees Prefer 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.
  • 3. 1. Promote Your Project QUICKLY create a website and HTML documentation including tutorials and reference guides for your project.
  • 4. 2. Help Your Users Make sure your documentation is CORRECT, easily ITERATE it based on user feedback, help your users make the most of your software.
  • 5. 3. Improve Your Game Write about your code. Writing literate documentation improves your code. If you can’t explain your code in words, or if it looks ugly on the page, you need to refactor it.
  • 6. 4. Get Involved Write about other people’s code. This is the best way to learn about a new library or language, and contributing documentation will get your foot in the door.
  • 7. 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.
  • 8. 6. Express Yourself Blog about what you do, share your experiences with the rest of the community. Dexy supports WordPress, Tumblr and Posterous already and should be able to work with any blogging API.
  • 9. 7. Write Productively Dexy helps you write reports and articles QUICKLY, write source code using your favourite text editor or IDE, pull in snippets and transcripts, you’ll be amazed at how quickly it comes together.
  • 10. 8. Keep it Current Writing your documentation in Dexy makes it easy to MAINTAIN in the long term. Don’t waste your time writing documentation that’s going to go out of date.
  • 11. 9. Learn Keep a coding journal as you learn new languages or techniques, easily refer back to earlier examples and track your progress as you learn.
  • 12. 10. Earn Use Dexy to create marketable content like books, training courses and consulting reports.
  • 14. Filters Textile .textile .html
  • 15. Filters clang .c .txt
  • 16. Filters LaTeX .tex .pdf
  • 17. Filters R .R .Rout
  • 18. Filters Jinja R Pygments .R .R .Rout .html
  • 19. Caching Source File Contents R Source File Name Filter Source Code Previous Filter Steps 538d7311081c973640652e4a8d47b902.Rout
  • 20. Dependencies R Pygments Jinja .R .Rout .html .html .html Python Pygments .py .pyout .html
  • 22. Templating Dynamic 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 templating systems will be added. Probably will be a system of core utilities available to template systems (e.g. random filename generation).
  • 23. Sectioning boring boilerplate setup code and imports ### @export “cool-stuff” really interesting cool stuff ### @export “more-cool-stuff” even more cool stuff ### @end boring teardown code
  • 24. JSON Data written to JSON files is made available as a dict. Great place to store { ‘mean-of-population’ : 5.5, ‘stdev-of- population’ : 1.2} for easy {{ a[‘stats-data’][‘mean-of- population’] }} retrieval later.
  • 26. 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.
  • 27. Subprocess Non-Python code is handled using pexpect (linux/mac only). Working on subprocess() support in Windows. Windows users encouraged to run Dexy in Linux VM.
  • 29. 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" : {}, }
  • 30. Run Dexy dexy .
  • 33. 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 of documentation, reusing the same code snippets if you want, so take advantage of this.
  • 34. Slides for talk given at OSSBarCamp on 26 September 2010 by Ana Nelson. Slides are licensed as http://creativecommons.org/licenses/by/3.0/ so feel free to re-use with attribution. Visit http://blog.dexy.it for more information, or contact me ana@ananelson.com

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n