core_interface
"""
Copyright (C) 2020 New Entity Operations Inc.
ALL RIGHTS RESERVED
Overview
core_interface is the call logic to system interaction scripts and other
'system resources' such as audio, visual, or bus programs
core_interface calls the following with a brief overview of purpose:
1->N navigation: core_navigator
USAGE
>>> import core_interface
>>> core_interface.core_navigator
SETUP related if desired:
Run the setup.py function in config
Default: Off
Reasoning: After the initial setup, CONFIG.setup shouldn't be run
This programs holds the DIL (Default Interface Logic) and will interface with system resources
"""
## Imports: Standard
import datetime
import tkinter as ITL
## Imports: Standard->from
from os import (
chdir, ctermid, getcwd, getgid, getlogin, getuid, kill, name
)
from sys import (
byteorder, getfilesystemencoding
)
from pathlib import (
Path,
)
# Import system time keeper and clock/time settings
from time import (
sleep, strftime
)
## Imports: Custom
# core_middlelayer
from core_build import (
CORE_DIR,
STRUCTURE,
SystemPlatform
)
# core_middlelayer
from core_middlelayer import (
ARCHIVE_ENTITY_GZ, ARCHIVE_BYTE_VALUE,
COREES,
DIRACCESS, DIRBACKUP, DIRDATA, DIRDOCUMENTATION, DIRENTITIES,
DIRFIGMENT, DIRFIGMENT_STAGING, DIRFIGMENT_QUICK_FORMAT,
DIRIDENTITY, DIROPENPACKAGER,
ENTITY_LEDGER,
FIGMENT_LEDGER,
ENCODING_SET,
OPENPACKAGERINDEX,
PACKAGES,
PATH_FULL_CORE,
SLUGARCHIVE,
SH_SERVERUP,
VCNKEY_ALLOWED, VCNKEY_STRUCTURE
)
# Give yourself a set of operational extensions in the core_navigator script
# Methods in _navigator should aid in system operations
import core_navigator
## Platform check
# Run on loading of various 'core_*' program files or in the event of an audited OpenPackager
# slug
SystemPlatform.get_platform()
class SanityTestPlatform:
"""
Print the platform encoding
"""
def run():
print(getfilesystemencoding())
SystemPlatform.get_platform()
################################################################################
# Set for renaming in Version 1.1 along with others from (RENAME_LIST.ds)
# Updated: 12/18/2020. Proposed language (TripleCheck, or GoCheck
class SanityCheck:
"""
Default 'SanityCheck' to make sure multi-level imports are aligned
"""
def do():
"""
Execute the 'SanityCheck' Logic
"""
#**********************************************************#
# START: FINAL - BUILD CONFIRMATION #
#**********************************************************#
print(
"---------- START: FINAL - BUILD CONFIRMATION ----------\n"
)
GLOBAL_A = 'SANITY BUILD CHECK STARTING'
print(GLOBAL_A)
# Optional startup sleep
# sleep(2)
def simple_output():
global GLOBAL_A
GLOBAL_A = 'BUILD COMPLETE: YOU ARE A-OKAY!'
print(GLOBAL_A)
simple_output()
#**********************************************************#
# STOP: FINAL - BUILD CONFIRMATION #
#**********************************************************#
print(
"---------- STOP: FINAL - BUILD CONFIRMATION ----------\n"
)
################################################################################
class HTMLReadableFile():
"""
Generatre an HTML summary of the environment and defined features
"""
path_htmlreadablefile = DIROPENPACKAGER
def summaryize():
index = OPENPACKAGER_INDEX
SLUG_INDEX = path_htmlreadablefile+index
class TimeStamp:
def date_stamp_day():
"""
A time_stamp DAY routine for various tasks
"""
return(str(datetime.date.today()))
def time_stamp_time():
"""
A time_stamp TIME routine for various tasks
"""
return(str(datetime.datetime.now().time()))
################################################################################
# Package Lookup: Front End
################################################################################
# try: statement should replace this file read
class InspectMachinePackages:
"""
Display the packages installed in C.ORE, as summarized by PIP
"""
def inspect_packages():
with open(DIRDATA+PACKAGES) as f:
for line in f:
print(line)
f.close()
################################################################################
# SERVERALPHA: retrieve C.ORE state
################################################################################
class SERVERALPHA:
"""
SERVERALPHA is the base server that you get in Cognitive ORE and you're able to
start it up in various ways and have it function as an I/O server for you while you use other
instances. It has one common channel and allows for process siloing and multiple instances.
"""
from subprocess import Popen, PIPE
SERVERSELF_PID_LIST = []
SERVERSELF = Popen([PATH_FULL_CORE+SH_SERVERUP])
SERVERSELF_PID_LIST.append(SERVERSELF.pid)
class SERVER:
def MAKE(SEVERSELF):
# Load the server
print(SERVERALPHA.SERVERSELF_PID_LIST[0])
print("Doing: Subprocessing for core_server.py...")
def shutdown_routine(SERVERSELF):
from signal import SIGTERM
from subprocess import check_output
#def get_PROCESS_BY_NAME(process_name):
# return int(check_output(["pidof","-s",process_name]))
kill(SERVERALPHA.SERVERSELF_PID_LIST[0], SIGTERM)
SERVERALPHA.SERVERSELF_PID_LIST.clear()
SERVERALPHA.SERVERSELF_PID_LIST.append(SERVERSELF.pid)
# Create a second subprocess channel
def DECLUTTER_REQUESTER():
SERVERALPHA.SERVER.shutdown_routine(SERVERALPHA.SERVERSELF)
# Create a second subprocess channel
def NEW_MAKE_REQUESTER():
SERVERALPHA.DECLUTTER_REQUESTER()
SERVERALPHA.SERVER.MAKE(SERVERALPHA.SERVERSELF)
###############################################################################
# AIR: Entertainment Platform (EP): FRONTEND _FE MIDDLE LAYER TO MACHINE
###############################################################################
class Access:
"""
Virtual Content Network definition files: Set MASTERLIST and STRUCTURE
"""
path = DIRACCESS
def MASTERLIST():
"""
'MASTERLIST' contains the immutable defition
of what system member is able to modify the IPDVS
"""
vcn_key = VCNKEY_ALLOWED
def STRUCTURE():
"""
'STRUCTURE' contains the immutable definition
of what folder structures are allowed in the IDENTITY section
"""
vcn_key = VCNKEY_STRUCTURE
termid = ctermid()
cwd = getcwd()
print('Your currently in the '+termid+' terminal and in the'+cwd)
sleep(1)
print('Would you like to proceed?')
sleep(1)
print('Welp, nothing to do, goodbye...')
class Identity:
"""
Local-only files. Identity-dependent or defined file types only
"""
path = DIRIDENTITY
def PHOTO(entity):
"""
All 'PHOTO' files will adhere to the photo.entity/ds definitions
"""
entity = 'photo.ds'
def background(sub_entity):
"""
'background' files are images of a predetermined type
These images may be set to the system default image
"""
sub_entity = 'background.ds'
def badges(sub_entity):
"""
'badges' are files that represent or signify specific baseline access rules
"""
sub_entity = 'badges.ds'
def media(sub_entity):
"""
'media' are files that you're sharing with others over the network or on a local system
"""
sub_entity = 'media.ds'
def operator(sub_entity):
"""
'operator' images are those that are displayed while
the system member navigates public systems
"""
sub_entity = 'operator.ds'
def TAGLINE(entity):
"""
Define TAGLINE properties (Public when on a network)
TAGLINE_OPERATOR.entity/ds relationship files
should be altered through the defined way
and are immutable besides through the standard editing function
"""
entity = 'TAGLINE_OPERATOR.ds'
def OPERATOR_RULES(entity):
"""
Define a 'secret level' definition and baseline operationor rules for the system
OPERATOR_RULES.entity/ds relationship files
should not be altered and are immutable
"""
entity = 'OPERATOR_RULES.ds'
class Ring:
"""
Activated file type and file system specific operations
that can be used inside of the IPDVC
"""
path = 'RING'
def DOCUMENTS():
"""
Any .ds format that encapsulates a 'use_case' method for your machine
"""
entity = 'DOCUMENTS.ds'
class ENTITY:
"""
Entity files comprising data you've built or collected on your member machine.
All .entity/ds relationships are defined here
"""
def tally_core():
"""
Read the amount of 'streams' in the CORE.es file
"""
# Start at -1 and weight out the header count
i_local = -1
with open(DIRDATA+COREES, 'r') as f:
for line in f:
i_local =+ 1
# print(i)
return i_local
print(i_local)
f.close()
def tally_entities():
"""
Read the amount of Entities in the ENTITY_LEDGER.ds file
"""
i_local = -1
with open(DIRENTITIES+ENTITY_LEDGER, 'r') as f:
for line in f:
i_local =+ 1
# print(i)
return i_local
print(i_local)
f.close()
def tally_figments():
"""
Read the amount of Figments in the FIGMENT_LEDGER.ds file
"""
i_local = -1
with open(DIRFIGMENT+FIGMENT_LEDGER, 'r') as f:
for line in f:
i_local =+ 1
# print(i)
return i_local
print(i_local)
f.close()
def size():
"""
Read the size of your 'ENTITY_ARCHIVE.tar.gz'
"""
# shift to kilobytes >> 10
# shift to megabytes >> 20
# shift to gigabytes >> 30
z = ARCHIVE_BYTE_VALUE
return(Path(DIRBACKUP+ARCHIVE_ENTITY_GZ).stat().st_size >> 20, z)
def PROGRAMS(entity):
"""
All programs that run on the machine will exist here.
Programs under development do not belong here
You can define what types of programs can run,
along with various extensions and programming languages
"""
entity = 'PROGRAMS.ds'
def COLLECTIONS(sub_entity):
"""
Any open-source program that can be used as a standalone or functional code library
"""
sub_entity = 'COLLECTIONS.ds'
def LINUX(sub_entity):
"""
Any Linux based open-source program that can be either compiled or used in a static
fashion while operating the member machine
"""
sub_entity = 'LINUX.ds'
def WINE(sub_entity):
"""
Any external open-source or closed-source program,
run by a middle-layer program, WINE
that can be used while operating the member machine
"""
sub_entity = 'WINE.ds'
#############################################
# CORE SETTINGS
#############################################
class CORE:
"""
Cognitive ORE Overview
"""
#class COUNT:
# def tally_core():
# COUNTER.tally_core()
# On the fly code
def ACCESS():
pass
def CONFIG():
pass
def DATA():
pass
def DOCUMENTATION():
path_documentation = DIRDOCUMENTATION
# Base language features
about_entity_ds = 'ABOUT_ENTITY.ds'
about_entity_entity = 'ABOUT_ENTITY.entity'
changelog = 'changelog'
# Allowed Add-on languages
PHP = 'PHP/'
PYTHON = 'PYTHON/'
RUBY = 'RUBY/'
SLUG_ENTITY_DS = path_documentation+about_entity_ds
SLUG_ENTITY_ENTITY = path_documentation+about_entity_entity
SLUG_CHANGELOG = path_documentation+changelog
SLUG_DOCUMENTATION_PHP = path_documentation+PHP
SLUG_DOCUMENTATION_PYTHON = path_documentatino+PYTHON
SLUG_DOCUMENTATION_RUBY = path_documentation+RUBY
def FILTER():
"""
The FILTER automatically takes a setup file and creates a dispensable retrieval env
"""
def file_tree():
"""
Define the dispensable environment tree
"""
MACHINES = '|_|FILTER_MACHINES'
COMMUNICATION_RULES = '|_|FILTER_COMMUNICATION_RULES'
ADULT_CONTENT_DECIDER = '|_|FILTER_ADULT_CONTENT_DECIDER'
def ADULT_CONTENT_DECIDER():
"""
Define a Adult Content Policy (ACP) according to the operator
Stores the definitions in the FILTER_ADULT_CONTENT.RING file
"""
pass
def COMMUNICATION_RULES():
"""
Define rules for interacting with the inter-webs and other P2P networks
Stores the definitions in the FILTER_COMMUNICATION_RULES.RING file
"""
pass
def MACHINES():
"""
Define the functionality of your dispensable machine.
FROM_STOCK_0: Anything filtered into a FALSE category
FROM_STOCK_1: Anything filtered into a TRUE category
MACHINE_DATA: Anything you're able to use within the dispensable machine
i.e: vpn credentials
MACHINES: Public machine folder formats, both in Public and Archived format
TO_SFTP: All files you're sending over a network to a SFTP catch-all system
MULTI_PIPELINE: Any multi-paradigm database logic or storage slugs
"""
FROM_STOCK_0 = 'FROM_STOCK_0'
FROM_STOCK_1 = 'FROM_STOCK_1'
MACHINE_DATA = 'MACHINE_DATA'
MACHINES = 'MACHINES'
TO_SFTP = 'TO_SFTP'
MULTI_PIPELINE = 'MULTI_PIPELINE'
def EXPLORER_RIG():
"""
A public virtual explorer rig to browse the internet with a default dispensable
container
This should default to running through a proxy or vpn
"""
def attributes():
"""
Default EXPLORER_RIG functional folder system
"""
def block():
"""
Define network restrictions, whitelists, or blacklists here
Also stores the NETWORK_ACESS.RING folder
"""
def block_builder():
"""
Define logic blocks to impact your EXPLORER_RIG
"""
pass
def database():
"""
Display all local database types here. Higher function DBs should be
stored in the MULTI_PIPELINE folder according to a ruleset
"""
def database_builder():
"""
Local, basic DB field builder for various tasks
"""
pass
def interface_assets():
"""
If you're sharing a public index-slug (Your own HTML world page)
store the file types here
"""
def css():
"""
CSS file types for your public index-slug
"""
pass
def image():
"""
Various image formats that can be shared on your index-slug
"""
pass
def javascript():
"""
Javascipt files you're using that aren't embedded into your main
index-slug page
"""
pass
def skin():
"""
A 'skin' is a preset, created, or community shared visual aid for
your index-slug page
"""
pass
def RIG_VM():
"""
Virtual Machine formats can be run through here as a added security
layer
"""
def Virtual_Hard_Disks():
"""
Any .vhd formats or similar would go here
"""
pass
def Virtual_Machines():
"""
Any Virtual Machine mappers or setup/init logic goes here
"""
pass
def standard_library():
"""
Any automation functions needed for your EXPLORER_RIG
"""
pass
def universe():
"""
All objects discovered in your EXPLORER_RIG
"""
pass
def RECOVERY():
"""
Any crash logs or incomplete formats should be sent here as non-executable
"""
pass
def STARTING():
"""
A zipped, rar, tar, gzip, bzip, or other preset unpackable archive format of the
EXPLORER_RIG
"""
pass
def HARDWARE():
"""
Text version of your hardware specifications relevant to the low-level system
"""
command = 'lspci > HARDWARE/hardware.ds'
def IDENTITY():
pass
def LEARNING():
pass
def LICENSES(license):
licenses_path = 'LICENSES/'
license = 'LICENSE.ds'
SLUG_LICENSE = licenses_path+license
def OPENPACKAGER():
pass
def env(environment):
environment = 'core-env'
def cache(cache_file):
cache_file = '__pycache__'
on = 1
class COGNITIVEORE:
"""
Cognitive ORE Main Program
"""
def FormatOverview():
def about_entity_ds(about_overview):
about_overview = 'ABOUT_ENTITY.ds'
def about_entity_entity(about_overview):
about_overview = 'ABOUT_ENTITY.entity'
def readme(about_overview):
about_overview = 'README.ds'
def ComprisedPackages():
used_packages = 'all_packages.ds'
def ContributorsAndAuthors():
path_authors = 'LICENSES/'
authors = 'AUTHORS.ds'
SLUG_AUTHORS = path_authors+authors
authors_list = []
# append any authors here
authors_list.append('Ryan McKenna')
def Updates():
updates = 'changelog'
def COREMainFiles():
add = 'core_add.py'
# relies on CONFIG/
config = 'core_config.py'
count = 'core_count.py'
creator = 'core_creator.py'
gather = 'core_gather.py'
hash = 'core_hash.py'
# Front-end
interface = 'core_interface.py'
modify = 'core_modify.py'
navigator = 'core_navigator.py'
operations = 'core_operations.py'
# main assembler
main = 'CORE.py'
seek = 'core_seeker.py'
settings = 'core_settings.py'
view = 'core_view.py'
def EntityScriptDataFiles():
core = 'core.es'
structure = 'STRUCTURE.es'
def SupportFiles():
path_support_files = 'OPENPACKAGER/'
rip = 'z_rip-jaw-alpha.py'
mindex = 'z_see_mindex.py'
def SetupFiles():
def setup(file):
file = 'setup.py'
def configure(file):
file = 'config.ini'
def manifest(file):
"""
C.ORE MANIFEST: Version 1 - 03/20/2020
"""
file = 'MANIFEST.in'
def include(types):
"""
include block for the manifest
"""
# include block
include_list = []
include_list .append('changelog')
include_list .append('*.gitignore')
include_list .append(' *.ini')
include_list .append('*.py')
include_list .append('*.RING')
def exclude(types):
"""
exclude block for the manifest
"""
exclude_list = []
exclude_list .append('*.ds')
exclude_list .append('*.entity')
exclude_list .append('*.es')
exclude_list .append('*.pyc')
exclude_list .append('*.vcn')
def recursive_exclude(types):
"""
recursive_exclude block for the manifest 'recursive-exclude'
"""
recursive_exclude_list = []
recursive_exclude_list.append('CONFIG')
recursive_exclude_list.append('FILTER')
recursive_exclude_list.append('LEARNING')
###############################################
# Dugout - OOP to System Interface Commands
###############################################
class dugout:
"""
dugout modules allow for your system to funciton based of middle-layer function scripts
"""
# self.module = module
def dugout_directory(directory):
"""
dugout_directory is the root path of your dugout directory
"""
directory = '~/.dugout'
def feed_file(file):
"""
feed_file is the aggregator file that's used to import other dugout modules at runtime
"""
file = '.bashrc'
def bash_display(file):
"""
bash_display.dugout allows you to setup bash display output perameters
"""
file = bash_display.dugout
def connection_mainframe(file):
"""
connection_mainframe is a controller to do setup and perform backups from critical
systems
"""
file = 'connection_mainframe.dugout'
def core_manifest(file):
"""
core_manifest allows you to create a setup and run environment for C.ORE
"""
file = 'core_manifest.dugout'
def cron(file):
"""
cron allows you to create a setup and run environment for linked CRON scripts
"""
file = 'cron.dugout'
def disk_id(file):
"""
disk_id allows you to create and setup DISK_ID_SLUG locations by disk_id
"""
file = 'disk_id.dugout'
def disk_ops_id(file):
"""
disk_ops_id allows you to create and setupt disk related tasks, such as backups and branch
management
"""
file = 'disk_ops_id.dugout'
def editor(file):
"""
editor allows you to create a standardized editor for your system
"""
file = 'editor.dugout'
def folder(file):
"""
folder allows you to create default folder slug locations that can be used in other dugout
setup files or scripts
"""
file = 'folder.dugout'
def msdos_ops(file):
"""
msdos_ops allows you to abstract MSDOS commands into your default terminal output
program
"""
file = 'msdos_ops.dugout'
def network_ops_id(file):
"""
network_ops_id allows you to create baseline network or inter-web functions using a
variety of network interface
"""
file = 'network_ops_id.dugout'
def operator_id(file):
"""
operator_id allows you to setup a variety of default members for various activity
"""
file = 'operator_id.dugout'
operator = 'DEFAULT'
def pretty_things(file):
"""
pretty_things allows you to enhance the standard output of various types of return objects
"""
file = 'pretty_things.dugout'
def program_enhance(file):
"""
program_enhance can be used to export various standardized environment variables
only other people's programs should be exported here - see program_env for your own
exports
"""
file = 'program_enhance.dugout'
def program_env(file):
"""
program_env is used to export standarized environment variables for programs that you
own, created, or control fully
"""
file = 'program_env.dugout'
def run_program(file):
"""
run_program allows you to establish run-time environments defined system environments
prefix any program your own with "Program: "
do not prefix any programs that aren't yours with anything. Just write "# program_name"
"""
file = 'run_program.dugout'
def proxy_env_wn(file):
"""
proxy_env_wn is used to establish proxy variables and setup functions for alt web
connections
"""
file = 'proxy_env_wn.dugout'
def assignProxy():
pass
def clrProxy():
pass
def vtwoProxy():
pass
def proxy_special_env_wn(file):
"""
proxy_special_env_wn defines system export variables for a proxy_layer
"""
file = 'proxy_special_env_wn.dugout'
def shortcut_id(file):
"""
shortcut_id allows you to setup export variables to create summarized or aggregated
tasks according to a short code list
"""
file = 'shortcut_id.dugout'
def version_id(file):
"""
version_id allows you to create and maintain a unified_id for your system
"""
file = 'version_id.dugout'
def vpn_id(file):
"""
vpn_id allows you to setup and maintain VPN or Access point nodes
"""
file = 'vpn_id.dugout'
###############################################################################
class DisplayBar:
"""
'DisplayBar' receives embedded dynamic objects and methods in X, Y form
"""
def bar_height_y():
"""
'bar_height_y' is the Y->DisplayBar value in pixels
"""
pass
def bar_height_x():
"""
'bar_height_x' is the X->DisplayBar value in pixels
"""
pass
def bar_color():
"""
'bar_color' is the RGB meta-value of the 'DisplayBar'
"""
pass
def bar_position():
"""
'DisplayBar' relative position from position 0,0 pixels
0x,0y represents the top-left corner
"""
pass
def bar_locked():
"""
'DisplayBar' logic determining if the bar can be moved
"""
pass
def bar_immutable():
"""
'DisplayBar' logic determining if the bar can receive
additional entries, or if it's effectively immutable
"""
pass
###############################################################################
class authenticated:
"""
What 'operator' is authenticated?
What is their 'status' on the system?
Do login information tasks based off of dynamic inputs
"""
def what_member():
"""
Display brief details about what member is executing the current
command
"""
print("Brief: Operator Details")
getgid()
getuid()
print(getlogin())
def member_state(self, logged_in, unauthenticated, Admin):
"""
'logged in' will equal 0 for no, and 1 for yes
'unauthenticated' returns 1 when no privs are deteched
'Admin' returns 1 when system privs are deteched
"""
def __init__(self, logged_in, unauthenticated):
self.logged_in = logged_in
self.unauthenticated = unauthenticated
self.Admin = Admin
def member_quit():
"""
Allow the logged in operator to quit the application
If the Admin is being used, fall back to the system operator
If loggin is desired, 'log_exit' == 1
"""
pass
###############################################################################
class audio_interface:
"""
What audio interface is in use?
If any is defined, what is the current sound output variables
The percentage should be out of 100, from 0 being the none, to 100 being
the allowed maximum.
"""
def audio_interface_in_use():
"""
none or *, where * is the defined autio interface in use
"""
pass
def audio_volume_percentage():
"""
What is the volume percentage out of 100?
Recommended to start at 25% and work around from there.
"""
pass
def audio_current_channels():
"""
What programmatic channels are currerntly receiving
'audi_ output' from 'interface_in_use()'?
"""
pass
###############################################################################
class InterWeb:
"""
Are you connected to a Web Interface of any sort?
If yes, on what connection?
What is the state of the web connection?
Are you using a direct connection, or a Proxy?
"""
def connected():
"""
Define the Web Interface:
For each Interface->
1 if you're connected
0 if not
"""
pass
def disconnect():
"""
If YourInterface.connected == 1
disconnect() == enabled
else:
fail
"""
pass
def iweb_interface():
"""
What is the interface you're connected to the inter-web on?
"""
pass
###############################################################################
class VirtualizeSystem:
"""
virtualize a system from root-point X, in folder safe-root-point X1
'VirtualizeSystem' gives you methods to operate the machine
The machine operates in safe-root-point methodology
This methodology doesn't require a windowing system to function
This is done by defining and then binding the main C.ORE directory
to specified virtual directories for each task and routine
VE (Virtual Enhancements) NAT I/O Device Member (VENATIO) Overview:
Method 1 setup-file contents:
virtualize: ~/.CORE > to /home/$MEMBER/.CORE/RING/IPDVC/
as: READ-ONLY
with-member: system_member
credentials: git
"""
def initialize():
"""
Load the 'VirtualSystem' from root-point X at time Y
"""
pass
def new_system_root():
"""
The location_name of the new safe-root-point system
"""
location_name = None
###############################################################################
class LockedVault:
"""
Optional module containing your system dependent keys (GPG by default)
"""
def open_vault():
"""
Enter your valut key
"""
pass
def add_to_vault():
"""
Add a local or global key to your vault
"""
is_global = 0
is_local = 0
def add_to_vault_asset():
"""
Specify an asset to store within the vault, using key choice X
"""
pass
################################################################################
class DiskCrypt:
"""
Encrypt a disk at root point X with Hashing construct Y
"""
disk_point = 0
construct = 'sha512'
################################################################################
class GrabScreenPicture:
"""
Grab a photo-image of position X,Y from 0,0 default (upper left corner)
of size X,Y, and clarity Z and save in point S
and image_format_construct IF
"""
def image_type():
"""
Either full_screen, or section
"""
pass
def image_size():
"""
If full_screen = 0, then set size X,Y in pixels
"""
X = 0
Y = 0
def image_clarity():
"""
Determine the clarify of your image capture in DPI
"""
DPI = 200
def image_save_point():
"""
Set the image capture location
"""
pass
def image_format_construct():
"""
What type of image will this be saved as?
This should be set by the default 'allowed_image_formats' list
"""
pass
###############################################################################
class GrabScreenVideo:
"""
Grab video-image of position X,Y from 0,0, of size X,Y, and clarity Z and save in point S
and audio construct A with video_format_construct VF
"""
def video_type():
"""
Either full_screen, or section
"""
pass
def video_size():
"""
If full_screen = 0, then set size X,Y
"""
X = 0
Y = 0
def video_clarity():
"""
Determine the clarify of your video in DPI
"""
DPI = 200
def video_save_point():
"""
Set the photo-grab location
"""
pass
def video_audio_construct():
"""
set the audio output construct to use
"""
pass
def video_format_construct():
"""
What type of video will this be saved as?
"""
pass
###############################################################################
class SystemTime:
"""
Display the System Time in local units X and other various units X1-Xn
X1 is the default 'global' time and requires an internet connection
X2-Xn are defined by the 'operator'
"""
def time_now():
return(strftime('%H:%M:%S %p'))
###############################################################################
class quick_finder:
"""
Activate a new work space, with the default workspace being 'space_A'
Set the available 'workspace_pool'
"""
max_workspaces = 1
###############################################################################
class activate_commander:
"""
Activate whatever program you currently have in 'ENTITY_ACTIVE'
This program now takes command line inputs
"""
pass
###############################################################################
class activate_note:
"""
Use the program that's setup to record 'Basic Document Logic (BDL)
'core_add.py' is the default
"""
pass
###############################################################################
class activate_space:
"""
Various types of X,Y sized (in pixels) spacers
"""
def expanded():
"""
Move a space at point SeperatorP, to the maximum allowed length range
"""
pass
def dots():
"""
Make a line of 'dots' at point SeperatorP, of the default size dots_Size
"""
pass
def solid_line():
"""
Make a 'solid_line' at point SeperatorP, of the default size
'solid_line_Size'
"""
pass
def set_length():
"""
Global seperator size logic in pixels.
"""
pass
def block_standard():
"""
Default positioning for the SeperatorP globally available function
"""
pass
###############################################################################
class utility_functions:
"""
Commands to interact with stateful or preset configurations
"""
def program_killer():
"""
Kill the program by passing 'program_killer(program_to_kill)'
"""
pass
###############################################################################
class machine_temperature():
"""
Display various machine-based temperatures
"""
def gpu_temp():
"""
Get the current GPU temp in Fahrenheit
"""
pass
def cpu_temp():
"""
Get the current CPU temp in Fahrenheit
"""
pass
def additional_temps():
"""
Define the 'TemperatureInterface' input and set
default temperature unit standard (F, or C)
"""
pass
################################################################################
class cpu_cycles():
"""
Display the amount of cylces being performed by your cpu
Types: NOW, THEN, PREDICTED
"""
def current_ghz_scheduled():
"""
GHZ scheduled on the processor
"""
pass
def cpu_total():
"""
CPU cores in use
"""
pass
def cpu_by_core(core):
"""
CPU GHZ scheduled by core
"""
print(core)
###############################################################################
class NetTraffic:
"""
Define NetTraffic I/O logic
Inspect your network traffic after x seconds, for behavior Bx
"""
def net_traffic_down():
"""
Current inbound data on the interface in MB
"""
pass
def net_traffic_up():
"""
Current outbound data on the interface in MB
"""
pass
def define_interface():
"""
Establish a new 'VirtualNetworkInterface'
"""
pass
###############################################################################
class FolderPathTree:
"""
Display a tree of a folder from path X
"""
def starting_folder():
"""
Define the root of the tree
"""
pass
def ignore_folder_types():
"""
Define explicitly ignored sub-tree nodes from starting_folder()
"""
pass
###############################################################################
class DiskCapacityChecker:
"""
Display the space read-out of disk X in unit Y, and other disk details
"""
def inspect_disk():
"""
Provide basic details of the disk
"""
print('Inspecting '+name+' one moment')
sleep(1)
print('It looks like the byte order on your machine is')
print(byteorder)
sleep(1)
print('Current Encoding: '+getfilesystemencoding()+' .'+' .'+' .')
###############################################################################
class WordDictionary:
"""
Display all known words and definitions present in X language
X is English by default
"""
def inspect_words():
"""
UTF-8 representation of the word, in language X
"""
pass
##############################################################################
class RunPackage:
"""
Runs an allowed package X, from location Y, in 'ENTITY_ACTIVE'
"""
def run(package):
print(package)
##############################################################################
class DisplayVideo:
"""
Play a video file from point X that is of file format allowed Y
"""
def play(video):
"""
Play the video
"""
print(video)
def stop(video):
"""
Stop the video and destroy the link to point X
"""
pass
def trim(video):
"""
Trim the video from point P1, to point P2, and save P1-P2 as
file-format 'NewVideo'
"""
pass
##############################################################################
class PlayAudio:
"""
Play audio file from point X that is a file of allowed format Y
"""
def play(audio):
"""
Play the audio
"""
print(audio)
def stop(audio):
"""
Stop the audio and destroy the link to point x
"""
def trim(audio):
"""
Trim the audio from point P1, to point P2, and save P1-P2 as
file-format 'NewAudio'
"""
pass
##############################################################################
class DisplayStaticImage:
"""
Display a static_image file-type from point X that is a file format Y
"""
def play(static_image):
"""
Play the static_image from point X of allowed type Y
"""
print(static_image)
def destroy(static_image):
"""
Exit the static_image from point X, and destroy the association
"""
print(static_image)
def crop(static_image):
"""
Crop the static_image from current_size, CS, to new_size, NS
In pixels, (X, Y)
"""
print(static_image)
##############################################################################
class backup:
"""
Backup your system or individual parts of C.ORE
Toggle each feature on to 1, and off to 0
"""
# Define a preferred backup tool
backup_format = 'rsync'
def main():
"""
Define your main system-level backup functions
"""
NOVA = 'NOVA'
NOVA
FROM_FIVEA_TO_FIVEB = 'FROM_FIVEA_TO_FIVEB'
FROM_FIVEA_TO_FIVEB
def segment():
"""
Define your main tree-level backup functions
tree-level backups are specific nodes in the main system only
"""
backup_etc = 'backup_etc'
backup_etc
backup_home = 'backup_home'
backup_home
backup_sbin = 'backup_sbin'
backup_sbin
backup_var = 'backup_var'
backup_var
backup_usr = 'backup_usr'
backup_usr
def special():
"""
Define any behaviors to make new systems or perform new cases
"""
MULTIPLY_NOVA = 'MULTIPLY_NOVA'
MULTIPLY_NOVA
def adult():
"""
Default adult-entertianment routines
"""
ADULT_ONE = 'ADULT_ONE'
ADULT_ONE
def clone():
"""
Clone your system to a new system-location, using logic L1
"""
totheSNEWENTITYBOX = 'totheSNEWENTITYBOX'
totheSNEWENTITYBOX
###############################################################################
# Standard Startup: Setup Methodology Start
###############################################################################
setup_text = 'Setting up C.ORE...'
setup_stop = 'Done'
setup_encoding_a = ENCODING_SET
setup_encoding_b = 'Proceed with the standard setup in'
setup_encoding_c = '?'
class SetupStandard:
"""
Allow for a standard setup or custom one based off of 'encoding' and 'folder_layout'
"""
class build:
def tree():
"""
Build the tree in the file
"""
z = getfilesystemencoding()
if z == setup_encoding_a:
#**********************#
# START: STEP 6 #
#**********************#
print(
"---------- START: STEP 6 - ENCODING-based SHELL ----------"
)
print(setup_text)
chdir(CORE_DIR)
print('Setting up in',getcwd(),' Dir...')
print(
"---------- STOP: STEP 6 - ENCODING-based SHELL ----------\n"
)
#**********************#
# STOP: STEP 6 #
#**********************#
sleep(1)
#**********************#
# START: STEP 8 #
#**********************#
print(
"---------- START: STEP 8 - BUILD ----------"
)
with open(STRUCTURE) as f:
for line in f:
print(line)
f.close()
print(setup_stop)
print(
"---------- STOP: STEP 8 - BUILD ----------\n"
)
else:
#**********************#
# START: STEP 7 #
#**********************#
print(
"---------- START: STEP 6 - ENCODING-based SHELL ----------"
)
print(setup_encoding_b,z,setup_encoding_c)
print(setup_text)
print(
"---------- STOP: STEP 6 - ENCODING-based SHELL ----------\n"
)
#**********************#
# STOP: STEP 8 #
#*********************##
class SetupCustom:
pass
SetupStandard.build.tree()
************************
END OF PREVIEW PORTION
************************
Return HOME