refresh 1.2 KB

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. #this script executes a python script for html and rss updating
  3. if [ ! -d "entries" ] || [ ! -d "public_html" ]; then
  4. echo "You haven't initialized nci system yet... Please use \"./init\" before posting a new entry."
  5. exit 1
  6. fi
  7. if [ ! -f "nci.conf" ]; then
  8. echo "Congrats! You deleted your configuration file. Now nci can't work. You are really smart :)"
  9. echo "To fix this problem, create a file named \"nci.conf\" in this directory, and fill it with the following data:"
  10. echo "1st line - Your neocities username (without \".neocities.org\" at the end of the string)."
  11. echo "2nd line - The filename of your blog html file (without \".html\" at the end of the string)."
  12. echo
  13. echo "Now try not to delete your configuration file, you dumb."
  14. exit 1
  15. fi
  16. if [ ! -f "public_html/articles/article_template.html" ]; then
  17. echo "Well, this is nice. You deleted the article template html file (\"public_html/entries_html/article_template.html\"). Now nci can't work."
  18. echo "To fix this problem, you have no option other than running ./init again and input your current blog information to generate a new template file."
  19. echo "Once you fixed this crap, DON'T delete anything that's part of nci system. Good luck."
  20. exit 1
  21. fi
  22. python3 refresh.py