Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Latest commit

 

History

History
113 lines (87 loc) · 3.68 KB

README.md

File metadata and controls

113 lines (87 loc) · 3.68 KB

/sug/.rocks

Standard - JavaScript Style Guide PEP8 Gitlab Pipeline Status

sug.rocks

Table of contents

Prerequisites

Install

git clone --recursive https://gitlab.com/ctoon/sug/website.git && cd website
yarn # JS/CSS deps
pip install -r requirements.txt -U # Python deps
cp config/threads-cache.ini.example config/threads-cache.ini
nano templates/op.txt # Add the OP template text here

Run

The threads.py script needs to constently run. You should probably make sure it can restart if it goes down, open a tmux session and use:

while true; do python threads.py; sleep 30; done

For the download list and the static pages, run:

python dllist.py
python static.py

And then you just point your favorite webserver (nginx, caddy, whatevever) to the public/ folder.

Docs

To compile the docs, install aglio.

npm install -g aglio

Then run it.

aglio -i api/sugrocks.apib -o api/index.html

What about the leakbot?

The leakbot has its own repository (ctoon/sug/leakbot@gitlab) and is a gitsubmodule in this repo.

If you forgot to do the --recursive when cloning: git submodule init && git submodule update

Compile SCSS to CSS

With the sass tool in your powerful terminal

sass public/scss/light.scss public/css/light.css --style compressed
sass public/scss/dark.scss public/css/dark.css --style compressed
sass public/scss/tumblr.scss public/css/tumblr.css --style compressed

With the Koala app

  • Add the public folder.
  • Only set scss/dark.scss, scss/light.scss and scss/tumblr.scss to Auto Compile, remove the other stuff.
  • Enable the "Source Map" and "Unix New Lines" options.
  • Make sure the "Output Style" is set to compressed.
  • Right-click and Set Output Path to the right css/*.css file for the selected .scss.
  • Edit your files with the app open in the background or press the compile button every time.

You should get something like this:

Linter notes

Make sure your code uses the standard-js and PEP8 standard styles (with minor exceptions).

# Test JS
npm test

# Test Python
flake8 --max-line-length=140 .

I'd recommand to install the corresponding linter plugins for your code IDE (like Atom, Sublime Text, VSCode, ...) to help you.

Thanks/Credits

  • People who donated for more server time
  • Dingo for the explanations used in leakbot
  • The YayPonies guys for the HD rips
  • Anons from /sug/
  • Cartoon Network and the Steven Universe team for this awesome show
  • BASC-py4chan by Bibliotheca Anonoma
  • Font Awesome by Dave Gandy