fetch_ORE
"""
Copyright 2020 (C) New Entity Operations Inc.
ALL RIGHTS RESERVED
fetch_ORE generates a Key, Value relationship for the local ORE indexer
It also has a built in lookup to generate a list of Character outputs. This can be augmented to
take and provide output.
"""
## Imports: Standard
from re import split
## Imports: Custom
from core_middlelayer import (
DIRDATA,
SLUG_ORE_LEDGER,
)
## Import: Resource Pool
from .ResourcePool import POOL_ORE
## Establish values
no_quantity = /
POOL_ORE.no_quantity
simple_state = /
POOL_ORE.simple_state
simple_state_character_explorer = /
POOL_ORE.simple_state_character_explorer
# Manipulators
R_VALUE = /
POOL_ORE.R_VALUE
VECTOR_SPLITTER = /
POOL_ORE.VECTOR_SPLITTER
## ORE 'setup_dict'
ORE = {}
# This can be pulled from various .es files too in more complex forms
# but the base example is this.
with open(DIRDATA+SLUG_ORE_LEDGER, R_VALUE) as construct_ore:
for line in construct_ore:
split_line = split(VECTOR_SPLITTER, line)
key_split = split_line[no_quantity]
value_split = split_line[simple_state]
ORE.update({key_split:value_split})
construct_ore.close()
# Key lookup possibilty
for l in enumerate(ORE.keys()):
print(l)
class CharacterSearch:
"""
If you're trying to find various encoded values, you can look for them here by expanding
increasing the range
"""
def generate_character_list():
# Character encoding translator
character_to_explore = simple_state_character_explorer
for i in range(character_to_explore):
print(chr(i))
Return HOME