Add experimental neocities support
This commit is contained in:
parent
ee0879ef79
commit
dea672a13a
3 changed files with 16 additions and 7 deletions
16
README.org
16
README.org
|
@ -4,9 +4,12 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
|
|||
** Instructions
|
||||
*** Requirements
|
||||
- =python3= (needs the following libraries: =bs4, collections, datetime, itertools, os, random, re, requests=)
|
||||
- server space
|
||||
- subdomain pointing to your site root on the server
|
||||
- =rclone= with your server set up as a remote
|
||||
- either:
|
||||
- server space
|
||||
- subdomain pointing to your site root on the server
|
||||
- =rclone= with your server set up as a remote
|
||||
- or:
|
||||
- a neocities account with the [[https://neocities.org/cli][neocities CLI]] installed
|
||||
*** Setup
|
||||
- Download and create the initial files by running:
|
||||
#+BEGIN_SRC bash
|
||||
|
@ -17,9 +20,10 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
|
|||
cp trade-template.py trade.py
|
||||
#+END_SRC
|
||||
- Edit =variables.py= to set the variables as follows:
|
||||
- =servername=: name set for your remote in =rclone=
|
||||
- =serverpath=: path to the site root on the server (with leading slash, without trailing slash)
|
||||
- =subfolder=: subfolder under your (sub)domain in which the TCG pages will be located (leave as an empty string if they are at the top level)
|
||||
- =neocities=: set to =True= if you will be using the neocities CLI
|
||||
- =servername=: name set for your remote in =rclone= (if not using the neocities CLI)
|
||||
- =serverpath=: path to the site root on the server (if not using the neocities CLI; with leading slash, without trailing slash)
|
||||
- =subfolder=: subfolder under your (sub)domain in which the TCG pages will be located (leave as an empty string if they are at the top level; if using the neocities CLI this will not work and the pages will be uploaded to the site root)
|
||||
- =url=: URL of your site index page including =https://=
|
||||
- =name=: the name you use in the game
|
||||
- =hovertext=: text to display when hovering over the header image
|
||||
|
|
6
setup.py
6
setup.py
|
@ -2,7 +2,11 @@ import os
|
|||
import variables
|
||||
|
||||
buildscript = open("build.sh","w")
|
||||
buildscript.write("#!/usr/bin/env bash && python3 colors.py\n\nrclone copy build " + variables.servername + ":" + variables.serverpath + " -P -L")
|
||||
buildscript.write("#!/usr/bin/env bash && python3 colors.py\n\n")
|
||||
if variables.neocities:
|
||||
buildscript.write("neocities push")
|
||||
else:
|
||||
buildscript.write("rclone copy build " + variables.servername + ":" + variables.serverpath + " -P -L")
|
||||
buildscript.close()
|
||||
|
||||
fontloc = open("build/font.css","w")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
neocities = False
|
||||
servername = ""
|
||||
serverpath = ""
|
||||
subfolder = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue