Class: SiSU_File_Op::FileOp

Inherits:
SiSU_Info_File::InfoFile show all
Defined in:
lib/sisu/se_file_op.rb

Direct Known Subclasses

SiSU_Env::FileOp

Instance Attribute Summary

Attributes inherited from SiSU_Info_Env::InfoEnv

#base_markup_dir_stub, #env, #etc, #filename, #flv, #fnb, #fnn, #fnt, #home, #hostname, #processing, #processing_git, #rc, #stub_pwd, #stub_src, #sys, #user, #webserv_host_cgi, #webserv_path, #webserv_port_cgi, #www, #yamlrc_dir

Attributes inherited from SiSU_Env_Call::EnvCall

#ad, #fnb, #fnn, #fnt, #fnv, #fnz, #rc

Instance Method Summary collapse

Methods inherited from SiSU_Info_File::InfoFile

#ao, #ao_content, #ao_idx_html, #ao_idx_sst_rel, #ao_idx_sst_rel_html_seg, #ao_idx_xhtml, #ao_map_nametags, #ao_map_ocn_htmlseg, #ao_metadata, #basefilename, #html_tune, #make_file, #make_path, #marshal, #processing, #touch_file, #tune, #write_file_processing, #xhtml_tune

Methods inherited from SiSU_Info_Env::InfoEnv

#ao, #arch, #asciidoc_ocn?, #bin, #build, #cgi, #cgi_sample_search_form_name, #cjk, #cjk_ja, #cjk_ko, #cjk_zh, #composite_file, #concord_max, #console_web_browser, #console_www_browser, #current_document, #defaults, #digest, #digest_conf?, #dir_url, #docbook_viewer, #encoding, #epub_bld, #epub_cp_images, #epub_viewer, #feed, #feed_home, #fictionbook_viewer, #file_encoding, #font, #git, #host, #html_minitoc?, #html_navigation?, #html_navigation_bar?, #html_quick_ref?, #html_right_pane?, #html_search_form?, #html_seg_title_banner?, #html_top_band?, #image_external, #image_source, #image_source_include, #image_source_include_local, #image_source_include_remote, #image_source_sisu_includes, #images_epub, #images_local, #landscape, #lang_filename, #language, #language_default_set, #length, #links_to_manifest?, #listed?, #local, #locale, #localhost, #lout, #main, #make, #man, #manifest?, #manifest_minitoc?, #manpage_generator, #manpage_viewer, #markdown_ocn?, #markup_emphasis, #metadata?, #minitoc?, #mono, #ocn?, #odf, #odf_pth, #odf_viewer, #odt_bld, #odt_ocn?, #omit_list, #orgmode_ocn?, #output_tell, #papersize, #path, #paths, #pattern, #pdf_viewer, #pdflatex, #php, #plaintext_ocn?, #plaintext_wrap, #port, #portrait, #postgresql, #processing_base_tmp, #processing_path, #processing_sisupod, #program, #promo?, #pwd, #rbver, #read_source_file, #read_source_file_array, #read_source_file_string, #remote, #rexml, #rmagick, #root, #root_dir, #rst_ocn?, #sample_data, #sample_search_form_title, #sans, #scripts, #search?, #search_action, #search_fixed?, #search_form, #search_form?, #search_form_static, #segsubtoc?, #serif, #share, #sisupod_gen, #sisupod_gen_v2, #sisupod_gen_v3, #sisupod_v2, #sisupod_v3, #sisupod_v4, #sisurc_path, #sitearch, #size, #source_file_path, #source_file_processing_array, #source_file_with_path, #sql, #src_pod, #src_txt, #stub_dir, #stub_dir_orig, #stub_epub, #stub_md_harvest, #stub_pod, #style, #tex, #texi, #texpdf, #texpdf_hyperlinks, #text_editor, #textile_ocn?, #tidy, #tmp_root_dir, #toc?, #tune, #type, #usr_dir?, #wc, #web_browser, #webrick, #webrick_port, #webserv, #webserv_base, #webserv_base_cgi, #webserv_cgi, #webserv_dir, #webserv_files_from_db, #webserv_host_base, #webserv_image, #webserv_map_pwd, #webserv_stub_ensure, #widget, #widget_static, #www_browser, #xml_docbook_ocn?, #xml_editor, #xml_fictionbook_ocn?, #xml_scaffold_ocn?, #xml_viewer, #yamlrc

Methods inherited from SiSU_Env_Call::EnvCall

#by?, #by_filename?, #by_filetype?, #by_language_code?, #default_language?, #document_language_versions_found, #dump?, #filename, #lang, #mono_multi_lingual?, #multilingual?, #published_manifests?, #redirect?

Constructor Details

#initialize(md, fno = '') ⇒ FileOp

todo unify with CreateFile



184
185
186
187
188
189
190
191
192
193
194
# File 'lib/sisu/se_file_op.rb', line 184

def initialize(md,fno='')
  begin
    @md,@fno=md,fno
    @env=SiSU_Env::InfoEnv.new(@md.fns)
  rescue
    SiSU_Screen::Ansi.new(md.opt.selections.str,$!,$@).rescue do
      __LINE__.to_s + ':' + __FILE__
    end
  ensure
  end
end

Instance Method Details

#abObject



1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
# File 'lib/sisu/se_file_op.rb', line 1500

def ab
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  elsif output_dir_structure.by_language_code?
    output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
  else
    output_path.base.dir + '/' + @ft
  end
end

#ab_podObject



1525
1526
1527
1528
1529
1530
1531
1532
1533
# File 'lib/sisu/se_file_op.rb', line 1525

def ab_pod
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  else
    output_path.base.dir + '/' + @ft
  end
end

#ab_srcObject



1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/sisu/se_file_op.rb', line 1511

def ab_src
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  else
    output_path.base.dir + '/' \
      + @ft + '/' \
      + @md.opt.fng + '/' \
      + Gt[:sisupod] + '/' \
      + Gt[:doc] + '/' \
      + @md.opt.lng
  end
end

#abcObject



1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
# File 'lib/sisu/se_file_op.rb', line 1487

def abc
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  elsif output_dir_structure.by_language_code?
    output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
  elsif output_dir_structure.by_filetype?
    output_path.base.dir + '/' + @ft
  else
    output_path.base.dir + '/' + @md.fnb
  end
end

#asciidocObject



332
333
334
335
336
337
# File 'lib/sisu/se_file_op.rb', line 332

def asciidoc
  path=output_path.asciidoc.dir
  make_path(path)
  fn=base_filename.asciidoc
  make_file(path,fn)
end

#baseObject



292
293
294
295
# File 'lib/sisu/se_file_op.rb', line 292

def base
  FileUtils::mkdir_p(output_path.base.dir) \
    unless FileTest.directory?(output_path.base.dir)
end

#base_filenameObject



872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
# File 'lib/sisu/se_file_op.rb', line 872

def base_filename
  def i18n(f)
    f=default_hash.merge(f)
    f[:lng] ||=@md.lang_code_insert
    f[:fn] + f[:lng] + f[:ft]
  end
  def default_hash
    {
      fn: @md.fnb,
      lng: @md.lang_code_insert,
    }
  end
  def default_hash_build(fh,sfx)
    if fh.is_a?(Hash)
      fh[:fn] ||=@md.fnb
      fh[:lng] ||= @md.lang_code_insert
      fh[:ft]=sfx
      fh
    else
      {
        fn: @md.fnb,
        lng: @md.lang_code_insert,
        ft: sfx,
      }
    end
  end
  def lang_code?(lng)
    (output_dir_structure.by_language_code?) \
    ? ''
    : (lng ||=@md.lang_code_insert)
  end
  def txt(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def textile(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_textile])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def asciidoc(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_asciidoc])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def markdown(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_markdown])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def rst(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_rst])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def orgmode(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_orgmode])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def html_scroll(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def html_seg_index(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: 'index',
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def html_segtoc(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fnh=if output_dir_structure.dump_or_redirect?
      {
        fn: fh[:fn] + '.toc',
        ft: fh[:ft],
      }
    else
      {
        fn: 'toc',
        ft: fh[:ft],
        lng: lang_code?(fh[:lng]),
      }
    end
    i18n(fnh)
  end
  def html_seg(fh)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def html_book_index(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: 'book_index',
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def html_concordance(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.dump_or_redirect?
      {
        fn: 'concordance',
        ft: fh[:ft],
      }
    else
      {
        fn: 'concordance',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xhtml(fh=nil)
    fh=default_hash_build(fh,Sfx[:xhtml])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def epub(fh=nil)
    fh=default_hash_build(fh,Sfx[:epub])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def odt(fh=nil)
    fh=default_hash_build(fh,Sfx[:odt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'opendocument',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_sax(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_sax])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_dom(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_dom])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_docbook_book(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_docbook_book])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_fictionbook(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_fictionbook])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_scaffold_structure_sisu(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_scaffold_structure_sisu])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_scaffold_structure_collapse(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_scaffold_structure_collapse])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def pdf_p(fh=nil)
    fh=default_hash_build(fh,Sfx[:pdf])
    fh[:lng]=lang_code?(fh[:lng])
    if output_dir_structure.by_filename?
      'portrait' + fh[:lng] + '.'
    else
      fh[:fn] + '.portrait' + fh[:lng] + '.'
    end
  end
  def pdf_l(fh=nil)
    fh=default_hash_build(fh,Sfx[:pdf])
    fh[:lng]=lang_code?(fh[:lng])
    if output_dir_structure.by_filename?
      'landscape' + fh[:lng] + '.'
    else
      fh[:fn] + '.landscape' + fh[:lng] + '.'
    end
  end
  def pdf_p_a4(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_a4]
  end
  def pdf_p_a5(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_a5]
  end
  def pdf_p_b5(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_b5]
  end
  def pdf_p_letter(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_letter]
  end
  def pdf_p_legal(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_legal]
  end
  def pdf_l_a4(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_a4]
  end
  def pdf_l_a5(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_a5]
  end
  def pdf_l_b5(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_b5]
  end
  def pdf_l_letter(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_letter]
  end
  def pdf_l_legal(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_legal]
  end
  def manpage(fh=nil)
    fh=default_hash_build(fh,Sfx[:manpage])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def info(fh=nil)
    fh=default_hash_build(fh,Sfx[:info])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def texinfo(fh=nil)
    fh=default_hash_build(fh,Sfx[:texinfo])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def sqlite_discrete(fh=nil)
    fh=default_hash_build(fh,Sfx[:sql])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def hash_digest(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_language_code?
      {
        fn: fh[:fn] + '.hash_digest',
        ft: fh[:ft],
      }
    elsif output_dir_structure.by_filetype?
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: 'digest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def sitemap(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_language_code?
      {
        fn: fh[:fn] + '.sitemap',
        ft: fh[:ft],
      }
    elsif output_dir_structure.by_filetype?
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: 'sitemap',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def qrcode_title(fh=nil)
    fh=default_hash_build(fh,'.title.png')
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def qrcode_md #check name below
    fh=default_hash_build(fh,'.md.png')
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def manifest_txt(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def manifest(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.dump_or_redirect?
      {
        fn: fh[:fn] + '.manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    elsif output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def src
    @md.fno
  end
  def po4a_cfg
    'po4a.cfg'
  end
  def po #check
    (@fno.empty?) \
    ? (@md.fn[:po])
    : (@fno + '.po')
  end
  def pot
    (@fno.empty?) \
    ? (@md.fn[:pot])
    : (@fno + '.pot')
  end
  def po4a_sst #check
    @fno
  end
  def sisupod
    (@md.fns =~/\.ssm\.sst$/) \
    ? @md.fns.gsub(/(?:\~\S{2,3})?\.ssm\.sst$/,'.ssm.txz')
    : @md.fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1.txz')
  end
  self
end

#cssObject

def cgi end



2552
2553
2554
2555
# File 'lib/sisu/se_file_op.rb', line 2552

def css
  FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
    unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
end

#default_hashObject



878
879
880
881
882
883
# File 'lib/sisu/se_file_op.rb', line 878

def default_hash
  {
    fn: @md.fnb,
    lng: @md.lang_code_insert,
  }
end

#default_hash_build(fh, sfx) ⇒ Object



884
885
886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/sisu/se_file_op.rb', line 884

def default_hash_build(fh,sfx)
  if fh.is_a?(Hash)
    fh[:fn] ||=@md.fnb
    fh[:lng] ||= @md.lang_code_insert
    fh[:ft]=sfx
    fh
  else
    {
      fn: @md.fnb,
      lng: @md.lang_code_insert,
      ft: sfx,
    }
  end
end

#default_output_cssObject



247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/sisu/se_file_op.rb', line 247

def default_output_css
  if (@md.opt.opt_act[:dump][:bool] \
  &&  @md.opt.opt_act[:dump][:inst]) \
  || (@md.opt.opt_act[:redirect][:bool] \
  &&  @md.opt.opt_act[:redirect][:inst])
    './'
  elsif output_dir_structure.by_language_code?
    '../../'
  elsif output_dir_structure.by_filetype?
    '../'
  else
    '../'
  end
end

#dirObject

‘xml’



2290
2291
2292
2293
# File 'lib/sisu/se_file_op.rb', line 2290

def dir
  output_path.txt.dir + '/' \
  + base_filename.txt
end

#epubObject



300
301
302
303
# File 'lib/sisu/se_file_op.rb', line 300

def epub
  path=output_path.epub.dir
  make_path(path)
end

#ftObject



1727
1728
1729
# File 'lib/sisu/se_file_op.rb', line 1727

def ft
  Gt[:src]
end

#harvestObject



2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
# File 'lib/sisu/se_file_op.rb', line 2448

def harvest
  def ft
    'site_metadata'
  end
  def dir
    set_path(ft).dir.ab
  end
  def url
    set_path(ft).url.ab
  end
  def rel
    set_path(ft).rel.ab
  end
  def rcp
    set_path(ft).rcp.ab
  end
  def rel_sm
    if output_dir_structure.by_language_code?
      ''
    elsif output_dir_structure.by_filetype?
      ''
    else
      ''
    end
  end
  self
end

#hash_digestObject



441
442
443
444
445
446
# File 'lib/sisu/se_file_op.rb', line 441

def hash_digest
  path=output_path.hash_digest.dir
  make_path(path)
  fn=base_filename.hash_digest
  make_file(path,fn)
end

#htmlObject



2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
# File 'lib/sisu/se_file_op.rb', line 2056

def html
  def ft
    'html'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).url.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    if output_dir_structure.by_language_code?
      '../../_sisu/image'
    elsif output_dir_structure.by_filetype?
      '../_sisu/image'
    else
      '../_sisu/image'
    end
  end
  self
end

#html_book_index(fh = nil) ⇒ Object



591
592
593
594
595
596
597
598
599
600
601
# File 'lib/sisu/se_file_op.rb', line 591

def html_book_index
  def dir
    output_path.html_seg.dir + '/' \
    + base_filename.html_book_index
  end
  def rel
    output_path.html_seg.rel + '/' \
    + base_filename.html_book_index
  end
  self
end

#html_concordanceObject



602
603
604
605
606
607
608
609
610
611
612
# File 'lib/sisu/se_file_op.rb', line 602

def html_concordance
  def dir
    output_path.html_seg.dir + '/' \
    + base_filename.html_concordance
  end
  def rel
    output_path.html_seg.rel + '/' \
    + base_filename.html_concordance
  end
  self
end

#html_scrollObject



356
357
358
359
360
361
# File 'lib/sisu/se_file_op.rb', line 356

def html_scroll
  pth=output_path.html.dir
  make_path(pth)
  p_fn=place_file.html_scroll.dir
  File.new(p_fn,'w+')
end

#html_scroll_1Object



229
230
231
232
233
234
235
236
237
# File 'lib/sisu/se_file_op.rb', line 229

def html_scroll_1
  if output_dir_structure.by_language_code?
    '../'
  elsif output_dir_structure.by_filetype?
    '../'
  else
    './'
  end
end

#html_scroll_2Object



211
212
213
214
215
216
217
218
219
# File 'lib/sisu/se_file_op.rb', line 211

def html_scroll_2
  if output_dir_structure.by_language_code?
    '../../'
  elsif output_dir_structure.by_filetype?
    '../'
  else
    '../'
  end
end

#html_scroll_cssObject



261
262
263
# File 'lib/sisu/se_file_op.rb', line 261

def html_scroll_css
  default_output_css
end

#html_segObject



1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
# File 'lib/sisu/se_file_op.rb', line 1055

def html_seg(fh)
  fh=default_hash_build(fh,Sfx[:html])
  fh[:lng]=lang_code?(fh[:lng])
  fnh={
    fn: fh[:fn],
    ft: fh[:ft],
    lng: fh[:lng],
  }
  i18n(fnh)
end

#html_seg_1Object



238
239
240
241
242
243
244
245
246
# File 'lib/sisu/se_file_op.rb', line 238

def html_seg_1
  if output_dir_structure.by_language_code?
    '../../'
  elsif output_dir_structure.by_filetype?
    '../../'
  else
    './'
  end
end

#html_seg_2Object



220
221
222
223
224
225
226
227
228
# File 'lib/sisu/se_file_op.rb', line 220

def html_seg_2
  if output_dir_structure.by_language_code?
    '../../../'
  elsif output_dir_structure.by_filetype?
    '../../'
  else
    '../'
  end
end

#html_seg_cssObject



270
271
272
273
274
275
276
277
278
# File 'lib/sisu/se_file_op.rb', line 270

def html_seg_css
  if output_dir_structure.by_language_code?
    '../../../'
  elsif output_dir_structure.by_filetype?
    '../../'
  else
    '../'
  end
end

#html_seg_index(fh = nil) ⇒ Object



362
363
364
365
366
367
368
369
370
# File 'lib/sisu/se_file_op.rb', line 362

def html_seg_index
  pth=((output_dir_structure.by_filename?) \
  || (output_dir_structure.dump?)) \
  ? "#{output_path.html.dir}"
  : "#{output_path.html.dir}/#{@md.fnb}"
  make_path(pth)
  p_fn=place_file.html_seg_index.dir
  File.new(p_fn,'w+')
end

#html_segtoc(fh = nil) ⇒ Object



371
372
373
374
375
376
377
378
379
380
# File 'lib/sisu/se_file_op.rb', line 371

def html_segtoc
  pth=((output_dir_structure.by_filename?) \
  || (output_dir_structure.dump?) \
  || (output_dir_structure.redirect?)) \
  ? "#{output_path.html.dir}"
  : "#{output_path.html.dir}/#{@md.fnb}"
  make_path(pth)
  p_fn=place_file.html_segtoc.dir
  File.new(p_fn,'w+')
end

#i18n(f) ⇒ Object



873
874
875
876
877
# File 'lib/sisu/se_file_op.rb', line 873

def i18n(f)
  f=default_hash.merge(f)
  f[:lng] ||=@md.lang_code_insert
  f[:fn] + f[:lng] + f[:ft]
end

#imagesObject



2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
# File 'lib/sisu/se_file_op.rb', line 2569

def images
  @d='_sisu/image'
  def dir
    output_path.base.dir + '/' + @d
  end
  def url
    output_path.base.url + '/' + @d
  end
  def rel
    @d
    #output_path.base.rel + '/' + @d
  end
  def rcp
    output_path.stub.rcp + '/' + @d
  end
  self
end

#images_externalObject



2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
# File 'lib/sisu/se_file_op.rb', line 2586

def images_external
  @d='_sisu/image_external'
  def dir
    output_path.base.dir + '/' + @d
  end
  def url
    output_path.base.url + '/' + @d
  end
  def rel
    output_path.base.rel + '/' + @d
  end
  def rcp
    output_path.base.rcp + '/' + @d
  end
  self
end

#info(fh = nil) ⇒ Object



435
436
437
438
439
440
# File 'lib/sisu/se_file_op.rb', line 435

def info
  path=output_path.texinfo.dir
  make_path(path)
  fn=base_filename.info
  make_file(path,fn)
end

#lang_code?(lng) ⇒ Boolean

Returns:

  • (Boolean)


898
899
900
901
902
# File 'lib/sisu/se_file_op.rb', line 898

def lang_code?(lng)
  (output_dir_structure.by_language_code?) \
  ? ''
  : (lng ||=@md.lang_code_insert)
end

#manifestObject



453
454
455
456
457
458
# File 'lib/sisu/se_file_op.rb', line 453

def manifest
  path=output_path.manifest.dir
  make_path(path)
  fn=base_filename.manifest
  make_file(path,fn)
end

#manifest_cssObject



279
280
281
282
283
284
285
286
287
# File 'lib/sisu/se_file_op.rb', line 279

def manifest_css
  if output_dir_structure.by_language_code?
    '../../_sisu/css'
  elsif output_dir_structure.by_filetype?
    ''
  else
    '../'
  end
end

#manifest_txt(fh = nil) ⇒ Object



459
460
461
462
463
464
# File 'lib/sisu/se_file_op.rb', line 459

def manifest_txt
  path=output_path.manifest.dir
  make_path(path)
  fn=base_filename.manifest_txt
  make_file(path,fn)
end

#manpageObject



423
424
425
426
427
428
# File 'lib/sisu/se_file_op.rb', line 423

def manpage
  path=output_path.manpage.dir
  make_path(path)
  fn=base_filename.manpage
  make_file(path,fn)
end

#markdownObject



338
339
340
341
342
343
# File 'lib/sisu/se_file_op.rb', line 338

def markdown
  path=output_path.markdown.dir
  make_path(path)
  fn=base_filename.markdown
  make_file(path,fn)
end

#md_harvestObject



1853
1854
1855
1856
# File 'lib/sisu/se_file_op.rb', line 1853

def md_harvest
  manifest
  self
end

#mkdirObject



290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/sisu/se_file_op.rb', line 290

def mkdir
  def output
    def base
      FileUtils::mkdir_p(output_path.base.dir) \
        unless FileTest.directory?(output_path.base.dir)
    end
    def css
      FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
        unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
    end
    def epub
      path=output_path.epub.dir
      make_path(path)
    end
    self
  end
  self
end

#mkdir_initializeObject

not used but consider using



198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/sisu/se_file_op.rb', line 198

def mkdir_initialize                # not used but consider using
  FileUtils::mkdir_p(output_path.base.dir) \
    unless FileTest.directory?(output_path.base.dir)
  FileUtils::mkdir_p("#{output_path.base.dir}/#{@md.fnb}") \
    unless FileTest.directory?("#{output_path.base.dir}/#{@md.fnb}")
  FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
    unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
  FileUtils::mkdir_p(@env.processing_path.ao) \
    unless FileTest.directory?(@env.processing_path.ao)
  FileUtils::mkdir_p(@env.processing_path.tune) \
    unless FileTest.directory?(@env.processing_path.tune)
end

#mkfileObject

consider using more



308
309
310
311
312
313
# File 'lib/sisu/se_file_op.rb', line 308

def mkfile #consider using more
  path="#{output_path.base.dir}/#{@md.fnb}"
  make_path(path)
  filename=@fno
  make_file(path,filename)
end

#mkfile_pwdObject



314
315
316
317
318
# File 'lib/sisu/se_file_op.rb', line 314

def mkfile_pwd
  path=Dir.pwd
  filename=@fno
  make_file(path,filename)
end

#odtObject



613
614
615
616
617
618
619
620
621
622
623
# File 'lib/sisu/se_file_op.rb', line 613

def odt
  def dir
    output_path.odt.dir + '/' \
    + base_filename.odt
  end
  def rel
    output_path.odt.rel + '/' \
    + base_filename.odt
  end
  self
end

#orgmodeObject



350
351
352
353
354
355
# File 'lib/sisu/se_file_op.rb', line 350

def orgmode
  path=output_path.orgmode.dir
  make_path(path)
  fn=base_filename.orgmode
  make_file(path,fn)
end

#outputObject



291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/sisu/se_file_op.rb', line 291

def output
  def base
    FileUtils::mkdir_p(output_path.base.dir) \
      unless FileTest.directory?(output_path.base.dir)
  end
  def css
    FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
      unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
  end
  def epub
    path=output_path.epub.dir
    make_path(path)
  end
  self
end

#output_dir_structureObject



195
196
197
# File 'lib/sisu/se_file_op.rb', line 195

def output_dir_structure
  SiSU_Env::ProcessingSettings.new(@md).output_dir_structure
end

#output_pathObject



1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
# File 'lib/sisu/se_file_op.rb', line 1652

def output_path
  def web_base
    def dir
      @env.path.webserv
    end
    def url
      #"#{@env.url.root}"
    end
    def rel
      '.'
    end
    def rcp
      '.'
    end
    self
  end
  def stub
    def dir
      @md.opt.f_pth[:pth_stub]
    end
    #def url
    #  "#{@env.url.root}"
    #end
    def rel
      './' + @md.opt.f_pth[:pth_stub]
    end
    def rcp
      @md.opt.f_pth[:pth_stub]
    end
    self
  end
  def webserver_path
    if output_dir_structure.dump?
      @md.opt.opt_act[:dump][:inst]
    elsif output_dir_structure.redirect?
      @md.opt.opt_act[:redirect][:inst]
    else
      @env.path.webserv
    end
  end
  def base
    def dir
      webserver_path + '/' + @md.opt.f_pth[:pth_stub]
    end
    def url
      @env.url.webserv + '/' + @md.opt.f_pth[:pth_stub]
    end
    def rel
      './' + @md.opt.f_pth[:pth_stub]
    end
    def rcp
      './' + @md.opt.f_pth[:pth_stub]
    end
    self
  end
  def sisugit
    def dir
      output_path.base.dir + '/git'
    end
    def url
      output_path.base.url + '/git'
    end
    def rel
      output_path.base.rel + '/git'
    end
    def rcp
      output_path.base.rcp + '/git'
    end
    self
  end
  #def pod
  #  ft='pod'
  #  path=set_path(ft).dir.ab
  #end
  def src
    def ft
      Gt[:src]
    end
    def dir
      set_path(ft).dir.ab_src
    end
    def url
      set_path(ft).url.ab_src
    end
    def rel
      set_path(ft).rel.ab_src
    end
    def rcp
      set_path(ft).rcp.ab_src
    end
    def rel_sm
      set_path(ft).rel_sm.ab_src
    end
    self
  end
  def sisupod
    def ft
      Gt[:src]
    end
    def dir
      set_path(ft).dir.ab_pod
    end
    def url
      set_path(ft).url.ab_pod
    end
    def rel
      set_path(ft).rel.ab_pod
    end
    def rcp
      set_path(ft).rcp.ab_pod
    end
    def rel_sm
      set_path(ft).rel_sm.ab_pod
    end
    self
  end
  def po4a
    def dir
     output_path.base.dir + '/' \
       + Gt[:src] + '/' \
       + @md.opt.fng + '/po4a'
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb
    end
    def rcp
      #p "#{output_path.base.dir}/po4a/#{@md.fnb}"
    end
    self
  end
  def po(lng=@md.opt.lng)
    @lng=lng
    def dir
      output_path.base.dir + '/' \
        + Gt[:src] + '/' \
        + @md.opt.fng + '/po4a/po/' \
        + @lng
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb + '/po/' \
        + @lng
    end
    self
  end
  def pot
    def dir
     output_path.base.dir + '/' \
       + Gt[:src] + '/' \
       + @md.opt.fng + '/po4a/pot'
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb + '/pot'
    end
    def rcp
      #p "#{output_path.base.dir}/po4a/#{@md.fnb}/pot"
    end
    self
  end
  def po_git # consider !!!
    def ft
      Gt[:po]
    end
    def dir
      pth=@env.processing_path.git + '/' \
        + @md.fnb + '/' \
        + ft + '/' \
        + @md.opt.lng
      FileUtils::mkdir_p(pth) unless FileTest.directory?(pth)
      pth
    end
    self
  end
  def pot_git # consider !!!
    def ft
      Gt[:pot]
    end
    def dir
      @env.processing_path.git + '/' \
        + @md.fnb + '/' \
        + ft
    end
    self
  end
  def po4a_sst(lng=@md.opt.lng)
    @lng=lng
    def dir
      output_path.base.dir + '/' \
        + Gt[:src] + '/' \
        + @md.opt.fng + '/po4a/' \
        + @lng
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb \
        + @lng
    end
    self
  end
  def md_harvest
    manifest
    self
  end
  def txt
    def ft
      'txt'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def textile
    def ft
      'textile' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def asciidoc
    def ft
      'asciidoc' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def markdown
    def ft
      'markdown' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def rst
    def ft
      'rst' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def orgmode
    def ft
      'orgmode' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def html_scroll
    def ft
      'html'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      if output_dir_structure.dump_or_redirect?
        './image'
      elsif output_dir_structure.by_language_code?
        '../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    self
  end
  def html_seg
    def ft
      'html/' + @md.fnb
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      if output_dir_structure.dump_or_redirect?
        './image'
      elsif output_dir_structure.by_language_code?
        '../../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    self
  end
  def html_concordance
    html_seg
    self
  end
  def html
    def ft
      'html'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).url.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      if output_dir_structure.by_language_code?
        '../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    self
  end
  def xhtml
    def ft
      'xhtml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def epub
    def ft
      'epub'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      './image'
    end
    self
  end
  def odt
    def ft
      'odt'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def xml
    def ft
      'xml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_sax
    xml
    self
  end
  def xml_dom
    xml
    self
  end
  def xml_docbook
    def ft
      'docbook'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_docbook_article
    def ft
      'docbook' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_docbook_book
    def ft
      'docbook'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_fictionbook
    def ft
      'fictionbook' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_scaffold_structure_sisu
    def ft
      'sisu.scaffold.xml'
      #'xml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_scaffold_structure_collapse
    def ft
      'collapsed.scaffold.xml'
      #'xml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def pdf
    def ft
      'pdf'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def sqlite_discrete
    def ft
      'sql'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def hash_digest
    def ft
      'hashes'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def manifest
    def ft
      'manifest'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rel_image
      if output_dir_structure.dump_or_redirect?
        './image'
      elsif output_dir_structure.by_language_code?
        '../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    def rcp
      set_path(ft).rcp.abc
    end
    self
  end
  def qrcode
    def ft
      'manifest/qrcode'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def harvest
    def ft
      'site_metadata'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      if output_dir_structure.by_language_code?
        ''
      elsif output_dir_structure.by_filetype?
        ''
      else
        ''
      end
    end
    self
  end
  def manpage
    def ft
      'man'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def texinfo
    def ft
      'texinfo'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def sitemaps
    def ft
      'sitemaps'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    self
  end
  def sqlite #check url
    def dir
      output_path.base.dir
    end
    def url
      output_path.base.url
    end
    def rel
      output_path.base.rel
    end
    def rcp
      output_path.base.rcp
    end
    self
  end
  #def cgi
  #end
  def css
    @d='_sisu/css'
    def dir
      output_path.base.dir + '/' + @d
    end
    def url
      output_path.base.url + '/' + @d
    end
    def rel
      @d
      #output_path.base.rel + '/' + @d
    end
    def rcp
      output_path.stub.rcp + '/' + @d
    end
    self
  end
  def images
    @d='_sisu/image'
    def dir
      output_path.base.dir + '/' + @d
    end
    def url
      output_path.base.url + '/' + @d
    end
    def rel
      @d
      #output_path.base.rel + '/' + @d
    end
    def rcp
      output_path.stub.rcp + '/' + @d
    end
    self
  end
  def images_external
    @d='_sisu/image_external'
    def dir
      output_path.base.dir + '/' + @d
    end
    def url
      output_path.base.url + '/' + @d
    end
    def rel
      output_path.base.rel + '/' + @d
    end
    def rcp
      output_path.base.rcp + '/' + @d
    end
    self
  end
  #def css
  #  #"#{@env.path.output}/#{@env.path.style}"
  #end
  self
end


210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/sisu/se_file_op.rb', line 210

def path_rel_links
  def html_scroll_2
    if output_dir_structure.by_language_code?
      '../../'
    elsif output_dir_structure.by_filetype?
      '../'
    else
      '../'
    end
  end
  def html_seg_2
    if output_dir_structure.by_language_code?
      '../../../'
    elsif output_dir_structure.by_filetype?
      '../../'
    else
      '../'
    end
  end
  def html_scroll_1
    if output_dir_structure.by_language_code?
      '../'
    elsif output_dir_structure.by_filetype?
      '../'
    else
      './'
    end
  end
  def html_seg_1
    if output_dir_structure.by_language_code?
      '../../'
    elsif output_dir_structure.by_filetype?
      '../../'
    else
      './'
    end
  end
  def default_output_css
    if (@md.opt.opt_act[:dump][:bool] \
    &&  @md.opt.opt_act[:dump][:inst]) \
    || (@md.opt.opt_act[:redirect][:bool] \
    &&  @md.opt.opt_act[:redirect][:inst])
      './'
    elsif output_dir_structure.by_language_code?
      '../../'
    elsif output_dir_structure.by_filetype?
      '../'
    else
      '../'
    end
  end
  def html_scroll_css
    default_output_css
  end
  def xhtml_css
    default_output_css
  end
  def xml_css
    default_output_css
  end
  def html_seg_css
    if output_dir_structure.by_language_code?
      '../../../'
    elsif output_dir_structure.by_filetype?
      '../../'
    else
      '../'
    end
  end
  def manifest_css
    if output_dir_structure.by_language_code?
      '../../_sisu/css'
    elsif output_dir_structure.by_filetype?
      ''
    else
      '../'
    end
  end
  self
end

#pdfObject



2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
# File 'lib/sisu/se_file_op.rb', line 2335

def pdf
  def ft
    'pdf'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  self
end

#pdf_l(fh = nil) ⇒ Object



638
639
640
# File 'lib/sisu/se_file_op.rb', line 638

def pdf_l
  STDERR.puts 'ERROR not available due to multiple page format sizes'
end

#pdf_l_a4(fh = nil) ⇒ Object



1279
1280
1281
# File 'lib/sisu/se_file_op.rb', line 1279

def pdf_l_a4(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_a4]
end

#pdf_l_a5(fh = nil) ⇒ Object



1282
1283
1284
# File 'lib/sisu/se_file_op.rb', line 1282

def pdf_l_a5(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_a5]
end

#pdf_l_b5(fh = nil) ⇒ Object



1285
1286
1287
# File 'lib/sisu/se_file_op.rb', line 1285

def pdf_l_b5(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_b5]
end


1291
1292
1293
# File 'lib/sisu/se_file_op.rb', line 1291

def pdf_l_legal(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_legal]
end

#pdf_l_letter(fh = nil) ⇒ Object



1288
1289
1290
# File 'lib/sisu/se_file_op.rb', line 1288

def pdf_l_letter(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_letter]
end

#pdf_p(fh = nil) ⇒ Object



635
636
637
# File 'lib/sisu/se_file_op.rb', line 635

def pdf_p
  STDERR.puts 'ERROR not available due to multiple page format sizes'
end

#pdf_p_a4(fh = nil) ⇒ Object



1264
1265
1266
# File 'lib/sisu/se_file_op.rb', line 1264

def pdf_p_a4(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_a4]
end

#pdf_p_a5(fh = nil) ⇒ Object



1267
1268
1269
# File 'lib/sisu/se_file_op.rb', line 1267

def pdf_p_a5(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_a5]
end

#pdf_p_b5(fh = nil) ⇒ Object



1270
1271
1272
# File 'lib/sisu/se_file_op.rb', line 1270

def pdf_p_b5(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_b5]
end


1276
1277
1278
# File 'lib/sisu/se_file_op.rb', line 1276

def pdf_p_legal(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_legal]
end

#pdf_p_letter(fh = nil) ⇒ Object



1273
1274
1275
# File 'lib/sisu/se_file_op.rb', line 1273

def pdf_p_letter(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_letter]
end

#place_fileObject



491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
# File 'lib/sisu/se_file_op.rb', line 491

def place_file
  def txt
    def dir
      output_path.txt.dir + '/' \
      + base_filename.txt
    end
    def rel
      output_path.txt.rel + '/' \
      + base_filename.txt
    end
    self
  end
  def textile
    def dir
      output_path.textile.dir + '/' \
      + base_filename.textile
    end
    def rel
      output_path.textile.rel + '/' \
      + base_filename.textile
    end
    self
  end
  def asciidoc
    def dir
      output_path.asciidoc.dir + '/' \
      + base_filename.asciidoc
    end
    def rel
      output_path.asciidoc.rel + '/' \
      + base_filename.asciidoc
    end
    self
  end
  def markdown
    def dir
      output_path.markdown.dir + '/' \
      + base_filename.markdown
    end
    def rel
      output_path.markdown.rel + '/' \
      + base_filename.markdown
    end
    self
  end
  def rst
    def dir
      output_path.rst.dir + '/' \
      + base_filename.rst
    end
    def rel
      output_path.rst.rel + '/' \
      + base_filename.rst
    end
    self
  end
  def orgmode
    def dir
      output_path.orgmode.dir + '/' \
      + base_filename.orgmode
    end
    def rel
      output_path.orgmode.rel + '/' \
      + base_filename.orgmode
    end
    self
  end
  def html_scroll
    def dir
      output_path.html_scroll.dir + '/' \
      + base_filename.html_scroll
    end
    def rel
      output_path.html_scroll.rel + '/' \
      + base_filename.html_scroll
    end
    self
  end
  def html_seg_index
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_seg_index
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_seg_index
    end
    self
  end
  def html_segtoc
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_segtoc
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_segtoc
    end
    self
  end
  def html_book_index
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_book_index
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_book_index
    end
    self
  end
  def html_concordance
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_concordance
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_concordance
    end
    self
  end
  def odt
    def dir
      output_path.odt.dir + '/' \
      + base_filename.odt
    end
    def rel
      output_path.odt.rel + '/' \
      + base_filename.odt
    end
    self
  end
  def epub
    def dir
      output_path.epub.dir + '/' \
      + base_filename.epub
    end
    def rel
      output_path.epub.rel + '/' \
      + base_filename.epub
    end
    self
  end
  def pdf_p
    STDERR.puts 'ERROR not available due to multiple page format sizes'
  end
  def pdf_l
    STDERR.puts 'ERROR not available due to multiple page format sizes'
  end
  def xhtml
    def dir
      output_path.xhtml.dir + '/' \
      + base_filename.xhtml
    end
    def rel
      output_path.xhtml.rel + '/' \
      + base_filename.xhtml
    end
    self
  end
  def xml_sax
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_sax
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_sax
    end
    self
  end
  def xml_dom
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_dom
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_dom
    end
    self
  end
  def xml_docbook_book
    def dir
      output_path.xml_docbook.dir + '/' \
      + base_filename.xml_docbook_book
    end
    def rel
      output_path.xml_docbook.rel + '/' \
      + base_filename.xml_docbook_book
    end
    self
  end
  def xml_fictionbook
    def dir
      output_path.xml_fictionbook.dir + '/' \
      + base_filename.xml_fictionbook
    end
    def rel
      output_path.xml_fictionbook.rel + '/' \
      + base_filename.xml_fictionbook
    end
    self
  end
  def xml_scaffold_structure_sisu
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_scaffold_structure_sisu
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_scaffold_structure_sisu
    end
    self
  end
  def xml_scaffold_structure_collapse
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_scaffold_structure_collapse
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_scaffold_structure_collapse
    end
    self
  end
  def sqlite_discrete
    def dir
      output_path.sqlite_discrete.dir + '/' \
      + base_filename.sqlite_discrete
    end
    def rel
      output_path.sqlite_discrete.rel + '/' \
      + base_filename.sqlite_discrete
    end
    self
  end
  def hash_digest
    def dir
      output_path.hash_digest.dir + '/' \
      + base_filename.hash_digest
    end
    def rel
      output_path.hash_digest.rel + '/' \
      + base_filename.hash_digest
    end
    self
  end
  def src
    def dir
      output_path.src.dir + '/' \
        + base_filename.src
    end
    def rel
      output_path.src.rel + '/' \
      + base_filename.src
    end
    self
  end
  def sisupod
    def dir
      output_path.sisupod.dir + '/' \
      + base_filename.sisupod
    end
    def rel
      output_path.sisupod.rel + '/' \
      + base_filename.sisupod
    end
    self
  end
  def po
    def dir
      output_path.po.dir + '/' \
      + base_filename.po
    end
    def rel
      output_path.po.rel + '/' \
      + base_filename.po
    end
    self
  end
  def pot
    def dir
      output_path.pot.dir + '/' \
      + base_filename.pot
    end
    def rel
      output_path.pot.rel + '/' \
      + base_filename.pot
    end
    self
  end
  def po_git
    def dir
      output_path.po_git + '/' \
      + base_filename.po
    end
    def rel
      #output_path.po_git + '/' + base_filename.po
    end
    self
  end
  def pot_git
    def dir
      output_path.pot_git + '/' \
      + base_filename.pot
    end
    def rel
      #output_path.pot_git + '/' + base_filename.pot
    end
    self
  end
  def manpage
    def dir
      output_path.manpage.dir + '/' \
      + base_filename.manpage
    end
    def rel
      output_path.manpage.rel + '/' \
      + base_filename.manpage
    end
    self
  end
  def texinfo
    def dir
      output_path.texinfo.dir + '/' \
      + base_filename.texinfo
    end
    def rel
      output_path.texinfo.rel + '/' \
      + base_filename.texinfo
    end
    self
  end
  def info
    def dir
      output_path.texinfo.dir + '/' \
      + base_filename.info
    end
    def rel
      output_path.texinfo.rel + '/' \
      + base_filename.info
    end
    self
  end
  def qrcode_title
    def dir
      output_path.qrcode.dir + '/' \
      + base_filename.qrcode_title
    end
    def rel
      output_path.qrcode.rel + '/' \
      + base_filename.qrcode_title
    end
    self
  end
  def qrcode_md
    def dir
      output_path.qrcode.dir + '/' \
      + base_filename.qrcode_md
    end
    def rel
      output_path.qrcode.rel + '/' \
      + base_filename.qrcode_md
    end
    self
  end
  def manifest
    def dir
      output_path.manifest.dir + '/' \
        + base_filename.manifest
    end
    def rel
      output_path.manifest.rel + '/' \
        + base_filename.manifest
    end
    self
  end
  self
end

#po(lng = @md.opt.lng) ⇒ Object

check



1464
1465
1466
1467
1468
1469
# File 'lib/sisu/se_file_op.rb', line 1464

def po(lng=@md.opt.lng)
  path=output_path.po(lng).dir
  make_path(path)
  fn=base_filename.po
  make_file(path,fn)
end

#po4aObject



1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
# File 'lib/sisu/se_file_op.rb', line 1768

def po4a
  def dir
   output_path.base.dir + '/' \
     + Gt[:src] + '/' \
     + @md.opt.fng + '/po4a'
  end
  def url
    output_path.base.url + '/po4a/' \
      + @md.fnb
  end
  def rcp
    #p "#{output_path.base.dir}/po4a/#{@md.fnb}"
  end
  self
end

#po4a_cfgObject



465
466
467
468
469
470
# File 'lib/sisu/se_file_op.rb', line 465

def po4a_cfg
  path=output_path.po4a.dir
  make_path(path)
  fn=base_filename.po4a_cfg
  make_file(path,fn)
end

#po4a_sst(lng = @md.opt.lng) ⇒ Object

check



1474
1475
1476
1477
1478
1479
# File 'lib/sisu/se_file_op.rb', line 1474

def po4a_sst(lng=@md.opt.lng)
  path=output_path.po4a_sst(lng).dir
  make_path(path)
  fn=base_filename.po4a_sst
  make_file(path,fn)
end

#po_gitObject

consider !!!



1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
# File 'lib/sisu/se_file_op.rb', line 1813

def po_git
  def dir
    output_path.po_git + '/' \
    + base_filename.po
  end
  def rel
    #output_path.po_git + '/' + base_filename.po
  end
  self
end

#potObject



471
472
473
474
475
476
# File 'lib/sisu/se_file_op.rb', line 471

def pot
  path=output_path.pot.dir
  make_path(path)
  fn=base_filename.pot
  make_file(path,fn)
end

#pot_gitObject

consider !!!



1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
# File 'lib/sisu/se_file_op.rb', line 1827

def pot_git
  def dir
    output_path.pot_git + '/' \
    + base_filename.pot
  end
  def rel
    #output_path.pot_git + '/' + base_filename.pot
  end
  self
end

#qrcodeObject



447
448
449
450
451
452
# File 'lib/sisu/se_file_op.rb', line 447

def qrcode
  path=output_path.qrcode.dir
  make_path(path)
  fn=base_filename.qrcode
  make_file(path,fn)
end

#qrcode_mdObject

check name below



1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
# File 'lib/sisu/se_file_op.rb', line 1398

def qrcode_md
  def dir
    output_path.qrcode.dir + '/' \
    + base_filename.qrcode_md
  end
  def rel
    output_path.qrcode.rel + '/' \
    + base_filename.qrcode_md
  end
  self
end

#qrcode_title(fh = nil) ⇒ Object



837
838
839
840
841
842
843
844
845
846
847
# File 'lib/sisu/se_file_op.rb', line 837

def qrcode_title
  def dir
    output_path.qrcode.dir + '/' \
    + base_filename.qrcode_title
  end
  def rel
    output_path.qrcode.rel + '/' \
    + base_filename.qrcode_title
  end
  self
end

#rcpObject

output_path.base.rel + ‘/’ + @d



2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
# File 'lib/sisu/se_file_op.rb', line 2564

def rcp
  def abc
    if output_dir_structure.by_language_code?
      output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
    elsif output_dir_structure.by_filetype?
      output_path.stub.rcp + '/' + @ft
    else
      output_path.stub.rcp + '/' + @md.fnb
    end
  end
  def ab
    if output_dir_structure.by_language_code?
      output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
    else
      output_path.stub.rcp + '/' + @ft
    end
  end
  self
end

#relObject

def url

"#{@env.url.root}"

end



1660
1661
1662
1663
# File 'lib/sisu/se_file_op.rb', line 1660

def rel
  output_path.txt.rel + '/' \
  + base_filename.txt
end

#rel_imageObject



2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
# File 'lib/sisu/se_file_op.rb', line 2007

def rel_image
  if output_dir_structure.dump_or_redirect?
    './image'
  elsif output_dir_structure.by_language_code?
    '../../_sisu/image'
  elsif output_dir_structure.by_filetype?
    '../_sisu/image'
  else
    '../_sisu/image'
  end
end

#rel_smObject



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
# File 'lib/sisu/se_file_op.rb', line 1591

def rel_sm
  def abc
    if output_dir_structure.by_language_code?
      @md.opt.lng + '/' + @ft
    elsif output_dir_structure.by_filetype?
      @ft
    else
      @md.fnb
    end
  end
  def ab
    if output_dir_structure.dump_or_redirect?
      '.'
    elsif output_dir_structure.by_language_code? \
    or output_dir_structure.by_filetype?
      '../' + @ft
    else '.'
    end
  end
  def ab_src
    locate="#{@ft}/#{@md.opt.fng}/#{Gt[:sisupod]}/#{Gt[:doc]}/#{@md.opt.lng}"
    if output_dir_structure.dump_or_redirect?
      '.'
    elsif output_dir_structure.by_language_code?
      '../../' + locate
    else
      '../' + locate
    end
  end
  def ab_pod
    if output_dir_structure.dump_or_redirect?
      '.'
    elsif output_dir_structure.by_language_code?
      '../../' + @ft
    else
      '../' + @ft
    end
  end
  self
end

#rstObject



344
345
346
347
348
349
# File 'lib/sisu/se_file_op.rb', line 344

def rst
  path=output_path.rst.dir
  make_path(path)
  fn=base_filename.rst
  make_file(path,fn)
end

#set_path(ft) ⇒ Object



1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'lib/sisu/se_file_op.rb', line 1484

def set_path(ft)
  @ft=ft
  def dir
    def abc
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      elsif output_dir_structure.by_language_code?
        output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        output_path.base.dir + '/' + @ft
      else
        output_path.base.dir + '/' + @md.fnb
      end
    end
    def ab
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      elsif output_dir_structure.by_language_code?
        output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
      else
        output_path.base.dir + '/' + @ft
      end
    end
    def ab_src
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      else
        output_path.base.dir + '/' \
          + @ft + '/' \
          + @md.opt.fng + '/' \
          + Gt[:sisupod] + '/' \
          + Gt[:doc] + '/' \
          + @md.opt.lng
      end
    end
    def ab_pod
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      else
        output_path.base.dir + '/' + @ft
      end
    end
    self
  end
  def url
    def abc
      if output_dir_structure.by_language_code?
        output_path.base.url + '/' + @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        output_path.base.url + '/' + @ft
      else
        output_path.base.url + '/' + @md.fnb
      end
    end
    def ab
      if output_dir_structure.by_language_code?
        output_path.base.url + '/' + @md.opt.lng + '/' + @ft
      else
        output_path.base.url + '/' + @ft
      end
    end
    def ab_src
      output_path.base.url + '/' \
        + @ft + '/' \
        + @md.opt.fng + '/' \
        + Gt[:sisupod] + '/' \
        + Gt[:doc] + '/' \
        + @md.opt.lng
    end
    def ab_pod
      output_path.base.url + '/' + @ft
    end
    self
  end
  def rel
    def abc
      if output_dir_structure.by_language_code?
        @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        @ft
      else
        @md.fnb
      end
    end
    def ab
      if output_dir_structure.by_language_code?
        @md.opt.lng + '/' + @ft
      else
        @ft
      end
    end
    def ab_src
      @ft
    end
    def ab_pod
      @ft
    end
    self
  end
  def rel_sm
    def abc
      if output_dir_structure.by_language_code?
        @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        @ft
      else
        @md.fnb
      end
    end
    def ab
      if output_dir_structure.dump_or_redirect?
        '.'
      elsif output_dir_structure.by_language_code? \
      or output_dir_structure.by_filetype?
        '../' + @ft
      else '.'
      end
    end
    def ab_src
      locate="#{@ft}/#{@md.opt.fng}/#{Gt[:sisupod]}/#{Gt[:doc]}/#{@md.opt.lng}"
      if output_dir_structure.dump_or_redirect?
        '.'
      elsif output_dir_structure.by_language_code?
        '../../' + locate
      else
        '../' + locate
      end
    end
    def ab_pod
      if output_dir_structure.dump_or_redirect?
        '.'
      elsif output_dir_structure.by_language_code?
        '../../' + @ft
      else
        '../' + @ft
      end
    end
    self
  end
  def rcp
    def abc
      if output_dir_structure.by_language_code?
        output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        output_path.stub.rcp + '/' + @ft
      else
        output_path.stub.rcp + '/' + @md.fnb
      end
    end
    def ab
      if output_dir_structure.by_language_code?
        output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
      else
        output_path.stub.rcp + '/' + @ft
      end
    end
    self
  end
  self
end

#sisugitObject



1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
# File 'lib/sisu/se_file_op.rb', line 1707

def sisugit
  def dir
    output_path.base.dir + '/git'
  end
  def url
    output_path.base.url + '/git'
  end
  def rel
    output_path.base.rel + '/git'
  end
  def rcp
    output_path.base.rcp + '/git'
  end
  self
end

#sisupodObject



751
752
753
754
755
756
757
758
759
760
761
# File 'lib/sisu/se_file_op.rb', line 751

def sisupod
  def dir
    output_path.sisupod.dir + '/' \
    + base_filename.sisupod
  end
  def rel
    output_path.sisupod.rel + '/' \
    + base_filename.sisupod
  end
  self
end

#sitemap(fh = nil) ⇒ Object



1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
# File 'lib/sisu/se_file_op.rb', line 1357

def sitemap(fh=nil)
  fh=default_hash_build(fh,Sfx[:xml])
  fh[:lng]=lang_code?(fh[:lng])
  fnh=if output_dir_structure.by_language_code?
    {
      fn: fh[:fn] + '.sitemap',
      ft: fh[:ft],
    }
  elsif output_dir_structure.by_filetype?
    {
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
  else
    {
      fn: 'sitemap',
      ft: fh[:ft],
      lng: fh[:lng],
    }
  end
  i18n(fnh)
end

#sitemapsObject



2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
# File 'lib/sisu/se_file_op.rb', line 2517

def sitemaps
  def ft
    'sitemaps'
  end
  def dir
    set_path(ft).dir.ab
  end
  def url
    set_path(ft).url.ab
  end
  def rel
    set_path(ft).rel.ab
  end
  def rcp
    set_path(ft).rcp.ab
  end
  self
end

#sqliteObject

check url



2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
# File 'lib/sisu/se_file_op.rb', line 2535

def sqlite #check url
  def dir
    output_path.base.dir
  end
  def url
    output_path.base.url
  end
  def rel
    output_path.base.rel
  end
  def rcp
    output_path.base.rcp
  end
  self
end

#sqlite_discreteObject



718
719
720
721
722
723
724
725
726
727
728
# File 'lib/sisu/se_file_op.rb', line 718

def sqlite_discrete
  def dir
    output_path.sqlite_discrete.dir + '/' \
    + base_filename.sqlite_discrete
  end
  def rel
    output_path.sqlite_discrete.rel + '/' \
    + base_filename.sqlite_discrete
  end
  self
end

#srcObject

def pod

ft='pod'
path=set_path(ft).dir.ab

end



1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
# File 'lib/sisu/se_file_op.rb', line 1726

def src
  def dir
    output_path.src.dir + '/' \
      + base_filename.src
  end
  def rel
    output_path.src.rel + '/' \
    + base_filename.src
  end
  self
end

#stubObject



1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
# File 'lib/sisu/se_file_op.rb', line 1668

def stub
  def dir
    @md.opt.f_pth[:pth_stub]
  end
  #def url
  #  "#{@env.url.root}"
  #end
  def rel
    './' + @md.opt.f_pth[:pth_stub]
  end
  def rcp
    @md.opt.f_pth[:pth_stub]
  end
  self
end

#texinfoObject



429
430
431
432
433
434
# File 'lib/sisu/se_file_op.rb', line 429

def texinfo
  path=output_path.texinfo.dir
  make_path(path)
  fn=base_filename.texinfo
  make_file(path,fn)
end

#textileObject



326
327
328
329
330
331
# File 'lib/sisu/se_file_op.rb', line 326

def textile
  path=output_path.textile.dir
  make_path(path)
  fn=base_filename.textile
  make_file(path,fn)
end

#txtObject



320
321
322
323
324
325
# File 'lib/sisu/se_file_op.rb', line 320

def txt
  path=output_path.txt.dir
  make_path(path)
  fn=base_filename.txt
  make_file(path,fn)
end

#urlObject



1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
# File 'lib/sisu/se_file_op.rb', line 1536

def url
  def abc
    if output_dir_structure.by_language_code?
      output_path.base.url + '/' + @md.opt.lng + '/' + @ft
    elsif output_dir_structure.by_filetype?
      output_path.base.url + '/' + @ft
    else
      output_path.base.url + '/' + @md.fnb
    end
  end
  def ab
    if output_dir_structure.by_language_code?
      output_path.base.url + '/' + @md.opt.lng + '/' + @ft
    else
      output_path.base.url + '/' + @ft
    end
  end
  def ab_src
    output_path.base.url + '/' \
      + @ft + '/' \
      + @md.opt.fng + '/' \
      + Gt[:sisupod] + '/' \
      + Gt[:doc] + '/' \
      + @md.opt.lng
  end
  def ab_pod
    output_path.base.url + '/' + @ft
  end
  self
end

#web_baseObject



1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
# File 'lib/sisu/se_file_op.rb', line 1653

def web_base
  def dir
    @env.path.webserv
  end
  def url
    #"#{@env.url.root}"
  end
  def rel
    '.'
  end
  def rcp
    '.'
  end
  self
end

#webserver_pathObject



1683
1684
1685
1686
1687
1688
1689
1690
1691
# File 'lib/sisu/se_file_op.rb', line 1683

def webserver_path
  if output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  elsif output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst]
  else
    @env.path.webserv
  end
end

#write_fileObject



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/sisu/se_file_op.rb', line 319

def write_file
  def txt
    path=output_path.txt.dir
    make_path(path)
    fn=base_filename.txt
    make_file(path,fn)
  end
  def textile
    path=output_path.textile.dir
    make_path(path)
    fn=base_filename.textile
    make_file(path,fn)
  end
  def asciidoc
    path=output_path.asciidoc.dir
    make_path(path)
    fn=base_filename.asciidoc
    make_file(path,fn)
  end
  def markdown
    path=output_path.markdown.dir
    make_path(path)
    fn=base_filename.markdown
    make_file(path,fn)
  end
  def rst
    path=output_path.rst.dir
    make_path(path)
    fn=base_filename.rst
    make_file(path,fn)
  end
  def orgmode
    path=output_path.orgmode.dir
    make_path(path)
    fn=base_filename.orgmode
    make_file(path,fn)
  end
  def html_scroll
    pth=output_path.html.dir
    make_path(pth)
    p_fn=place_file.html_scroll.dir
    File.new(p_fn,'w+')
  end
  def html_seg_index
    pth=((output_dir_structure.by_filename?) \
    || (output_dir_structure.dump?)) \
    ? "#{output_path.html.dir}"
    : "#{output_path.html.dir}/#{@md.fnb}"
    make_path(pth)
    p_fn=place_file.html_seg_index.dir
    File.new(p_fn,'w+')
  end
  def html_segtoc
    pth=((output_dir_structure.by_filename?) \
    || (output_dir_structure.dump?) \
    || (output_dir_structure.redirect?)) \
    ? "#{output_path.html.dir}"
    : "#{output_path.html.dir}/#{@md.fnb}"
    make_path(pth)
    p_fn=place_file.html_segtoc.dir
    File.new(p_fn,'w+')
  end
  def xhtml
    path=output_path.xhtml.dir
    make_path(path)
    fn=base_filename.xhtml
    make_file(path,fn)
  end
  def xml_sax
    path=output_path.xml.dir
    make_path(path)
    fn=base_filename.xml_sax
    make_file(path,fn)
  end
  def xml_dom
    path=output_path.xml.dir
    make_path(path)
    fn=base_filename.xml_dom
    make_file(path,fn)
  end
  def xml_docbook_book
    path=output_path.xml_docbook_book.dir
    make_path(path)
    fn=base_filename.xml_docbook_book
    make_file(path,fn)
  end
  def xml_fictionbook
    path=output_path.xml_fictionbook.dir
    make_path(path)
    fn=base_filename.xml_fictionbook
    make_file(path,fn)
  end
  def xml_scaffold_structure_sisu
    path=output_path.xml_scaffold_structure_sisu.dir
    make_path(path)
    fn=base_filename.xml_scaffold_structure_sisu
    make_file(path,fn)
  end
  def xml_scaffold_structure_collapse
    path=output_path.xml_scaffold_structure_collapse.dir
    make_path(path)
    fn=base_filename.xml_scaffold_structure_collapse
    make_file(path,fn)
  end
  def manpage
    path=output_path.manpage.dir
    make_path(path)
    fn=base_filename.manpage
    make_file(path,fn)
  end
  def texinfo
    path=output_path.texinfo.dir
    make_path(path)
    fn=base_filename.texinfo
    make_file(path,fn)
  end
  def info
    path=output_path.texinfo.dir
    make_path(path)
    fn=base_filename.info
    make_file(path,fn)
  end
  def hash_digest
    path=output_path.hash_digest.dir
    make_path(path)
    fn=base_filename.hash_digest
    make_file(path,fn)
  end
  def qrcode
    path=output_path.qrcode.dir
    make_path(path)
    fn=base_filename.qrcode
    make_file(path,fn)
  end
  def manifest
    path=output_path.manifest.dir
    make_path(path)
    fn=base_filename.manifest
    make_file(path,fn)
  end
  def manifest_txt
    path=output_path.manifest.dir
    make_path(path)
    fn=base_filename.manifest_txt
    make_file(path,fn)
  end
  def po4a_cfg
    path=output_path.po4a.dir
    make_path(path)
    fn=base_filename.po4a_cfg
    make_file(path,fn)
  end
  def pot
    path=output_path.pot.dir
    make_path(path)
    fn=base_filename.pot
    make_file(path,fn)
  end
  def po(lng=@md.opt.lng)
    path=output_path.po(lng).dir
    make_path(path)
    fn=base_filename.po
    make_file(path,fn)
  end
  def po4a_sst(lng=@md.opt.lng)
    path=output_path.po4a_sst(lng).dir
    make_path(path)
    fn=base_filename.po4a_sst
    make_file(path,fn)
  end
  self
end

#xhtmlObject



381
382
383
384
385
386
# File 'lib/sisu/se_file_op.rb', line 381

def xhtml
  path=output_path.xhtml.dir
  make_path(path)
  fn=base_filename.xhtml
  make_file(path,fn)
end

#xhtml_cssObject



264
265
266
# File 'lib/sisu/se_file_op.rb', line 264

def xhtml_css
  default_output_css
end

#xmlObject



2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
# File 'lib/sisu/se_file_op.rb', line 2155

def xml
  def ft
    'xml'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    '../../_sisu/image'
  end
  self
end

#xml_cssObject



267
268
269
# File 'lib/sisu/se_file_op.rb', line 267

def xml_css
  default_output_css
end

#xml_docbookObject



2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'lib/sisu/se_file_op.rb', line 2187

def xml_docbook
  def ft
    'docbook'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    '../../_sisu/image'
  end
  self
end

#xml_docbook_articleObject



2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
# File 'lib/sisu/se_file_op.rb', line 2211

def xml_docbook_article
  def ft
    'docbook' \
      + DEVELOPER[:under_construction]
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    '../../_sisu/image'
  end
  self
end

#xml_docbook_bookObject



399
400
401
402
403
404
# File 'lib/sisu/se_file_op.rb', line 399

def xml_docbook_book
  path=output_path.xml_docbook_book.dir
  make_path(path)
  fn=base_filename.xml_docbook_book
  make_file(path,fn)
end

#xml_domObject



393
394
395
396
397
398
# File 'lib/sisu/se_file_op.rb', line 393

def xml_dom
  path=output_path.xml.dir
  make_path(path)
  fn=base_filename.xml_dom
  make_file(path,fn)
end

#xml_fictionbookObject



405
406
407
408
409
410
# File 'lib/sisu/se_file_op.rb', line 405

def xml_fictionbook
  path=output_path.xml_fictionbook.dir
  make_path(path)
  fn=base_filename.xml_fictionbook
  make_file(path,fn)
end

#xml_saxObject



387
388
389
390
391
392
# File 'lib/sisu/se_file_op.rb', line 387

def xml_sax
  path=output_path.xml.dir
  make_path(path)
  fn=base_filename.xml_sax
  make_file(path,fn)
end

#xml_scaffold_structure_collapseObject



417
418
419
420
421
422
# File 'lib/sisu/se_file_op.rb', line 417

def xml_scaffold_structure_collapse
  path=output_path.xml_scaffold_structure_collapse.dir
  make_path(path)
  fn=base_filename.xml_scaffold_structure_collapse
  make_file(path,fn)
end

#xml_scaffold_structure_sisuObject



411
412
413
414
415
416
# File 'lib/sisu/se_file_op.rb', line 411

def xml_scaffold_structure_sisu
  path=output_path.xml_scaffold_structure_sisu.dir
  make_path(path)
  fn=base_filename.xml_scaffold_structure_sisu
  make_file(path,fn)
end