anonymous group photoblog software
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
686 B

  1. #!/bin/sed -rnf
  2. # usage: ./config_defaults.sed config_defaults.pl > config_defaults.py
  3. s/\(('[^']*')\)/[\1]/g;
  4. s/\teval "use constant ([A-Z_]+) ?=> ?('.*'|[0-9\*]+|\[.*\])" unless.*$/\1 = \2/g;
  5. s/^1;$//;
  6. s/^BEGIN \{$//;
  7. s/^\}$//;
  8. s/^use strict;$//;
  9. s/^\tuse constant S_.*$//g;
  10. s/^\tdie S_.*$//g;
  11. s/ENABLE_POST_BACKUPS/POST_BACKUP/g;
  12. # multiline hack. remove consecutive newlines
  13. 1h;1!H;
  14. ${
  15. g;
  16. s/\n\n+/\n/g;
  17. s/$/\
  18. BOARD_DIR = \'\'\
  19. DEBUG = False\
  20. SERVER_NAME = 'localhost'\
  21. IDENTIFY_COMMAND = 'identify'\
  22. FG_ANIM_COLOR = 'white'\
  23. BG_ANIM_COLOR = '#660066'\
  24. # add default values to config.py\
  25. import util as _util\
  26. _util.module_default('config', locals())/;
  27. p;
  28. }