Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Architecture and syntax overhaul for further modularisation #41

Open
mueslo opened this issue Jun 1, 2018 · 0 comments
Open

Architecture and syntax overhaul for further modularisation #41

mueslo opened this issue Jun 1, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mueslo
Copy link
Owner

mueslo commented Jun 1, 2018

So pythonBits can be expanded to other trackers, too.

Targeted python syntax:

s = bb.TVSubmission(params)
s.fields (list all available fields)
-> container, video_codec, path, 

s.fields['container'] / s['container']
-> 'MKV'

s.form_fields
-> title, description, ...

s.form_fields['title']
-> this is the generated title

s.submit() -> s.site.post(s['payload'])
-> URL of posting or exception

Targeted command line syntax:

pythonbits bb <file>  # list default fields for media type
pythonbits bb list (<file> or -c <category>)  # list available fields and corresponding form_fields
pythonbits bb get screenshots title <file>
pythonbits bb submit <file> -f <somefield> <somevalue>
pythonbits bb submit <file> --non-interactive  # for use in scripts

Structure

  • __init__.py
  • __main__.py
  • submission.py
  • categories.py
  • sites/
    • __init__.py
    • common.py
    • bb/
      • __init__.py
    • btn/
      • __init__.py

module bb:
class MovieSubmission(VideoSubmission, categories.MovieSubmissionMixin)
class VideoSubmission(BbSubmission)

@mueslo mueslo added the enhancement New feature or request label Jun 1, 2018
@mueslo mueslo added this to the 3.2 milestone Jun 1, 2018
@mueslo mueslo changed the title Further modularise logic Architecture and syntax overhaul for further modularisation Jun 14, 2018
@mueslo mueslo self-assigned this Jun 14, 2018
@mueslo mueslo modified the milestones: 3.2, 4.0 Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant