APA Format Reference List Creator – Code 2023 -2024

APA Format Reference List Creator

Introduction

This software tool is designed to automatically generate a reference list in APA format for academic papers.
The tool takes the reference information provided by the user and formats it according to the guidelines set forth by the American Psychological Association (APA).

Features

User input fields for each required element of a reference (e.g. author, title, publication date)
Automatic formatting of inputted data into APA format
Ability to add multiple references and generate a complete reference list
Easy copy and paste of generated reference list for use in academic papers

Code

Below is the code for the reference list creator:

Python
Copy Code
class Reference:
def init(self, author, date, title, publisher=None, url=None, accessed_date=None):
“””
Initializes a new reference object.

    Parameters:
    author (str): The author(s) of the publication.
    date (str): The date of publication in the format YYYY-MM-DD.
    title (str): The title of the publication.
    publisher (str): The publisher of the publication (optional).
    url (str): The URL of the publication (optional).
    accessed_date (str): The date that the publication was accessed online (optional).
    """
    self.author = author
    self.date = date
    self.title = title
    self.publisher = publisher
    self.url = url
    self.accessed_date = accessed_date

def __str__(self):
    """
    Returns a string representation of the reference in APA format.
    """
    reference_str = ""

    # Format author names with proper APA format
    authors = self.author.split(", ")
    if len(authors) > 1:
        authors[-1] = "and " + authors[-1]
        author_str = ", ".join(authors)
    else:
        author_str = authors[0]

    # Add title with proper APA formatting
    title_str = "\"" + self.title + ".\""

    # Add date of publication with proper APA formatting
    year = self.date[:4]
    month = self.date[5:7]
    day = self.date[8:10]
    date_str = "(" + year + ", " + month + ", " + day + ")."

    # Add publisher (if applicable) with proper APA formatting
    if self.publisher:
        publisher_str = " " + self.publisher + "."
    else

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir