Skip to content

Instantly share code, notes, and snippets.

View sritasngh's full-sized avatar
😎

Sarita Singh sritasngh

😎
View GitHub Profile
job_pk job_queued job_priority job_email_notify job_name job_upload_fk job_folder_fk job_user_fk job_group_fk
5 2021-07-23 20:18:52 0 wget 5 3 3
@sritasngh
sritasngh / Makefile
Created July 22, 2021 09:11
scancode UI
##############################################################################
# SPDX-License-Identifier: GPL-2.0
# SPDX-FileCopyrightText: 2021 Sarita Singh <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
====================================================== test session starts ======================================================
platform linux -- Python 3.8.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/sarita/Documents/other_stuff/scancode-toolkit, configfile: setup.cfg
collecting 38009 items / 16 errors / 37993 selected
1720 tests selected, 36376 tests skipped.
collected 38096 items / 16 errors / 36376 deselected / 1704 selected
============================================================ ERRORS =============================================================
__________________________________________ ERROR collecting src/cluecode/copyrights.py __________________________________________
src/cluecode/copyrights.py:17: in <module>
<svg viewBox="0 0 115 25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
svg text {
transform-origin: 50% 50%;
transform: translate(0%, -40%) rotate(180deg);
}
@sritasngh
sritasngh / license_template.html
Created June 19, 2021 10:55
This is a Jinja template for scancode to extract only required information for my project Integrating ScanCOde toolkit to FOSSology.
{
"licenses":
[
{% if licenses %}
{% for key, license in licenses.items() %}
{
"key": "{{ license.key }}",
"score": {{ license.score }},
"name": "{{ license.name }}",
"text_url": "{{ license.text_url }}",
@sritasngh
sritasngh / text_highlighting.cpp
Created June 19, 2021 10:48
This code works to find starting and ending pointer to highlight matched license text as scanned by scancode.
unsigned long getFilePointer(const string& filename,
size_t start_line,
const string& match_text){
ifstream checkfile(filename);
string str;
if(checkfile.is_open()){
for (size_t i = 0; i <start_line-1; i++)
{
getline(checkfile, str);
}
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.
nifi-jetty-bundle
Copyright 2014-2015 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
© 1996 Jane Doe
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: