Skip to content
Snippets Groups Projects
Commit 3a845c34 authored by magnus2142's avatar magnus2142
Browse files

Started on creating a nice readme for the project

parent 7cca7d74
No related branches found
No related tags found
No related merge requests found
/CHANGELOG.md merge=union
Short description explaining the high-level reason for the new issue.
## Current behavior
## Expected behavior
## Steps to replicate behavior (include URLs)
1.
## Screenshots
[Short description explaining the high-level reason for the pull request]
## Additions
-
## Removals
-
## Changes
-
## Testing
1.
## Screenshots
## Notes
-
## Todos
-
## Checklist
- [ ] PR has an informative and human-readable title
- [ ] Changes are limited to a single goal (no scope creep)
- [ ] Code can be automatically merged (no conflicts)
- [ ] Code follows the standards laid out in the [development playbook](https://github.com/cfpb/development)
- [ ] Passes all existing automated tests
- [ ] Any _change_ in functionality is tested
- [ ] New functions are documented (with a description, list of inputs, and expected output)
- [ ] Placeholder code is flagged / future todos are captured in comments
- [ ] Visually tested in supported browsers and devices (see checklist below :point_down:)
- [ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
- [ ] Reviewers requested with the [Reviewers tool](https://help.github.com/articles/requesting-a-pull-request-review/) :arrow_right:
## Testing checklist
### Browsers
- [ ] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Internet Explorer 8, 9, 10, and 11
- [ ] Edge
- [ ] iOS Safari
- [ ] Chrome for Android
### Accessibility
- [ ] Keyboard friendly
- [ ] Screen reader friendly
### Other
- [ ] Is useable without CSS
- [ ] Is useable without JS
- [ ] Flexible from small to large screens
- [ ] No linting errors or warnings
- [ ] JavaScript tests are passing
All notable changes to this project will be documented in this file.
We follow the [Semantic Versioning 2.0.0](http://semver.org/) format.
## x.y.z - YYYY-MM-DD
### Added
- Lorem ipsum dolor sit amet
### Deprecated
- Nothing.
### Removed
- Nothing.
### Fixed
- Nothing.
# Guidance on how to contribute
> All contributions to this project will be released under the CC0 public domain
> dedication. By submitting a pull request or filing a bug, issue, or
> feature request, you are agreeing to comply with this waiver of copyright interest.
> Details can be found in our [TERMS](TERMS.md) and [LICENSE](LICENSE).
There are two primary ways to help:
- Using the issue tracker, and
- Changing the code-base.
## Using the issue tracker
Use the issue tracker to suggest feature requests, report bugs, and ask questions.
This is also a great way to connect with the developers of the project as well
as others who are interested in this solution.
Use the issue tracker to find ways to contribute. Find a bug or a feature, mention in
the issue that you will take on that effort, then follow the _Changing the code-base_
guidance below.
## Changing the code-base
Generally speaking, you should fork this repository, make changes in your
own fork, and then submit a pull request. All new code should have associated
unit tests that validate implemented features and the presence or lack of defects.
Additionally, the code should follow any stylistic and architectural guidelines
prescribed by the project. In the absence of such guidelines, mimic the styles
and patterns in the existing code-base.
## Browser support
We configure our build chain tools
(typically [Autoprefixer](https://github.com/postcss/autoprefixer)
and [Babel](https://babeljs.io))
to support a reasonable set of backward compatibility with older browsers.
Please read up on
[our current browser support guidance](https://github.com/cfpb/development/blob/main/guides/browser-support.md)
and follow it when contributing to this project.
# Installation instructions
Detailed instructions on how to install, configure, and get the project running.
LICENSE 0 → 100644
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
# IDATT2900-072
#### CFPB Open Source Project Template Instructions
to run the tests:
`python -m pytest tests`
1. Create a new project.
2. [Copy these files into the new project](#installation)
3. Update the README, replacing the contents below as prescribed.
4. Add any libraries, assets, or hard dependencies whose source code will be included
in the project's repository to the _Exceptions_ section in the [TERMS](TERMS.md).
- If no exceptions are needed, remove that section from TERMS.
5. If working with an existing code base, answer the questions on the [open source checklist](opensource-checklist.md)
6. Delete these instructions and everything up to the _Project Title_ from the README.
7. Write some great software and tell people about it.
## To download the project and install all the requirements
### 1. git clone project:
> Keep the README fresh! It's the first thing people see and will make the initial impression.
**With SSH:**
## Installation
`git clone git@gitlab.stud.idi.ntnu.no:mattiaae/idatt2900-072.git`
To install all of the template files, run the following script from the root of your project's directory:
`cd idatt2900-072`
```
bash -c "$(curl -s https://raw.githubusercontent.com/CFPB/development/main/open-source-template.sh)"
```
# Blackboard LMS CLI
**With HTTPS:**
----
<img src="project-logo.png" align="left" width="192px" height="192px"/>
<img align="left" width="0" height="192px" hspace="10"/>
`git clone https://gitlab.stud.idi.ntnu.no/mattiaae/idatt2900-072.git`
> Command-line tool suite for Blackboard LMS
`cd idatt2900-072`
[![Under Development](https://img.shields.io/badge/under-development-orange.svg)](https://github.com/cezaraugusto/github-template-guidelines) [![Public Domain](https://img.shields.io/badge/public-domain-lightgrey.svg)](https://creativecommons.org/publicdomain/zero/1.0/) [![Travis](https://img.shields.io/travis/cezaraugusto/github-template-guidelines.svg)](http://github.com/cezaraugusto/github-template-guidelines)
Blackboard LMS CLI is a command-line tool suite that students and staff can use to communicates with the Blackboard Learn REST API. It was created because the blackboard web interface can be ineffective and awkward to use. The CLI aims to offer a simple, intuitive and effective way to execute tasks in the Blackboard LMS. The software is written in python and based on the python package [Click](https://click.palletsprojects.com/en/8.1.x/)
### 2. Install the virtual environement inside the project folder
`python -m venv ./venv` **OR** `python3 -m venv ./venv`
`source ./venv/bin/activate`
<!-- <br>
<p align="center">
<strong>Templates included:</strong>
<a href="/.github/README.md">README</a><a href="/.github/CONTRIBUTING.md">CONTRIBUTING </a><a href="/.github/PULL_REQUEST_TEMPLATE.md">PULL REQUEST</a><a href="/.github/ISSUE_TEMPLATE.md">ISSUE TEMPLATE</a><a href="/.github/CONTRIBUTORS.md">CONTRIBUTORS</a>
</p>
<br> -->
### 3. Install all the requirements
`python -m pip install -r requirements.txt`
### 4. To chech that it is successfully installed, check the version
`python -m bbcli --version`
**Links to production or demo instances:** LInksssss
### 5. Run the tests
`python -m pytest test`
### 6. Setup the bbcli script inside the root of the project
`pip install --editable .` **OR** `pip3 install --editable .`
![Image](/uploads/8780c8ce8ccb66bfe0bad77eb9410769/image.png)
## Installation
**NB!** Currently, this CLI can only be installed using pip, but we are planning to support other installation methods later.
1. Install pip package
```Shell
pip install Blackboard-LMS-CLI
```
2. Install ```magic``` dependecy
**Windows:**
```Shell
pip install python-magic-bin
```
**Linux**
```Shell
sudo apt-get install libmagic1
```
**Mac OS X**
```Shell
brew install libmagic1
```
Test if the installation was successful by running ```$ bb --version``` command. You should see something like this:
![bb-version-command](/uploads/7ac03cafbe917fd399267a2bde3b90f4/image.png)
TODO: Add shell completion add
## Dependencies
For this CLI to work you need python and pip installed on your computer. The CLI also uses the library [magic](https://pypi.org/project/python-magic/).
**The following libraries are required:**
- Click
- colorama
- requests
- python-dotenv
- beautifulsoup4
- lxml
- shellingham
- anytree
- html2text
- python-dateutil
## Configuration
TODO:
If the software is configurable, describe it in detail, either here or in other documentation to which you link.
## Usage
TODO:
Show users how to use the software.
Be specific.
Use appropriate formatting when showing code snippets.
## How to test the software
TODO:
If the software includes automated tests, detail how to run those tests.
## Known issues
TODO:
Document any known significant shortcomings with the software.
## Getting help
TODO:
Instruct users how to get help with this software; this might include links to an issue tracker, wiki, mailing list, etc.
**Example**
TODO:
If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.
## Getting involved
TODO:
This section should detail why people should get involved and describe key areas you are
currently focusing on; e.g., trying to get feedback on features, fixing certain bugs, building
important pieces, etc.
General instructions on _how_ to contribute should be stated with a link to [CONTRIBUTING](CONTRIBUTING.md).
----
## Open source licensing info
TODO:
1. [TERMS](TERMS.md)
2. [LICENSE](LICENSE)
3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/)
----
## Credits and references
TODO:
1. Projects that inspired you
2. Related projects
3. Books, papers, talks, or other sources that have meaningful impact or influence on this project
# IDATT2900-072
to run the tests:
`python -m pytest tests`
## To download the project and install all the requirements
### 1. git clone project:
**With SSH:**
`git clone git@gitlab.stud.idi.ntnu.no:mattiaae/idatt2900-072.git`
`cd idatt2900-072`
**With HTTPS:**
`git clone https://gitlab.stud.idi.ntnu.no/mattiaae/idatt2900-072.git`
`cd idatt2900-072`
### 2. Install the virtual environement inside the project folder
`python -m venv ./venv` **OR** `python3 -m venv ./venv`
`source ./venv/bin/activate`
### 3. Install all the requirements
`python -m pip install -r requirements.txt`
### 4. To chech that it is successfully installed, check the version
`python -m bbcli --version`
### 5. Run the tests
`python -m pytest test`
### 6. Setup the bbcli script inside the root of the project
`pip install --editable .` **OR** `pip3 install --editable .`
TERMS.md 0 → 100644
As a work of the United States Government, this package (excluding any
exceptions listed below) is in the public domain within the United States.
Additionally, we waive copyright and related rights in the work worldwide
through the [CC0 1.0 Universal public domain dedication][CC0].
Software source code previously released under an open source license and then
modified by CFPB staff or its contractors is considered a "joint work"
(see 17 USC § 101); it is partially copyrighted, partially public domain,
and as a whole is protected by the copyrights of the non-government authors and
must be released according to the terms of the original open-source license.
Segments written by CFPB staff, and by contractors who are developing software
on behalf of CFPB are also in the public domain, and copyright and related
rights for that work are waived through the CC0 1.0 Universal dedication.
For further details, please see the CFPB [Source Code Policy][policy].
## CC0 1.0 Universal Summary
This is a human-readable summary of the [Legal Code (read the full text)][CC0].
### No Copyright
The person who associated a work with this deed has dedicated the work to
the public domain by waiving all of his or her rights to the work worldwide
under copyright law, including all related and neighboring rights, to the
extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial
purposes, all without asking permission. See Other Information below.
### Other Information
In no way are the patent or trademark rights of any person affected by CC0,
nor are the rights that other persons may have in the work or in how the
work is used, such as publicity or privacy rights.
Unless expressly stated otherwise, the person who associated a work with
this deed makes no warranties about the work, and disclaims liability for
all uses of the work, to the fullest extent permitted by applicable law.
When using or citing the work, you should not imply endorsement by the
author or the affirmer.
[policy]: https://github.com/cfpb/source-code-policy/
[CC0]: http://creativecommons.org/publicdomain/zero/1.0/legalcode
## Exceptions
_Source code or other assets that are excluded from the TERMS should be listed
here. These may include dependencies that may be licensed differently or are
not in the public domain._
......@@ -37,48 +37,11 @@ def authenticate_user():
login()
@click.group()
@click.pass_context
@click.version_option(__version__)
def entry_point(ctx):
ctx.ensure_object(dict)
# """
# ACTIVATE SHELL COMPLETION
# """
# @click.command(name='activate-shell-completion')
# def activate_shell_completion():
# is_activated = False
# shell = os.environ['SHELL']
# if shell == '/bin/bash':
# shell = 'bash'
# elif shell == '/bin/zsh':
# shell = 'zsh'
# elif shell == '/bin/fish':
# shell = 'fish'
# path = os.path.join(os.path.expanduser('~'), f'.config/fish/completions/bb.{shell}')\
# if shell == 'fish' else os.path.join(os.path.expanduser('~'), f'.{shell}rc')
# append_text = f'eval (env _BB_COMPLETE=source_fish bb)' if shell == 'fish' else f'eval "$(_BB_COMPLETE=source_{shell} bb)"'
# with open(path, 'rb') as f, \
# mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as s:
# if s.find(bytearray(append_text.encode())) != -1:
# is_activated = True
# if not is_activated:
# with open(path, 'a') as f:
# f.write(f'\n{append_text}')
# click.echo('Shell completion activated!')
# else:
# click.echo('Shell completion already activated.')
# entry_point.add_command(activate_shell_completion)
"""
LOGIN AND LOGOUT COMMANDS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment