constants 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #
  2. # constants
  3. #
  4. # Common constants for the Dragora GNU/Linux-Libre website scripts
  5. #
  6. #
  7. # Copyright (C) 2021, 2022 Michael Siegel
  8. #
  9. # Licensed under the Apache License, Version 2.0 (the "License");
  10. # you may not use this file except in compliance with the License.
  11. # You may obtain a copy of the License at
  12. #
  13. # http://www.apache.org/licenses/LICENSE-2.0
  14. #
  15. # Unless required by applicable law or agreed to in writing, software
  16. # distributed under the License is distributed on an "AS IS" BASIS,
  17. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. # See the License for the specific language governing permissions and
  19. # limitations under the License.
  20. ## Name of invoked command
  21. declare -r PROGNAME="${0##*/}"
  22. ## External commands
  23. declare -r TOOLS='cat cmp cp cut grep ln mkdir mv rm rsync sort wc'
  24. declare -r GNU_TOOLS='date find sed stat'
  25. ## Source directories and files
  26. declare -r SOURCE_DIR=source
  27. declare -r COMMON_DIR="$SOURCE_DIR"/common
  28. declare -r PAGES_DIR="$SOURCE_DIR"/pages
  29. declare -r PAGES_DIR_MASTER="$PAGES_DIR"/en
  30. declare -r TMP_DIR="$SOURCE_DIR"/tmp
  31. declare -r FOOTER_PARAMS=footer_params
  32. declare -r HEADER_PARAMS=header_params
  33. declare -r HOME_PAGE_DIR=home
  34. declare -r HOME_PAGE="$HOME_PAGE_DIR"/index.html.in
  35. declare -r NEWS_PAGE=news/index.html.in
  36. declare -r NAVTREE_FILE="$PAGES_DIR"/navtree
  37. declare -r SOURCE_PAGE_FILENAME=index.html.in
  38. ## Common directories and files (common among $SOURCE_DIR and $OUTPUT_DIR)
  39. declare -r CSS_DIR=css
  40. declare -r STYLESHEET=main.css
  41. declare -r STYLESHEET_PATH="$CSS_DIR/$STYLESHEET"
  42. declare -r IMG_DIR=img
  43. declare -r FAVICON=dragora.ico
  44. declare -r FAVICON_PATH="$IMG_DIR/$FAVICON"
  45. declare -r LOGO=dragora_logo.png
  46. declare -r LOGO_PATH="$IMG_DIR/$LOGO"
  47. ## HTML output indentation
  48. declare -r IND1=' ' # One level equals two spaces.
  49. declare -r IND2="${IND1}${IND1}"
  50. declare -r IND3="${IND2}${IND1}"
  51. declare -r IND4="${IND3}${IND1}"
  52. ## Output directory
  53. declare -r OUTPUT_DIR=output
  54. ## Interactive user interface
  55. declare -r PROMPT='> '
  56. declare -r HELP_TIP_INTERACTIVE='(? for help)'
  57. declare -r HELP_COMMAND='?'
  58. ## Misc
  59. declare -r COPYRIGHT_HOLDERS='The Dragora Team'
  60. declare -r COPYRIGHT_YEARS='2019–2022'
  61. declare -r DIR_UP='../'
  62. declare -r LATEST_NEWS_ITEMS=3
  63. declare -r SEPARATOR='|' # Used in <title></title>.
  64. declare -r SITE_TITLE=Dragora
  65. declare -r TIMEZONE=UTC