The git for the Python Story Utility Package library.

Related tags

General Utilitiessup
Overview

SUP

The git for the Python Story Utility Package library.

Installation:

Install SUP by simply running pip install psup in your terminal.

Check out our pypi page!!

Requirements:

Python 3.8+

Usage:

Here's a basic story:

from sup import Story

story = Story("story")
story.run()

That's all the code you have to type to make a terminal based text story / game. As for the actual story script, options paths and more that's all handled automatically from what you've written in your Story Utility Script (sus) file.

An example of a story

[STORY main]
Once upon a time a boy named Jack was strolling by the river.
Suddenly he heard something move in the bushes.
Jack was scared as he had no idea what the thing in the bushes could be.
- OPTION {{
	 Run away $$JUMP running-away,
	 Go towards the Bush $$STAY,
	 Do nothing $$SKIP 5
	 }}
As Jack slowly moved towards the Bush the sound became louder.
The Bush started shaking violently, Leaves scattered everywhere.
Jack grabs a stick from the ground to defend himself.
- ADDATTR stick
Suddenly, a giant boar emerged from the Bush.
The Boar started shouting, nearby birds started flying away and animals slowly emptied the area.
Even the fish in the river had become restless.
Upon hearing the Boar's shout Jack fell on his feet and started trembling.
The boar approached Jack.
- OPTION {{
	 Attack the Boar $$CHECKATTR stick $$JUMP fight,
	 Jump in the river $$STORY the-river
	 }}
Jack tried to attack the Boar with his fists but alas, it was useless.
The boar slowly approached Jack, it's shouts becoming louder and louder.
Jack started to shed tears of fear. 
The Boar rushed at Jack.....
...
It took the meat from Jack's bag and then left him alone.
Jack returned to his house while still trembling in fear.
- END
- TAG fight
Jack immediately started swinging his stick around, trying to get the Boar to run away.
The Boar was un-phased by Jack's attacks and started running towards him, now angrier than before.
The Boar attacked Jack...
Luckily a man with an axe appeared in the last moment and struck the Boar.
Jack saw the man and ran away to his house.
- END

[STORY running-away]
Jack ran away from the Bush.
As he ran away he bumped into a man with an axe.
- TAG hunter
That man was a hunter, he was looking for a Giant Boar that had escaped from him.
The hunter told Jack to stay safe and what the route out of the forest was.
Jack returned home safely. 
- END

[STORY the-river]
Jack jumped into the river.
The river swept Jack away.
Jack started to slowly drown but a man helped him get out of the river safely.
- JUMP hunter

more examples can be found in the atlas folder.

This might look like a bit too much to understand at once but I'll break it bit by bit.

The Syntax:

So there are a set of functions you can use in a sus file, being:

  • TAG Creates a tag at the line that it's on.
  • JUMP Jumps to a tag ignoring which sub-story it exists in.
  • SKIP Skips a provided amount of lines.
  • RETURN Goes back a provided amount of lines.
  • OPTION Makes options, each option has some text and the function ran when that option is selected separated by $$.
  • STAY Does nothing, used with other functions to do nothing.
  • END Ends the whole story.
  • ADDATTR Adds an attribute to the player.
  • DELATTR Deleted an attribute from the player.
  • CHECKATTR Checks if the played has an attribute, if so it runs the function supplied by $$.
  • CHECKNOTATTR does the opposite of CHECKATTR.

You can also specify sub stories by typing [STORY sub-story-name]. lines that are empty or start with # are regarded as comments and are treated as if they don't exist.

You might also like...
This utility lets you draw using your laptop's touchpad on Linux.
This utility lets you draw using your laptop's touchpad on Linux.

FingerPaint This utility lets you draw using your laptop's touchpad on Linux. Pressing any key or clicking the touchpad will finish the drawing

A small utility that sorts your files.

FileSorter A small utility that sorts your files. TODO: Scan directory to find files(thanks @corruptmemry for this!) Split extensions to determine fil

Utility to play with ADCS, allows to request tickets and collect information about related objects.

certi Utility to play with ADCS, allows to request tickets and collect information about related objects. Basically, it's the impacket copy of Certify

jfc is an utility to make reviewing ArXiv papers for your Journal Club easier.
jfc is an utility to make reviewing ArXiv papers for your Journal Club easier.

jfc is an utility to make reviewing ArXiv papers for your Journal Club easier.

Modest utility collection for development with AIOHTTP framework.

aiohttp-things Modest utility collection for development with AIOHTTP framework. Documentation https://aiohttp-things.readthedocs.io Installation Inst

Collection of code auto-generation utility scripts for the Horizon `Boot` system module

boot-scripts This is a collection of code auto-generation utility scripts for the Horizon Boot system module, intended for use in Atmosphère. Usage Us

Build capture utility for Linux

CX-BUILD Compilation Database alternative Build Prerequisite the CXBUILD uses linux system call trace utility called strace which was customized. So I

MongoDB utility to inflate the contents of small collection to a new larger collection

MongoDB Data Inflater ("data-inflater") The data-inflater tool is a MongoDB utility to automate the creation of a new large database collection using

A utility tool to create .env files

A utility tool to create .env files dump-env takes an .env.template file and some optional environmental variables to create a new .env file from thes

Comments
  • Format Python code with black

    Format Python code with black

    There appear to be some python formatting errors in 2711e4576fffbe5d0a141cdfa4163642537a8447. This pull request uses the black formatter to fix these issues.

    enhancement 
    opened by github-actions[bot] 0
  • SKIP function skips 1 lins less than it's supposed to.

    SKIP function skips 1 lins less than it's supposed to.

    Bug Description

    The SKIP function skips one line less then it's meant to.

    ie.

    SKIP 1
    some text
    some other text
    

    here it jumps to "some text".

    Reproduction Steps

    Type SKIP 1 Type 2 more lines after it. behold the result

    Expected Result

    SKIP entirely ignores the first text line.

    Actual Result

    SKIP does nothing leading it to end at line 1.

    Attachments

    Additional Info

    bug 
    opened by EnokiUN 0
  • Add a @custom_function decorator to the Story class

    Add a @custom_function decorator to the Story class

    Add a @custom_function decorator to the Story class that works by adding the function to the Story object's local function_dict to be more flexible and help with customization.

    enhancement 
    opened by EnokiUN 0
  • TODO

    TODO

    TODO v0.5.0

    No Current Ideas for what to do

    TODO v0.4.0

    Features:

    • [x] Adding a function function and a function system

    • [ ] Expanding Utils & Math

    • [ ] Adding Something Like UTILS ADD {{arg1, arg2}} while UTILS ADD arg1, arg2 can still be used

    Bug Fixes:

    • [x] Fixing Chain Functions

    • [x] Make Utils Work Better and Properly "how utils works is bad and sometimes errors out because it doesn't properly run the functions if supplied functions that is"

    bug documentation enhancement help wanted good first issue question 
    opened by VincentRPS 2
Releases(v1.0-rc1)
  • v1.0-rc1(Jan 11, 2022)

  • v0.4.0-rc1(Dec 13, 2021)

    Candidate

    Since this is a candidate you have to install it abnormally:

    pip install -U git+https://github.com/EnokiUN/psup/tree/v0.4.0-rc1
    

    What's Changed

    • SUP - > PSUP (Review it) by @GreenArron in https://github.com/EnokiUN/psup/pull/25
    • discord logo by @GreenArron in https://github.com/EnokiUN/psup/pull/26
    • Ehm by @VincentRPS in https://github.com/EnokiUN/psup/pull/28
    • We aren’t alpha males by @VincentRPS in https://github.com/EnokiUN/psup/pull/29
    • Mam I use pycharm by @VincentRPS in https://github.com/EnokiUN/psup/pull/30
    • minimal changes to text by @GreenArron in https://github.com/EnokiUN/psup/pull/33
    • Adding Typed by @VincentRPS in https://github.com/EnokiUN/psup/pull/37
    • MANIFEST by @VincentRPS in https://github.com/EnokiUN/psup/pull/36
    • Resuning To change by @VincentRPS in https://github.com/EnokiUN/psup/pull/35
    • proudly show our discord server at top by @GreenArron in https://github.com/EnokiUN/psup/pull/39
    • logos hermanos by @GreenArron in https://github.com/EnokiUN/psup/pull/40
    • PSUP v0.4.0 by @VincentRPS in https://github.com/EnokiUN/psup/pull/41
    • Adding Contributing Guidelines by @VincentRPS in https://github.com/EnokiUN/psup/pull/27
    • Fix API Docs by @VincentRPS in https://github.com/EnokiUN/psup/pull/42
    • New Docs Theme by @VincentRPS in https://github.com/EnokiUN/psup/pull/44
    • Format Python code with black by @github-actions in https://github.com/EnokiUN/psup/pull/45
    • v0.4.0-rc1 by @VincentRPS in https://github.com/EnokiUN/psup/pull/46

    New Contributors

    • @github-actions made their first contribution in https://github.com/EnokiUN/psup/pull/45

    Full Changelog: https://github.com/EnokiUN/psup/compare/v0.2a...v0.4.0-rc1

    Source code(tar.gz)
    Source code(zip)
  • v0.2a(Nov 21, 2021)

    Added a cli for quick use Added doccumentation at readthedocs.io Added some new features.

    What's Changed

    • adding logo.png by @GreenArron in https://github.com/EnokiUN/sup/pull/16
    • adding placeholder main.py by @GreenArron in https://github.com/EnokiUN/sup/pull/17
    • Adding CLI to the package by @GreenArron in https://github.com/EnokiUN/sup/pull/18
    • changing "--online-story" to "-online" by @GreenArron in https://github.com/EnokiUN/sup/pull/19
    • Pollos Hermanos by @GreenArron in https://github.com/EnokiUN/sup/pull/20

    Full Changelog: https://github.com/EnokiUN/sup/compare/v0.1.1a...v0.2a

    Source code(tar.gz)
    Source code(zip)
  • v0.1.1a(Nov 19, 2021)

    The first release

    Added all the basic SUP and SUS functionality including the functions.

    read the README.md file for more info

    v0.1.2a release & features planned.

    What's Changed

    • endorsement by @sexnine in https://github.com/EnokiUN/sup/pull/1
    • yes by @GreenArron in https://github.com/EnokiUN/sup/pull/2
    • sussy story for testing added by @GreenArron in https://github.com/EnokiUN/sup/pull/3
    • Rename sup.py to main.py by @VincentRPS in https://github.com/EnokiUN/sup/pull/4
    • Totally not stealing discord’s.pys setup by @VincentRPS in https://github.com/EnokiUN/sup/pull/5
    • Finished the sussystory + minor changes to main by @GreenArron in https://github.com/EnokiUN/sup/pull/6

    New Contributors

    • @sexnine made their first contribution in https://github.com/EnokiUN/sup/pull/1
    • @GreenArron made their first contribution in https://github.com/EnokiUN/sup/pull/2
    • @VincentRPS made their first contribution in https://github.com/EnokiUN/sup/pull/4

    Full Changelog: https://github.com/EnokiUN/sup/commits/v0.1.1a

    Source code(tar.gz)
    Source code(zip)
Owner
Enoki
Just a weeb who has a gaming addiction and likes to code stuff.
Enoki
A repository containing several general purpose Python scripts to automate daily and common tasks.

General Purpose Scripts Introduction This repository holds a curated list of Python scripts which aim to help us automate daily and common tasks. You

GDSC RCCIIT 46 Dec 25, 2022
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!

Ubelt is a small library of robust, tested, documented, and simple functions that extend the Python standard library. It has a flat API that all behav

Jon Crall 638 Dec 13, 2022
A tool to create the basics of a project

Project-Scheduler Instalação Para instalar o Project Maker, você necessita está em um ambiente de desenvolvimento Linux ou wsl com alguma distro debia

2 Dec 17, 2021
Simple python module to get the information regarding battery in python.

Battery Stats A python3 module created for easily reading the current parameters of Battery in realtime. It reads battery stats from /sys/class/power_

Shreyas Ashtamkar 5 Oct 21, 2022
Grank is a feature-rich script that automatically grinds Dank Memer for you

Grank Inspired by this repository. This is a WIP and there will be more functions added in the future. What is Grank? Grank is a feature-rich script t

42 Jul 20, 2022
Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything.

Retrying Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

Ray Holder 1.9k Dec 29, 2022
EthTx - Ethereum transactions decoder

EthTx - Ethereum transactions decoder Installation pip install ethtx Requirements The package needs a few external resources, defined in EthTxConfig o

398 Dec 25, 2022
Check username

Checker-Oukee Check username It checks the available usernames and creates a new account for them Doesn't need proxies Create a file with usernames an

4 Jun 05, 2022
A python package for your Kali Linux distro that find the fastest mirror and configure your apt to use that mirror

Kali Mirror Finder Using Single Python File A python package for your Kali Linux distro that find the fastest mirror and configure your apt to use tha

MrSingh 6 Dec 12, 2022
Daiho Tool is a Script Gathering for Windows/Linux systems written in Python.

Daiho is a Script Developed with Python3. It gathers a total of 22 Discord tools (including a RAT, a Raid Tool, a Nuker Tool, a Token Grabberr, etc). It has a pleasant and intuitive interface to faci

AstraaDev 32 Jan 05, 2023
Course-parsing - Parsing Course Info for NIT Kurukshetra

Parsing Course Info for NIT Kurukshetra Overview This repository houses code for

Saksham Mittal 3 Feb 03, 2022
cpp20.py is a Python script to compile C++20 code using modules.

cpp20.py is a Python script to compile C++20 code using modules. It browses the source files to determine their dependencies. Then, it compiles then in order using the correct flags.

Julien VERNAY 6 Aug 26, 2022
Gradually automate your procedures, one step at a time

Gradualist Gradually automate your procedures, one step at a time Inspired by https://blog.danslimmon.com/2019/07/15/ Features Main Features Converts

Ross Jacobs 8 Jul 24, 2022
Color box that provides various colors‘ rgb decimal code.

colorbox Color box that provides various colors‘ rgb decimal code

1 Dec 07, 2021
Dynamic key remapper for Wayland Window System, especially for Sway

wayremap Dynamic keyboard remapper for Wayland. It works on both X Window Manager and Wayland, but focused on Wayland as it intercepts evdev input and

Kay Gosho 50 Nov 29, 2022
Dependency Injector is a dependency injection framework for Python.

What is Dependency Injector? Dependency Injector is a dependency injection framework for Python. It helps implementing the dependency injection princi

ETS Labs 2.6k Jan 04, 2023
A (very dirty) experiment to remove layers from a Docker image.

Surgically remove layers from a Docker image (with a chainsaw)

Jérôme Petazzoni 9 Jun 08, 2022
Install, run, and update apps without root and only in your home directory

Qube Apps Install, run, and update apps in the private storage of a Qube. Build and install in Qubes Get the code: git clone https://github.com/micahf

Micah Lee 26 Dec 27, 2022
Python humanize functions

humanize This modest package contains various common humanization utilities, like turning a number into a fuzzy human-readable duration ("3 minutes ag

Jason Moiron 1.6k Jan 01, 2023
A tiny Python library for generating public IDs from integers

pids Create short public identifiers based on integer IDs. Installation pip install pids Usage from pids import pid public_id = pid.from_int(1234) #

Simon Willison 7 Nov 11, 2021