Science Score: 18.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: bilalrashid0197
  • Language: Python
  • Default Branch: main
  • Size: 15.6 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 5 years ago · Last pushed almost 5 years ago
Metadata Files
Readme Citation

README.md

HackTheNorth-CiteMe

CiteMe_Logo

Inspiration

For our first Hackathon, we wanted to create a project that would let us focus on developing our programming and teamwork skills. We decided to reverse-engineer an existing product: the citation generator. Reverse-engineering meant that everyone on the team had a clear image of what the finished product should look like. It also simplified the requirements-elicitation phase of the engineering process, which meant that we could get straight to work!

What it does

CiteMe is a bibliography tool with online and offline capability. It generates APA7-compliant citations and offers support for three difference resource types: books or Ebooks, web resources, and journal articles. Currently, CiteMe consists of the following independent components: - A web interface mockup - An offline GUI mockup - A functional command-line program

How we built it

The majority of this project is created using the Python programming language. The GUI mock-up was created by Johann using Tkinter. Sumin created a web interface mock-up using Figma. Madison and Bilal created Python functions to generate citations based on user input, and Madison created a CLI version of the CiteMe program.

Challenges we ran into

Our team is geographically spread across the world, with members in Ontario, Manitoba, Venezuela, and South Korea! Timezones and virtual communication were a fun Depending on what information is available, the format of the final citation differs. For example, if there are no authors, then the citation should instead begin with the title of the resource used. This required a lot of conditional execution and text processing to achieve the correct citation formats! Also, did you know that things can have multiple authors? And that they can have different numbers of authors?? Pretty inconvenient! Successfully integrating the citation functions with the Tkinter interface proved to be a bit of a challenge, and we're expecting to achieve this in a future version of CiteMe!

What we learned

Our first Hackathon proved to be an amazing learning experience! Being able to work on a project with others was challenging and new, but also very rewarding. Even just being able to see your teammates on camera working alongside you was encouraging and motivating! We learned a lot about the reverse-engineering process and the importance of planning and communication. The process of working on an actual project is completely different than working through tutorials. While it comes with challenges, such as making sure that your code doesn't break if someone doesn't have a middle name, it is also far more rewarding!

More About the Hackers

Bilal Rashid - GitHub, LinkedIn, DevPost

Madison Chapel - GitHub, LinkedIn, Twitter, DevPost

Johann Maldonado - GitHub, LinkedIn, Twitter, DevPost

Sumin Oh - GitHub, LinkedIn, Twitter, DevPost

Owner

  • Name: Bilal Rashid
  • Login: bilalrashid0197
  • Kind: user
  • Location: Toronto, Canada

Citation (citations.py)

"""
A function to create citations for Books or Ebooks. Different forms of the citation will be created depending on which parameters have arguments passed to them. Each citation is compliant with APA7. 
"""

import numpy as np
from author_names import *


def citing_books(book_title=False, publisher=False, publishing_year=False,
                 DOI=False, alternate_description=False, **names):
    # Check for source
    if publisher is False:
        return "Not enough information to generate a citation. Please provide publisher information."
    # Check for date or n.d.
    if publishing_year is False:
        publishing_year = "n.d."
    # Author name should be LastName, first initial, middle initial 
    authors_list = author_names(**names)

    # Begin generating final citation
    if authors_list:
        if book_title:  # author and title and source are present
            reference = authors_list + " (" + publishing_year + "). " + book_title + ". " + publisher + "."
        else:  # Title missing
            if alternate_description:
                reference = authors_list + " (" + publishing_year + "). [" + alternate_description + "]. " + publisher + "."
            else:
                return "Not enough information to generate a citation. Please provide a description in liu of a title."
    else:  # authors missing
        if book_title:  # author missing, title present
            reference = book_title + ". (" + publishing_year + "). " + publisher + "."
        else:  # author and title missing
            if alternate_description:
                reference = "[" + alternate_description + "]. (" + publishing_year + "). " + publisher + "."
            else:
                return "Not enough information to generate a citation. Please provide a description in liu of a title."
    # Add optional DOI
    if DOI:
        reference = reference + " " + DOI
    return reference


#### Function for citing a webpage ####

def citing_webpage(publishing_year=False, publishing_month=False, publishing_day=False, title_of_webpage=False,
                   webpage_name=False, url=False, alternate_description=False, **names):
    # Author name should be LastName, first initial, middle initial
    authors_list = author_names(**names)

    # check for required values
    if url is False:
        return "Not enough information to generate a citation. Electronic sources require URL."
    if webpage_name is False:  # Check for source before evaluating if source and author are the same.
        return "Not enough information to generate a citation. Please provide a website name."
    # If author and site name are the same, omit the site name from the citation
    if str(authors_list).lower() == str(webpage_name).lower():
        webpage_name = False
        authors_list += "."

    # Create date
    if publishing_year:
        if publishing_month:
            if publishing_day:
                pubdate = "(" + publishing_year + ", " + publishing_month + " " + publishing_day + ")"
            else:
                pubdate = "(" + publishing_year + ", " + publishing_month + ")"
        else:
            pubdate = "(" + publishing_year + ")"
    else:
        pubdate = "(n.d.)"

    # Begin generating final citation
    if authors_list:
        if title_of_webpage:
            if webpage_name:
                reference = authors_list + " " + pubdate + ". " + title_of_webpage + ". " + webpage_name + ". " + url
            else:  # Webpage is the same as author
                reference = authors_list + " " + pubdate + ". " + title_of_webpage + ". " + url
        else:  # title is missing, author present
            if alternate_description:
                reference = authors_list + " " + pubdate + ". [" + alternate_description + "]. " + url
            else:
                return "Not enough information to generate a citation. Please provide a description in liu of a title."
    else:  # authors missing
        if title_of_webpage:  # missing author
            if webpage_name:
                reference = title_of_webpage + ". " + pubdate + ". " + webpage_name + ". " + url
            else:  # webpage is same as author, omit
                reference = title_of_webpage + ". " + pubdate + ". " + url
        else:  # author and title missing
            if alternate_description:
                reference = "[" + alternate_description + "]. " + pubdate + ". " + webpage_name + ". " + url
            else:
                return "Not enough information to generate a citation. Please provide a description in liu of a title."
    return reference


def citing_journal(publishing_year=False, article_title=False, journal_name=False, page_start=False, page_end=False,
                   volume=False, issue=False, alt_description=False, DOI=False, **names):
    # Author name should be LastName, first initial, middle initial
    authors_list = author_names(**names)

    # Check for required values
    if journal_name is False:
        return "Not enough information to generate a citation. Please provide a website name."

    if publishing_year is False:
        publishing_year = "n.d."

    # Create page-range
    page_range = False
    if page_start:
        if page_end:
            page_range = page_start + "-" + page_end

    # Create journal name, volume(issue)
    if journal_name:
        if volume:
            if issue:
                if page_range:
                    journal = journal_name + ", " + volume + "(" + issue + "), " + page_range
                else:  # no page range
                    journal = journal_name + ", " + volume + "(" + issue + ")"
            else:  # no issue
                journal = journal_name + ", " + volume
        else:  # no volume
            journal = journal_name
    else:
        return "Not enough information to generate a citation. Please provide publisher information."
        # Check for date or n.d.
    if publishing_year is False:
        publishing_year = "n.d."

    # Begin generating final citation
    if authors_list:
        if article_title:  # author and title and source are present
            reference = authors_list + " (" + publishing_year + "). " + article_title + ". " + journal + "."
        else:  # Title missing
            if alt_description:
                reference = authors_list + " (" + publishing_year + "). [" + alt_description + "]. " + journal + "."
            else:
                return "Not enough information to generate a citation. Please provide a description in liu of a title."
    else:  # authors missing
        if article_title:  # author missing, title present
            reference = article_title + ". (" + publishing_year + "). " + journal + "."
        else:  # author and title missing
            if alt_description:
                reference = "[" + alt_description + "]. (" + publishing_year + "). " + journal + "."
            else:
                return "Not enough information to generate a citation. Please provide a description in liu of a title."
    # Add optional DOI
    if DOI:
        reference = reference + " " + DOI
    return reference

GitHub Events

Total
Last Year