wiki.setup 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #!/usr/bin/perl
  2. # Ikiwiki setup automator (modificado)
  3. # Instrucoes: ikiwiki -setup wiki.setup
  4. require IkiWiki::Setup::Automator;
  5. our $wikiname=IkiWiki::Setup::Automator::ask(
  6. gettext("Qual sera o nome desta wiki?"), gettext("wiki"));
  7. our $wikiname_short=IkiWiki::Setup::Automator::sanitize_wikiname($wikiname);
  8. our $rcs="git";
  9. use Net::Domain q{hostfqdn};
  10. our $domain=hostfqdn() || IkiWiki::Setup::Automator::ask(
  11. gettext("What is the domain name of the web server?"), "localhost");
  12. our $admin=IkiWiki::Setup::Automator::ask(
  13. gettext("Which user (wiki account or openid) will be admin?"), $ENV{USER});
  14. our $adminemail=IkiWiki::Setup::Automator::ask(
  15. gettext("E-mail da(o) administrador(a)?"), "$ENV{USER}\@$domain");
  16. our $srcdir=IkiWiki::Setup::Automator::ask(
  17. gettext("Aonde o codigo fonte da wiki foi clonado?"), "$ENV{HOME}/$wikiname_short");
  18. our $repository=IkiWiki::Setup::Automator::ask(
  19. gettext("Aonde sera o repositorio da wiki? (omitir .git)"), "$ENV{HOME}/$wikiname_short");
  20. our $destdir=IkiWiki::Setup::Automator::ask(
  21. gettext("Aonde sera compilado o html? (diretorio do servidor web)"), "$ENV{HOME}/public_html/$wikiname_short");
  22. our $url=IkiWiki::Setup::Automator::ask(
  23. gettext("Qual sera o URL da wiki?"), "http://$domain/~$ENV{USER}/$wikiname_short");
  24. IkiWiki::Setup::Automator->import(
  25. wikiname => "$wikiname",
  26. adminuser => ["$admin"],
  27. rcs => "$rcs",
  28. srcdir => "$srcdir",
  29. destdir => "$destdir",
  30. repository => "$repository.".($rcs eq "monotone" ? "mtn" : $rcs),
  31. dumpsetup => "$srcdir/.ikiwiki/$wikiname_short.setup",
  32. url => "$url",
  33. cgiurl => "$url/ikiwiki.cgi",
  34. cgi_wrapper => "$destdir/ikiwiki.cgi",
  35. adminemail => $adminemail,
  36. add_plugins => [qw{goodstuff websetup gitpush attachment calendar comments html listdirectives relativedate remove rename search sidebar theme trail txt userlist 404}],
  37. disable_plugins => [qw{}],
  38. libdir => "$ENV{HOME}/.ikiwiki",
  39. rss => 1,
  40. atom => 1,
  41. syslog => 1,
  42. reverse_proxy => 1,
  43. only_committed_changes => 1,
  44. verbose => 1,
  45. usedirs => 1,
  46. prefix_directives => 1,
  47. indexpages => 1,
  48. discussion => 1,
  49. discussionpage => 'discussao',
  50. html5 => 1,
  51. sslcookie => 0,
  52. default_pageext => 'mdwn',
  53. htmlext => 'html',
  54. timeformat => '%c',
  55. locale => 'pt_BR.UTF-8',
  56. userdir => 'users',
  57. numbacklinks => 0,
  58. responsive_layout => 1,
  59. branchable => 1,
  60. anonpush => 1,
  61. branchable_action => 1,
  62. allowrss => 0,
  63. multimarkdown => 1,
  64. comments_pagespec => '*',
  65. comments_closed_pagespec => '',
  66. comments_pagename => 'comment_',
  67. comments_commit => 1,
  68. comments_allowformats => 'mdwn, html',
  69. repositories => [],
  70. theme => 'actiontabs',
  71. archivebase => 'archives',
  72. archive_pagespec => '*',
  73. calendar_autocreate => '',
  74. calendar_fill_gaps => 1,
  75. directive_description_dir => 'ikiwiki/directive',
  76. aggregateinternal => 1,
  77. autoindex_commit => 1,
  78. prettydateformat => '%X, %B %o, %Y',
  79. recentchangespage => 'recentchanges',
  80. recentchangesnum => 100,
  81. global_sidebars => 1,
  82. tagbase => 'tag',
  83. tag_autocreate => 1,
  84. tag_autocreate_commit => 1,
  85. filetypes_conf => /etc/highlight/filetypes.conf,
  86. langdefdir => /usr/share/highlight/langDefs,
  87. websetup_unsafe => [],
  88. websetup_show_unsafe => 1,
  89. );