configlet का दूसरा उपयोग दस्तावेज़ बनाना है।
generate कमांड की मदद से टेम्पलेट से निर्देश/परिचय दस्तावेज़ बनाए जा सकते हैं।
configlet [global-options] generate
Global options:
-h, --help Show this help message and exit
--version Show this tool's version information and exit
-t, --track-dir <dir> Specify a track directory to use instead of the current directory
-v, --verbosity <verbosity> The verbosity of output. Allowed values: q[uiet], n[ormal], d[etailed]
ये वे दस्तावेज़ हैं जो configlet बना सकता है।
हर कॉन्सेप्ट अभ्यास में एक introduction.md फाइल होती है। हर अभ्यास में वैकल्पिक रूप से एक introduction.md.tpl फाइल भी हो सकती है।
टेम्पलेट फाइल को एक सामान्य Markdown फाइल की तरह ही माना जाना चाहिए, बस एक अतिरिक्त बात के साथ: प्लेसहोल्डर लिख पाने की सुविधा। इन प्लेसहोल्डर का समर्थन किया जाता है:
%{concept:<slug>}: कॉन्सेप्ट के introduction.md दस्तावेज़ को दर्शाता हैजब configlet पाता है कि किसी कॉन्सेप्ट अभ्यास में introduction.md.tpl फाइल है, तो वह उससे एक introduction.md फाइल बनाता है। बनाए गए परिचय की सामग्री टेम्पलेट जैसी ही होती है, सिवाय प्लेसहोल्डर के, जिन्हें उन दस्तावेज़ों की सामग्री से बदल दिया जाता है जिन्हें वे दर्शाते हैं।
जब configlet पाता है कि कोई प्रैक्टिस अभ्यास ऐसे Problem Specifications Exercise को लागू करता है जिसमें introduction.md फाइल है, तो configlet प्रैक्टिस अभ्यास की .meta/introduction.md फाइल को उस Problem Specification Exercise की introduction.md फाइल के साथ सिंक कर देता है।
जब configlet पाता है कि कोई प्रैक्टिस अभ्यास Problem Specifications Exercise को लागू करता है, तो configlet प्रैक्टिस अभ्यास की .meta/instructions.md फाइल को उस Problem Specifications Exercise की instructions.md फाइल के साथ सिंक कर देता है, या जब कोई instructions.md फाइल न मिले तो उसकी description.md फाइल के साथ।
जब configlet पाता है कि कोई प्रैक्टिस अभ्यास Problem Specifications Exercise को लागू करता है, तो configlet उस Problem Specification Exercise की metadata.yml फाइल से source और source_url कीज़ को प्रैक्टिस अभ्यास की .meta/config.json फाइल में मौजूद source और source_url प्रॉपर्टी के साथ सिंक कर देता है।