diff --git a/README.org b/README.org index 890cf43..c952b7b 100644 --- a/README.org +++ b/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 diff --git a/setup.py b/setup.py index f130698..38cf0a3 100644 --- a/setup.py +++ b/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") diff --git a/variables-template.py b/variables-template.py index 0ed904e..b32da46 100644 --- a/variables-template.py +++ b/variables-template.py @@ -1,3 +1,4 @@ +neocities = False servername = "" serverpath = "" subfolder = ""