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
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.

Lark - Parsing Library & Toolkit 3.5k Jan 05, 2023
A workflow management tool for numerical models on the NCI computing systems

Payu Payu is a climate model workflow management tool for supercomputing environments. Payu is currently only configured for use on computing clusters

The Payu Organization 11 Aug 25, 2022
✨ Voici un code en Python par moi, et en français qui permet de générer du texte Lorem.

Lorem Gen ❗ Voici un code en Python par moi, et en français qui permet de générer du texte Lorem. Dépendences : pip install lorem_text 💖 Enjoy 🎫 Mon

MrGabin 3 Jun 07, 2021
A python app which aggregates and splits costs from multiple public cloud providers into a csv

Cloud Billing This project aggregates the costs public cloud resources by accounts, services and tags by importing the invoices from public cloud prov

1 Oct 04, 2022
A simple and easy to use collection of random python functions.

A simple and easy to use collection of random python functions.

Diwan Mohamed Faheer 1 Nov 17, 2021
This two python programs can convert km to miles and miles to km

km-to-miles These two little python programs can convert kilometers to miles and miles to kilometers Needed Python3 or a online python compiler with t

Chandula Janith 3 Jan 30, 2022
Factoral Methods using two different method

Factoral-Methods-using-two-different-method Here, I am finding the factorial of a number by using two different method. The first method is by using f

Sachin Vinayak Dabhade 4 Sep 24, 2021
An awesome tool to save articles from RSS feed to Pocket automatically.

RSS2Pocket An awesome tool to save articles from RSS feed to Pocket automatically. About the Project I used to use IFTTT to save articles from RSS fee

Hank Liao 10 Nov 12, 2022
This repository contains scripts that help you validate QR codes.

Validation tools This repository contains scripts that help you validate QR codes. It's hacky, and a warning for Apple Silicon users: the dependencies

Ryan Barrett 8 Mar 01, 2022
Lock files using python and cmd

Python_Lock_Files Lock files using python and cmd license feel free to do whatever you want to with these files, i dont take any responsibility tho, u

1 Nov 01, 2021
EVE-NG tools, A Utility to make operations with EVE-NG more friendly.

EVE-NG tools, A Utility to make operations with EVE-NG more friendly. Also it support different snapshot operations with same style as Libvirt/KVM

Bassem Aly 8 Jan 05, 2023
Python Libraries with functions and constants related to electrical engineering.

ElectricPy Electrical-Engineering-for-Python Python Libraries with functions and constants related to electrical engineering. The functions and consta

Joe Stanley 39 Dec 23, 2022
Trying to replicate (albeit unsuccessfully) the phenomenon of boids using Ursina in a naive manner.

Boids_Boi Trying to replicate (albeit unsuccessfully) the phenomenon of boids using Ursina in a naive manner. Please install the Ursina module before

2 Oct 19, 2021
Extends the pyranges module with operations on joined genomic intervals

tiedpyranges Extends the pyranges module with operations on joined genomic intervals (e.g. exons of same transcript) Install with: pip install tiedpyr

Marco Mariotti 4 Aug 05, 2022
Allows you to canibalize methods from classes effectively implementing trait-oriented programming

About This package enables code reuse in non-inheritance way from existing classes, effectively implementing traits-oriented programming pattern. Stor

1 Dec 13, 2021
Entropy-controlled contexts in Python

Python module ordered ordered module is the opposite to random - it maintains order in the program. import random x = 5 def increase(): global x

HyperC 36 Nov 03, 2022
extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file.

GetTsite python Package extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file. Install $ pip install Get

laojunjun 7 Nov 21, 2022
Create powerful passwords easily and with many options with this program

Password_Generator About the Program: You can create powerful passwords with this program with many options easily! Features: You can copy the generat

Sina.f 0 Jul 14, 2022
Let's renew the puzzle collection. We'll produce a collection of new puzzles out of the lichess game database.

Let's renew the puzzle collection. We'll produce a collection of new puzzles out of the lichess game database.

Thibault Duplessis 96 Jan 03, 2023
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