Answer the question
In order to leave comments, you need to log in
What is the best way to store sample text?
Hello!
It is necessary to write a program that would generate text from a set of previously prepared pieces, in which some words will need to be changed, and pieces of text combined with each other.
It looks like the generation of the text of the contract, where the script itself will substitute the details and form the clauses of the contract based on pre-prepared pieces of text.
The question is, what is the best way to store these chunks of text?
Of the options, I thought to use ordinary txt files, or sql tables ... How to do this in the easiest and most correct way? Preferably with the possibility of adding new texts.
Answer the question
In order to leave comments, you need to log in
It seems to me that files are more convenient in your case. Look towards templates . e.g. Jinja
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question