Commit a17f2a1f authored by AP matsuo koji's avatar AP matsuo koji 😲

cli 1

parent 6873e93e
ifndef::_CONFIG_ADOC[] ifndef::_CONFIG_ADOC[]
// INCLUDE GUARD // INCLUDE GUARD
:_CONFIG_ADOC: IncludeGuard :_CONFIG_ADOC: IncludeGuard
//
////
[コメント開始]
各種事前定義 ここでは最低限必要なものだけ定義、一覧説明をコメントブロックで記載しておく
定義が不要なら、//でコメントアウト、adoc毎に!(びっくりマーク)を追加すればよい
例. :sectnums!:
[コメント終了]
////
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
//
// 事前定義 // 事前定義
:doctype: article ifndef::UserConfigEnd[]
:toclevels: 3 :toc: left
:sectnums: :sectnums:
:sectnumlevels: 4 endif::UserConfigEnd[]
:sectlinks:
:icons: font
//[イメージのパスを指定] //[イメージのパスを指定]
:imagesdir: Images :imagesdir: Images
// :lang: ja
ifeval::["{lang}" == "ja"] ifeval::["{lang}" == "ja"]
:toc-title: 目次 :toc-title: 目次
:example-caption: :example-caption:
...@@ -44,108 +31,303 @@ ifeval::["{lang}" == "ja"] ...@@ -44,108 +31,303 @@ ifeval::["{lang}" == "ja"]
:untitled-label: 無題 :untitled-label: 無題
:version-label: バージョン :version-label: バージョン
endif::[] endif::[]
// ここまで空白行禁止(tocが表示されない)
ifeval::["{lang}" != "ja"]
:example-caption:
:caption:
endif::[]
// HTML出力で画像を埋め込む // HTML出力で画像を埋め込む
:data-uri: :data-uri:
// 各種Macro拡張 // 各種Macro拡張
:hardbreaks: :hardbreaks:
:experimental: :experimental:
// ExtendStyleは常に有効とする。定義して、もう実行しておく。互換性:何回呼ばれても大丈夫。
// Style拡張 [.XXXX]##hogehoge##で使用できる。{ExtendStyle}を表題の直前に記述する :ExtendStyle: pass:none[<style>.nw{display:inline-block;white-space:pre;} .nowrap{display:inline-block;white-space:pre;}</style>]
// 属性の前に記載してはいけない。toc: leftなどが無効になる {ExtendStyle}
// 拡張: [.nw]## <自動改行無効、複数空白文字OK> ## .nowrapでもOK。Tableの表幅調整に使用
:ExtendStyle: pass:none[ \
<style> \
.nw{display:inline-block;white-space:pre;} \
.nowrap{display:inline-block;white-space:pre;} \
</style>]
// Page幅を無効にする // Page幅を無効にする
:FreePage: pass:none[ <style> #header,#content,#footnotes,#footer{max-width:none;} </style>]
// obsolate ifdef::FreePage[]
:NoWrap: pass:[<span style="display:inline-block;white-space:pre;">] +++<style>#header,#content,#footnotes,#footer{max-width:none;}</style>+++
:Wrap: pass:[<span style="display:inline;white-space:pre;">] endif::FreePage[]
:End: pass:[</span>] // 互換性:{FreePage}がConfigより後で定義された場合は、互換性ため{FreePage}を定義する
ifndef::FreePage[]
:FreePage: pass:none[<style>#header,#content,#footnotes,#footer{max-width:none;}</style>]
endif::FreePage[]
// 改行 {br} // ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ css差分
:br: pass:p[ +] ++++
<style>
/* 基本的な書式 */
body {
color: black;
font-family: "ヒラギノ角ゴ ProN W3",monospace;
font-size: 100%;
}
/* 最初のタイトル変更
*/
#content>h1:first-child:not([class]) {
color: black;
font-family: "Yu Mincho",serif;
border-bottom: 2px solid black;/*#ddddd8;*/
font-weight: 500;
font-size: 2rem;
}
/* タイトルのリンク系をリセット
*/
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,
h4>a.link,h5>a.link,h6>a.link {
color: inherit;
}
/* 各種ヘッダのベース
*/
#content h2,h3,h4,h5,h6 {
color: black;
font-family: "Yu Mincho",serif;
font-weight: bold;
/* 下線 */
text-decoration-line: underline;
text-underline-offset: 0.2rem;
text-decoration-thickness: 1px;
}
/* ヘッダ毎の変更 1rem が本文相当 フォントサイズだけ変更
*/
#content h2 {font-size: 1.8rem;}
#content h3 {font-size: 1.3rem;}
#content h4,h5,h6 {font-size: 1rem;}
/* 目次の調整
*/
#toc li {
line-height: 1.1rem; /* <- 1.3334 toc leftの一行高さ matsuo */
margin-top: 0.0em; /* <- 0.3334em */
}
@media only screen and (min-width: 768px) {body.toc2 {padding-left: 9em;} #toc.toc2 {font-size: 50%; width: 18em;} }
@media only screen and (min-width: 1280px) {body.toc2 {padding-left: 18em;} #toc.toc2 {font-size: 100%;width: 18em;} }
/* Listの変更
*/
ol>li p,ul>li p,ul dd,ol dd,
.olist .olist,
.ulist .ulist,
.ulist .olist,
.olist .ulist {
margin-bottom: 0em /* 0.625em;listの行間 */
}
/* ブロックタイトルの変更
*/
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,
.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,
.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,
.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title {
font-style: normal;
text-decoration-line: underline;
text-underline-offset: 0.2rem;
text-decoration-thickness: 0.1px;
text-decoration-style: double;
}
/* テーブルの行間を詰める
*/
table thead tr th,table thead tr td,
table tfoot tr th,table tfoot tr td,
table tr th, table tr td {
/*padding: 0.5em 0.625em 0.625em;*/
/*padding: up em left em bottom em;*/
padding: 0.2em 0.625em 0.2em;
}
/* table header colors */
table thead, table tfoot {
background: lightblue;
font-weight: bold;
}
//// /* table stribe */
#### COMENT START ################# tr:nth-child(even) {
------------------------------------------------------------------ background: #f2f2f2;
[ドキュメント毎に設定すべきもの] }
:toc: left
:source-highlighter: coderay
:docname: = asciidoc
:author: my name
:revnumber: 0.9
:revdate: 2019/12/1
* 意味が不明なものは以下を参照 /* 画像にボーダー*/
https://takumon.github.io/asciidoc-syntax-quick-reference-japanese-translation/ img, .imageblock.bordered img {
border: 0.1px solid black;
background-color: #fffef7;
border-color: #e0e0dc;
-webkit-box-shadow: 0 1px 4px #e0e0dc;
box-shadow: 0 1px 4px #e0e0dc;
}
[属性定義] /* 各ブロックの周辺ピクセルを狭める
:experimental: *各種マクロ拡張時に定義しておく */
::module: *モジュール名 .admonitionblock>.content,
:Author: *著者名 .audioblock>.content,
:Email: *メールアドレス .exampleblock>.content,
:Date: *日付(2020/01/20) .imageblock>.content,
:Revision: Rev.1 * リビジョン指定 .listingblock>.content,
:lang: ja * 言語指定 .literalblock>.content,
:doctype: book * 言語の種類(ja,...) .stemblock>.content,
:description: * 説明??? .openblock>.content,
:docname: ドキュメント名 * ドキュメント説明 .paragraph>.content,
.quoteblock>.content,
table.tableblock>.content,
.verseblock>.content,
.videoblock>.content,
.sidebarblock,
.literalblock,
.literalblock pre,
.listingblock pre:not(.highlight),
.listingblock pre[class="highlight"],
.listingblock pre[class^="highlight "],
.listingblock pre.CodeRay,
.listingblock pre.prettyprint
.exampleblock>.content {
margin-bottom: 0em; /* <-1.25em */
/* padding: 1.25em; */
padding-top: 0.5em;
padding-bottom: 0.5em;
/*padding-left: 1.25em;*/
padding-right: 0.5em;
}
[イメージのパスを指定] </style>
:imagesdir: ./_images ++++
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
[ソースハイライト] // :TocMode: WordWrap or ExpandWidth or Other None WordWrapが初期値
:source-highlighter: coderay ifndef::TocMode[]
:TocMode: WordWrap
[見出し設定] endif::TocMode[]
:sectnums:
セクションに番号On, Offのときはコメントアウトもしくは"!""
[キャプチャーのラベル、不要なときは、空指定] ifeval::["{TocMode}" == "WordWrap"]
:chapter-label: // ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ css差分
++++
[目次作成] <style>
:toc: left /* 目次をタイトル省略して折り返しをしない。 マウスオーバーで、展開表示する
目次 left,right,macro macroの場合は挿入箇所でtoc::[]を記述する */
#toc ul.sectlevel1>li {
[目次のタイトル] text-overflow: ellipsis; /* 省略記号を表示する */
:toc-title: overflow: hidden; /* はみ出た部分を表示しない */
white-space: nowrap; /* 行を折り返さない */
}
#toc ul.sectlevel1>li :hover {
color: red;
/* font-size: 1.4rem;*/
white-space: normal; /* 行を折り返す */
background-color: lightyellow;
z-index: 10;
border-radius: 5px;
}
</style>
++++
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
endif::[]
ifeval::["{TocMode}" == "ExpandWidth"]
// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ css差分
++++
<style>
/* ウインドウが狭いときに、目次にマウスオーバーすると、幅を広げる
*/
@media only screen and (min-width: 768px)
{
#toc ul.sectlevel1>li {
overflow: hidden; /* はみ出た部分を表示しない */
white-space: nowrap; /* 行を折り返さない */
text-overflow: ellipsis; /* 省略記号を表示する */
}
div#toc li :hover{
line-height: 1.5rem; /* <- 1.3334 toc leftの一行高さ matsuo */
}
div#toc :hover
/*div#toc ul.sectlevel2>li :hover*/
{
color:red;
white-space: normal; /* 行を折り返さない */
font-size: 0.8rem;
background-color: lightyellow;
position: fixed;
width: auto;
}
}
</style>
++++
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
endif::[]
[目次 階層レベル] ifeval::["{CustomIcon}" == "ja"]
:toclevels: 3 :icons: image
:iconsdir: icons
:icontype: png
endif::[]
[各ラベルの日本語設定] ifdef::CustomIcon_nouse[]
:preface-title: はじめに/まえがき // ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ css差分
:appendix-caption: 付録 ++++
:caution-caption: 注意 <style>
:example-caption: 例 /* admontinを変更する CAUtion/Note...
:figure-caption: 図 */
:important-caption: 重要 .admonitionblock td.icon [class^="fa icon-"] {
:last-update-label: 最終更新 font-size: 0.9rem; /* <-2.5em 高さが決まる */
:listing-caption: リスト /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);*/
:manname-title: 名前 text-shadow: 0.5px 0.5px 0px rgba(0, 0, 0, 1); /* 影の指定 */
:note-caption: 注記 cursor: default;
:toc-title: 目次 line-height: 1;
:table-caption: 表 font-weight: bold;
:warning-caption: 警告 }
:tip-caption: ヒント .admonitionblock td.icon .icon-warning:before {
:untitled-label: 無題 content: "警告"; /* "\f071"*/
:version-label: バージョン /*color: #bf6900;*/
color: blue;
font-size: 0.9rem;
background: SpringGreen;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 0.5em;
padding-right: 0.5em;
border: solid 1px gray;
}
.admonitionblock td.icon .icon-important:before {
content: "重要"; /* "\f071"*/
color: white;;
font-size: 0.9rem;
background: red;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 0.5em;
padding-right: 0.5em;
border: solid 1px gray;
}
.admonitionblock td.icon .icon-caution:before {
content: "注意"; /* "\f071"*/
color: gray;
font-size: 0.9rem;
background: yellow;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 0.5em;
padding-right: 0.5em;
border: solid 1px gray;
}
.admonitionblock td.icon .icon-note:before {
content: "メモ"; /* "\f071"*/
color: white;
font-size: 0.9rem;
background: blue;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 0.5em;
padding-right: 0.5em;
border: solid 1px gray;
}
.admonitionblock td.icon .icon-tip:before {
content: "TIPS";
color: black;
font-size: 0.9rem;
background: lightblue;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 0.5em;
padding-right: 0.5em;
border: solid 1px gray;
}
#### COMENT END ################# </style>
//// ++++
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
endif::CustomIcon_nouse[]
// End of ::_CONFIG_ADOC[] // End of ::_CONFIG_ADOC[]
endif::[] endif::_CONFIG_ADOC[]
...@@ -8,6 +8,8 @@ include::config.adoc[] ...@@ -8,6 +8,8 @@ include::config.adoc[]
//:!sectnums: //:!sectnums:
//:imagesdir: Images //:imagesdir: Images
// hoge
//@ICON_CUSTOM@ //@ICON_CUSTOM@
{ExtendStyle} {ExtendStyle}
......
...@@ -31,6 +31,7 @@ include("comfuncs.js"); ...@@ -31,6 +31,7 @@ include("comfuncs.js");
// exit.push(function(){ if (isOk(stopWach)) echo("exit spend time=",stopWach.stop());}); // exit.push(function(){ if (isOk(stopWach)) echo("exit spend time=",stopWach.stop());});
// [get command-arguments] コマンド引数の取得 // [get command-arguments] コマンド引数の取得
var pm = uParam() var pm = uParam()
// 任意;オプションキーパラメータ群を指定する(なければ行コメントアウト) // 任意;オプションキーパラメータ群を指定する(なければ行コメントアウト)
// .set("inFile").opt("/I").next("*") .init("") .desc("input file") // .set("inFile").opt("/I").next("*") .init("") .desc("input file")
...@@ -49,11 +50,13 @@ var pm = uParam() ...@@ -49,11 +50,13 @@ var pm = uParam()
// [Main process] 処理を記述 // [Main process] 処理を記述
var InstRegURL = "HKCU\\Software\\Dainippon Screen Mfg.Co.,Ltd.\\ToolJsFuncScript\\1.0"; var InstRegURL = "HKCU\\Software\\Dainippon Screen Mfg.Co.,Ltd.\\ToolJsFuncScript\\1.0";
var InstPath = readParam.reg(InstRegURL).get("InstallPath"); InstPath = getEnv().exeDir; // レジストリ参照をやめます。exeの場所のみ。
if ( isNone(InstPath) ){
echo(-1,"警告::インストール先が見つかりません:",InstRegURL); // var InstPath = readParam.reg(InstRegURL).get("InstallPath");
InstPath = getEnv().exeDir; // if ( isNone(InstPath) ){
} // echo(-1,"警告::インストール先が見つかりません:",InstRegURL);
// InstPath = getEnv().exeDir;
// }
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
var adocTPL = uHereDoc.hereDoc(function(){/* var adocTPL = uHereDoc.hereDoc(function(){/*
...@@ -142,6 +145,9 @@ if ( pm.bOneDoc ) { ...@@ -142,6 +145,9 @@ if ( pm.bOneDoc ) {
}else{ }else{
if ((!pm.bForce)&&(!copySure(tgtconfigPath))) if ((!pm.bForce)&&(!copySure(tgtconfigPath)))
exit(-1); exit(-1);
echo("configPath=",configPath.FP());
echo("tgtconfigPath=",tgtconfigPath.FP());
copyFile(configPath,tgtconfigPath); copyFile(configPath,tgtconfigPath);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment