/sug/.rocks https://sug.rocks/
 
 
 
 
 
Go to file
Kody ca466e42d1 Merge pull request '[Snyk] Security upgrade pillow from 9.3.0 to 9.4.0' (#12) from snyk-fix-4ec9760124209c3ee24a8bc54cf8615e into master
Reviewed-on: #12
2023-08-28 17:05:35 +00:00
.vscode cleaning I guess 2018-07-10 09:07:45 +02:00
api@ec91666777 update api submodule 2019-07-16 17:05:35 +00:00
config wow an update! can now force a thread to appear 2021-11-18 14:24:41 +00:00
go Remove piwik crap 2018-06-23 17:09:16 +00:00
public [ImgBot] Optimize images (#74) 2021-12-15 23:12:14 +01:00
templates Some updates I guess 2021-12-15 08:50:19 +00:00
tmp hello, again 2016-12-30 20:42:02 +01:00
.codeclimate.yml Add codeclimate 2017-08-24 21:12:21 +02:00
.csslintrc Add codeclimate 2017-08-24 21:12:21 +02:00
.eslintignore Add codeclimate 2017-08-24 21:12:21 +02:00
.eslintrc.yml Add codeclimate 2017-08-24 21:12:21 +02:00
.flake8 fix flake8 2017-10-31 14:58:17 +01:00
.gitignore Let's just get yarn and all deps 2019-09-04 22:27:07 +02:00
.gitlab-ci.yml Looks like yarn is now installed by default 2019-12-29 11:40:48 +00:00
.gitmodules update to gitlab 2017-10-19 20:38:32 +00:00
.python-version First run fix; Set version to py3.7.1 2018-11-09 09:11:07 +01:00
.snyk fix: .snyk & package.json to reduce vulnerabilities 2020-05-12 19:13:16 +00:00
LICENSE Updated LICENSE 2017-01-29 19:29:32 +01:00
README.md Update badges, remove travis and sonar 2021-04-29 12:21:39 +00:00
dllist.py Update files and links and use a domain that doesn't break in CF 2020-04-12 12:32:03 +00:00
getkoschedule.py minor fixes and update leakbot 2017-11-17 00:51:47 +01:00
getschedule.py minor fixes and update leakbot 2017-11-17 00:51:47 +01:00
minify.js drop unsupported node-minify for terser 2019-09-04 22:18:00 +02:00
package.json Bump snyk from 1.996.0 to 1.1064.0 (#83) 2023-04-18 10:34:30 +02:00
requirements.txt Merge pull request '[Snyk] Security upgrade pillow from 9.3.0 to 9.4.0' (#12) from snyk-fix-4ec9760124209c3ee24a8bc54cf8615e into master 2023-08-28 17:05:35 +00:00
static.py Bring back leak page with data from CTOON 2017-12-30 19:04:07 +01:00
threads.py wow an update! can now force a thread to appear 2021-11-18 14:24:41 +00:00
yarn.lock Bump semver from 5.7.1 to 5.7.2 (#85) 2023-07-11 11:19:58 +02:00

README.md

/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