Catmandu Documentation Jakob Vo Verbundzentrale des GBV (VZG) - - PowerPoint PPT Presentation

catmandu documentation
SMART_READER_LITE
LIVE PREVIEW

Catmandu Documentation Jakob Vo Verbundzentrale des GBV (VZG) - - PowerPoint PPT Presentation

Catmandu Documentation Jakob Vo Verbundzentrale des GBV (VZG) CatmanduCon 2016, Staatsbibliothek zu Berlin, 2016-04-11 1 Catmandu Documentation, 2016-04-11 Documentation? 2 Catmandu Documentation, 2016-04-11 Documentation matters


slide-1
SLIDE 1

Catmandu Documentation, 2016-04-11

1

Catmandu Documentation

Jakob Voß

Verbundzentrale des GBV (VZG)

CatmanduCon 2016, Staatsbibliothek zu Berlin, 2016-04-11

slide-2
SLIDE 2

Catmandu Documentation, 2016-04-11

2

Documentation?

slide-3
SLIDE 3

Catmandu Documentation, 2016-04-11

3

Documentation matters

Usability or people will not try or give up the tools Quality writing good documentation is part of testing If it’s difficult to explain easy, the design is flawed!

slide-4
SLIDE 4

Catmandu Documentation, 2016-04-11

4

Need a manual?

https://xkcd.com/1343/

slide-5
SLIDE 5

Catmandu Documentation, 2016-04-11

5

Where’s the Catmandu documentation?

◮ Module POD ⇒ MetaCPAN, perldoc. . . ◮ Help and error messages (catmandu help) ◮ Project homepage http://librecat.org/ ◮ Presentation slides, articles, handouts. . . ◮ Answers at mailing list, StackOverflow, Twitter. . . ◮ Projects that make use of Catmandu

slide-6
SLIDE 6

Catmandu Documentation, 2016-04-11

6

Audience

slide-7
SLIDE 7

Catmandu Documentation, 2016-04-11

7

Who reads our documentation?

◮ There is not “the user” but different user groups ◮ “Personas” help focus writing for user groups ◮ Good personas are based on research (surveys etc.) ◮ Good personas have a detailled description each

slide-8
SLIDE 8

Catmandu Documentation, 2016-04-11

8

Some possible personas

◮ Just another Perl hacker ◮ perl-agnostic programmer ◮ IT admin with basic copy-and-paste scripting skills ◮ data conversion specialist with preference for GUIs ◮ non-technical interested in data science & research data ◮ . . .

slide-9
SLIDE 9

Catmandu Documentation, 2016-04-11

9

Avoid assumptions about the audience!

◮ general programming skills ◮ knowledge of Perl and/or command line fu ◮ English language ◮ cultural background ◮ patience and short-term memory ◮ . . .

slide-10
SLIDE 10

Catmandu Documentation, 2016-04-11

10

Managing Catmandu documentation

slide-11
SLIDE 11

Catmandu Documentation, 2016-04-11

11

Current documentation

document sources MetaCPAN POD catmandu help source code & POD error messages source code http://librecat.org/Catmandu/ GitHub Wiki http://librecat.org/distributions.html MetaCPAN & APIs . . . . . .

slide-12
SLIDE 12

Catmandu Documentation, 2016-04-11

12

POD conversions

◮ MetaCPAN (→ specific HTML) ◮ Catmandu::Util::pod section (→ CLI)

catmandu info catmandu help $COMMAND catmandu import|export|store|copy|fix $NAME

◮ NAME ◮ DESCRIPTION ◮ EXAMPLES ◮ CONFIGURATION (list of options)

◮ Pod::Simple::Pandoc (→ any HTML, PDF. . . )

slide-13
SLIDE 13

Catmandu Documentation, 2016-04-11

13

Introducing the Pandoc Abstract Syntax Tree (AST)

◮ Pandoc (1.16 or at least 1.12) ◮ Pandoc::Elements (see its POD for details) ◮ pandoc -t json < $(MARKDOWNFILE).md1 → AST ◮ pod2pandoc $(MODULE).pm → AST ◮ pandoc -f json ... < $(AST).json → HTML

Example: =head1 Foo ⇒ Header 1, [ Str "Foo" ] ⇒ BulletList [ Plain [ Str "Foo" ] ] ⇒ <li>Foo</li> (or list item in LaTeX/PDF)

1for instance GitHub Wiki page

slide-14
SLIDE 14

Catmandu Documentation, 2016-04-11

14

Documentation content flow

MAGIC Mix & modify content from multiple documents

slide-15
SLIDE 15

Catmandu Documentation, 2016-04-11

15

Outlook

slide-16
SLIDE 16

Catmandu Documentation, 2016-04-11

16

Summary

◮ Writing great documentation for fun and profit ◮ Mind the audience ◮ POD content can be reused ◮ Combine documents with Pandoc::Elements

slide-17
SLIDE 17

Catmandu Documentation, 2016-04-11

17

Suggestions to improve Catmandu documentation

◮ Redesign homepage http://librecat.org/ ◮ Include catmandu help alike for all commands? ◮ Collect publications (slides, papers..) in a repository:

(Zenodo) with “Catmandu” group ⇒ DOI, OAI-PMH

◮ Catmandu::Test::Documentation to check POD of modules ◮ Create Catmandu glossary with explanation of basic concepts2

(item, fix, format, importer. . . )

◮ Improve Catmandu::Cmd::help ◮ Create Fix language syntax highlighting rules for common

editors/frameworks (vim, emacs, Kate, CodeMirror. . . )

◮ Get familiar with Pandoc ◮ Catmandu, the book!

2= modules

slide-18
SLIDE 18

Catmandu Documentation, 2016-04-11

18

This slides as an example

◮ Written in Pandoc Markdown ◮ Source: https://github.com/jakobib/catmanducon2016 ◮ Full conversion command:

pandoc --smart --standalone

  • t beamer --slide-level 2
  • -template vzg-slides.tex
  • o slides.pdf slides.md

◮ Archived at Zenodo:

http://dx.doi.org/10.5281/zenodo.49439 https://zenodo.org/collection/user-catmandu catmandu convert OAI --url https://zenodo.org/oai2d

  • -set user-catmandu --metadataPrefix oai datacite3