Compare commits
No commits in common. "018f99c1d6002a14182e76363d6e89e9ead4c811" and "98350281993d8821cba71087f7ad8ad83e9dded7" have entirely different histories.
018f99c1d6
...
9835028199
12 changed files with 22 additions and 40 deletions
|
@ -5,8 +5,8 @@ __version__ = "0.0.1"
|
||||||
from os import linesep
|
from os import linesep
|
||||||
|
|
||||||
|
|
||||||
class Object:
|
class Class:
|
||||||
"""Root object."""
|
"""Root class."""
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
"""Return machine-readable state.
|
"""Return machine-readable state.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""Handle errors."""
|
"""Handle errors."""
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
|
|
||||||
class Error(Object, Exception):
|
class Error(Class, Exception):
|
||||||
"""Parent class for all errors."""
|
"""Parent class for all errors."""
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
|
|
||||||
class OS(Object, ABC):
|
class OS(Class, ABC):
|
||||||
"""Operating System."""
|
"""Operating System."""
|
||||||
|
|
||||||
def __init__(self, path: Path) -> None:
|
def __init__(self, path: Path) -> None:
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
from rwx.ps import Command
|
from rwx.ps import Command
|
||||||
|
|
||||||
|
|
||||||
class PM(Object, ABC):
|
class PM(Class, ABC):
|
||||||
"""Package Manager."""
|
"""Package Manager."""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
|
|
||||||
class Project(Object):
|
class Project(Class):
|
||||||
"""Parent class for any type of project."""
|
"""Parent class for any type of project."""
|
||||||
|
|
||||||
def __init__(self, file: Path) -> None:
|
def __init__(self, file: Path) -> None:
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from rwx import Object, txt
|
from rwx import Class, txt
|
||||||
|
|
||||||
|
|
||||||
class Command(Object):
|
class Command(Class):
|
||||||
"""Command to run."""
|
"""Command to run."""
|
||||||
|
|
||||||
def __init__(self, *arguments: str | tuple[str, ...]) -> None:
|
def __init__(self, *arguments: str | tuple[str, ...]) -> None:
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
"""FreeTube artists."""
|
|
||||||
|
|
||||||
from rwx import Object
|
|
||||||
|
|
||||||
|
|
||||||
class Artist(Object):
|
|
||||||
"""FreeTube artist."""
|
|
||||||
|
|
||||||
def __init__(self, uid: str, name: str) -> None:
|
|
||||||
"""Set uid & name.
|
|
||||||
|
|
||||||
:param uid: identifier
|
|
||||||
:type uid: str
|
|
||||||
:param name: label
|
|
||||||
:type name: str
|
|
||||||
"""
|
|
||||||
self.uid = uid
|
|
||||||
self.name = name
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""FreeTube channels."""
|
"""FreeTube channels."""
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
|
|
||||||
class Channel(Object):
|
class Channel(Class):
|
||||||
"""FreeTube channel."""
|
"""FreeTube channel."""
|
||||||
|
|
||||||
def __init__(self, uid: str, name: str) -> None:
|
def __init__(self, uid: str, name: str) -> None:
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""FreeTube playlists."""
|
"""FreeTube playlists."""
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
from .videos import Video
|
from .videos import Video
|
||||||
|
|
||||||
|
|
||||||
class Playlist(Object):
|
class Playlist(Class):
|
||||||
"""FreeTube playlist."""
|
"""FreeTube playlist."""
|
||||||
|
|
||||||
def __init__(self, uid: str, name: str) -> None:
|
def __init__(self, uid: str, name: str) -> None:
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""FreeTube profiles."""
|
"""FreeTube profiles."""
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
from .channels import Channel
|
from .channels import Channel
|
||||||
|
|
||||||
|
|
||||||
class Profile(Object):
|
class Profile(Class):
|
||||||
"""FreeTube profile."""
|
"""FreeTube profile."""
|
||||||
|
|
||||||
def __init__(self, uid: str, name: str) -> None:
|
def __init__(self, uid: str, name: str) -> None:
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""FreeTube settings."""
|
"""FreeTube settings."""
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
from .db import to_db
|
from .db import to_db
|
||||||
|
|
||||||
|
|
||||||
class Setting(Object):
|
class Setting(Class):
|
||||||
"""FreeTube setting."""
|
"""FreeTube setting."""
|
||||||
|
|
||||||
def __init__(self, uid: str, value: object) -> None:
|
def __init__(self, uid: str, value: object) -> None:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""FreeTube videos."""
|
"""FreeTube videos."""
|
||||||
|
|
||||||
from rwx import Object
|
from rwx import Class
|
||||||
|
|
||||||
|
|
||||||
class Video(Object):
|
class Video(Class):
|
||||||
"""FreeTube video."""
|
"""FreeTube video."""
|
||||||
|
|
||||||
def __init__(self, uid: str, name: str) -> None:
|
def __init__(self, uid: str, name: str) -> None:
|
||||||
|
|
Loading…
Reference in a new issue