I would like to create a book (to be exact a psalter). Basically it is a database issue. I have on one hand a tex document (to be exact currently it's still a word document) with all the psalms and on the other the book I want where I want to insert selected psalm from the first document. I don't know how to start to keep it simple. I look to datatool but can a psalm be an entry ? Or Should a create a document for each psalm that will be called ? If yes, how can I do it quickly ? Can I call the psalm base on its title in the document containing all the psalm ?
A database can contain whatever you want as data associated to a key. Even a longish text. Just need a database (-style package, you presumably just have a single key --psalm number/name-- and associated data --text--) package to handles that.
The Linux (BSD original, some work on porting to other platforms)
strfile(1) utility (part of fortune-mod here) takes files made of paragraphs and creates a file indexed with the paragraphs for random access, you'd need to hack it to add a key. It could give some inspiration.
Or kludge up a script in some scripting language that reads text with some marker like
%% identifier lines, and reads a file containing something like:
identifier1 Lorem ispum dolor sit amet, ... % identifier2 Sed ut perspiciatis unde omnis iste natus error sit...
looks up the identifier and replaces by the following text.