|
>
|
book_name := "eBookSample":
|
>
|
book := NewBook(book_name, "eBook Sample Book", "Maplesoft, a division of Waterloo Maple Inc.", "2012"):
|
>
|
AddChapter(book, "preface", cat(kernelopts('datadir'), "/eBookTools/Preface.mw")):
|
>
|
AddChapter(book, 1, cat(kernelopts('datadir'), "/eBookTools/GettingStartedWithMaple.mw")):
|
生成されたワークシートを hdb に格納します。
>
|
settings := table(["mpl.mw.hyperlink" = "help"] ):
|
>
|
CreateMW(book, settings);
|
>
|
mw_dir := cat(GetDefaultOutputDir(), "/mw/", book_name);
|
>
|
ds := kernelopts('dirsep'):
|
>
|
hdb_dir := cat(kernelopts('homedir'), ds, "maple", ds, "toolbox", ds, "16", ds, "eBookTools", ds, lib);
|
>
|
if not Exists(hdb_dir) then
MakeDirectory(hdb_dir, 'recurse' = true);
end if;
|
>
|
hdb := cat(hdb_dir, ds, "StdWs", book_name, ".hdb");
|
>
|
for f in ListDirectory(mw_dir, 'returnonly'="*.mw") do
topic := cat(book_name, ",", substring(f, 1..-4)):
try
INTERFACE_HELP(delete, 'topic'=topic, 'library'=hdb);
catch:
end try;
INTERFACE_HELP(insert, 'topic'=topic, 'text' = TEXT(FileTools:-Text:-ReadFile(cat(mw_dir, ds, f))), 'library'=hdb);
end do;
|
|