Skip to main content

Scoro

Hello everyone! Scoro is a Python library for handling data by their file titles. Scoro handles and creates files based on user defined attributes while tracking those with similar attributes.

If you had a recipe folder, you could track the recipes based on type of dish, main ingredient, rating, etc. If you were working with a folder of books, you could track the author, title, year, rating, if you have read, etc. There would then be a text file log that contains each entry of that type.

Following our dessert recipe library example: A log would track each dish, main ingredient, and rating. If we were bakers, a log of dishes might look like this:

;cake
;custard
;parfait
pie
;syrup
tarte

Each dessert recipe stored would look have this format and look like this:

dessert-type_main-ingredient_rating.ext
pie_blueberry_3.txt
## a three start blueberry pie recipe

Notice in the log example above, some entries have a ; check in front while some do not. Those that are checked with a ; are not selected and those that do not have a check are selected. This is a handy feature of Scoro in that you could select all recipes of only a type, ingredient, and rating. If you wanted only the highest stars; you could set your ratings log up to look like:

;1
;2
3

This would only gather 3 / 3 star recipes. To gather the recipes, you would need to use the pull command. Pulling will return the file locations for each recipe or transfer all the files to an desired output location.

Installation

Use the package manager pip to install Scoro.

pip install Scoro

Usage

For usage within your own programs, here is a quick usage:

# Creates the object
p1 = scoro.Scoro()

# Adds logs
p1.add_log("dessert_type", "main_ingredient", "stars")

# Making a bunch of dishes. Content could be what you want!
desserts = ["cake", "pie"]
main_ingredient = ["blueberry", "apple", "Strawberry"]
stars = [1, 2, 3]

for entry in zip(desserts, main_ingredients, stars):
    recipe = "Recipe"
    p1.create(entry, content=recipe)
    
# Unchecks all three stars
p1.uncheck("3", log="stars")

# Pulls all the three star recipes 
p1.pull()

# Prints all recipes found
p1.post()


But, if you want to get creative, then here is the full docs:

import Scoro

# Initializes scoro
scoro_example = scoro.Scoro()

## Or with all possible options
## Storage - Path of Storage
## logs - Path of logs folder
## output - Path of output folder
## titles - Adds logs from title of string or list of strings
## reset - Reset all logs
## close - Autosettles (leave on)
## send - Sets pull to auto move files to output folder
scoro_example = scoro.Scoro(storage="./storage/", logs="./logs/", output="./output/",
                 titles=None, reset=False, close=True, send=False)


# Adds a log(s)
## title - string or list of strings for logs to add
scoro_example.add_log(title)

# Deletes a log
## title - string or list of strings for logs to delete
scoro_example.delete_log(title)

# Returns a dictionary of the log content
## title - string for log to return
scoro_example.get_log_content(title)

# Prints the contents of all logs
scoro_example.post()

# Creates a new file in storage based on your inputs
## Attributes - a list of terms for the filename (term1_term2_term-n)
## Content - The text within the document
## Extension - Default .txt
scoro_example.create(attributes, content, extention="txt")

# Pulls
## match - If you want the pull content to match only exactly what is unchecked
## send - If you want to pull content to your output folder
## output - Path of alternative output folder
scoro_example.pull(match=False, send=False, output="")

# Check / Unchecks a term
## Terms - String or list of strings to (un)check
## log - Optional specified log
scoro_example.check(terms, log="")
scoro_example.uncheck(terms, log="")

# Reset all logs
scoro_example.reset()

Release files for scoro 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scoro 1.1.0
File Size Uploaded
scoro-1.1.0.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scoro 1.1.0
File Interpreter ABI Platform
scoro-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / scoro-1.1.0.tar.gz

Download URL scoro-1.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
448c355cd9329ba04b7faa6e306a3265968c53f23ccd6745cdb8e992c6291d11
BLAKE2b-256 checksum
How to use checksums
1269cd065ae68762fed9c33bce9f6b1515a4d51454ac5a6d911fa11cff9c058b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / scoro-1.1.0-py3-none-any.whl

Download URL scoro-1.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97d2cb5beef11bb0173b74dba741d7fbef4a71c41e4d1af0bcac6c9b801216fb
BLAKE2b-256 checksum
How to use checksums
fccd692cd1853580c0f6a9d045b28707d04009ec9d35dcba71cc5bdb878ca71d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page