Develop a Python script that can generate various types of sample documents for testing purposes, and also can be of different sizes.
Features:
Generate sample documents of different formats (e.g., text, CSV, JSON, XML, PDF, DOCX etc.).
Allow customization of document content and structure.
Provide options for specifying the output directory and file names.
Example Usage:
# Example usage of the sample document generator script
import sample_doc_generator
# Generate a sample text document
sample_doc_generator.generate_text_document("sample.txt")
# Generate a sample CSV document
sample_doc_generator.generate_csv("sample.csv")
# Generate a sample JSON document
sample_doc_generator.generate_json("sample.json")
# Generate a sample XML document
sample_doc_generator.generate_xml("sample.xml")
Difficulty: Beginner/Intermediate
Tags: Python, Document Generation, Testing
Additional Information:
Consider using appropriate libraries for generating different document formats (e.g., csv for CSV, json for JSON, etc.).
Provide options for customizing the content and structure of generated documents.
Objective:
Develop a Python script that can generate various types of sample documents for testing purposes, and also can be of different sizes.
Features:
Example Usage:
Difficulty
: Beginner/IntermediateTags
: Python, Document Generation, TestingAdditional Information:
Contribution Guidelines
The updated guidelines can be found here.
Note:
folder_name
: sample_doc_generatorscript_name
: sample_doc_generator