Week 5
New endpoint for geting copyright details
(July 21th, 2022)
Implementation of a new endpoint which gives the copyright information as a response for the requested upload.
It also provides the respective file paths for each copyright which is reccuring troughout the output.
The API response when requested on a upload (used Nirjas repository here):
[
{
"copyright": "Copyright (C) 2020 Ayush Bhardwaj (classicayush@gmail.com), Kaushlendra Pratap (kaushlendrapratap.9837@gmail.com)",
"filePath": [
"Nirjas-master.zip/Nirjas-master/nirjas/languages/php.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/c.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/matlab.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/text.py",
"Nirjas-master.zip/Nirjas-master/nirjas/main.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/scala.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/c_sharp.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/perl.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/java.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/python.py",
"Nirjas-master.zip/Nirjas-master/nirjas/binder.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/ruby.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/rust.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/javascript.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/kotlin.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/cpp.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/html.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/swift.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/shell.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/css.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/go.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/haskell.py",
"Nirjas-master.zip/Nirjas-master/setup.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/r.py"
]
},
{
"copyright": "Copyright (C) 2020 Siemens AG Author: Gaurav Mishra <mishra.gaurav@siemens.com>",
"filePath": [
"Nirjas-master.zip/Nirjas-master/nirjas/output/single_line.py",
"Nirjas-master.zip/Nirjas-master/nirjas/output/__init__.py",
"Nirjas-master.zip/Nirjas-master/nirjas/output/multi_line.py",
"Nirjas-master.zip/Nirjas-master/nirjas/output/scan_output.py"
]
},
{
"copyright": "Copyright (C) 2020 Aman Dwivedi (aman.dwivedi5@gmail.com)",
"filePath": [
"Nirjas-master.zip/Nirjas-master/nirjas/languages/scss.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/typescript.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/tests/test_typescript.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/tests/test_dart.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/tests/test_scss.py",
"Nirjas-master.zip/Nirjas-master/nirjas/languages/dart.py"
]
},
{
"copyright": "Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term \"modification\".)",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "copyrighted interfaces, the",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "copyright\" line and a pointer to where the full notice is found.",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "Copyright (C) <year> <name of author>",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "copyright disclaimer\" for the library, if necessary. Here is a sample; alter the names:",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker.",
"filePath": [
"Nirjas-master.zip/Nirjas-master/LICENSE"
]
},
{
"copyright": "Copyright (C) 2021 Hamed Faramarzi Author: Hamed Faramarzi <hamed.faramarzi@gmail.com>",
"filePath": [
"Nirjas-master.zip/Nirjas-master/nirjas/output/output.py"
]
},
{
"copyright": "Copyright (C) Sushant Kumar (sushantmishra02102002@gmail.com) SPDX-License-Identifier: LGPL-2.1 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA",
"filePath": [
"Nirjas-master.zip/Nirjas-master/nirjas/languages/sql.py"
]
},
{
"copyright": "Copyright (C) 2021 Aswin Murali (aswinmurali.co@gmail.com)",
"filePath": [
"Nirjas-master.zip/Nirjas-master/Dockerfile"
]
},
{
"copyright": "Copyright (C) 2021 Gaurav Mishra <mishra.gaurav@siemens.com>",
"filePath": [
"Nirjas-master.zip/Nirjas-master/Dockerfile"
]
},
{
"copyright": "Copyright (C) 2020 Soham Banerjee (sohambanerjee4abc@hotmail.com),",
"filePath": [
"Nirjas-master.zip/Nirjas-master/nirjas/languages/julia.py"
]
}
]
The requested URL for getting the response is: localhost/repo/api/v1/uploads/<UPLOAD_ID>/copyrights
PR link - feat(api): new endpoint for geting copyright details
All jobs only accessible by admin
Made changes in the UI so that only admins can access the All Recent Jobs
page. For other users the route will not be there in the navigation bar.
Admin veiw:
Non-Admin View:
PR link - feat(ui): All jobs only accessible by admin
Conclusion and Further Plans
- Developing respective UI for the Copyright endpoint.
- Picking up remaining API endpoints from the License Browser module.