This problem relate with other my question here . I found a solution with pdfpages package thanks to TX.SX:
\documentclass[]{scrbook}
\usepackage{authblk}
\usepackage{pdfpages}
\newcommand{\insertpaper}[4]%
{ % Syntax: \insertmydocument{Toc level}{Title}{Subtitle}{File}
% Requires: tocloft hyperref pdfpages
\newpage
\phantomsection
\cftaddtitleline{toc}{#1}{#2}{\thepage}
\cftchapterprecistoc{#3}
\includepdf[pages=-, pagecommand={\pagestyle{plain}}]{#4}
}
\begin{document}
\tableofcontents
\insertpaper{chapter}{Title o the 1st paper}{A.U. Thor11, A.U. Thor12}{paper1.pdf}
\insertpaper{chapter}{Title o the 2nd paper}{A.U. Thor21, A.U. Thor22}{paper2.pdf}
\end{document}
For production conference proceedings, I use pdfpages, as shown in example with LuaLaTeX. The macro \insertpaper adds a titles and authors of the papers in TOC. But for doing this, I manually write a desirable fields (e.g. title and authors) of the PDF. My papers (PDFs) also created by LuaLaTeX with scrartcl class and with authblk package for creating author and affiliations. Now my idea is not to manually fill corresponding fields, but read them from a file. That is, before paper.tex should write desirable fields into appropriate file.
It would be nice if the \insertpaper would have only one parameter filename and information about the required fields read from the appropriate information file.
Thus, I need some help for creation such procedures with Lua (desirable) or LaTeX3 or something else.
I found a some solution how to read the data
\documentclass{scrartcl}
\usepackage{luatextra}
\usepackage{filecontents}
\begin{filecontents}{testdata.dat}
Title of the page
A.U. Thor1
A.U. Thor2
\end{filecontents}
\begin{luacode}
function readtxt()
file = io.open("testdata.dat", "r")
for line in file:lines() do
tex.print(line.."\\\\")
end
end
\end{luacode}
\begin{document}
\directlua{readtxt()}
\end{document}
but I have no idea how to substitude the data into desirable command, \insertpaper for example.

tocloftwith KOMA. – Johannes_B Jan 16 '15 at 16:50