Giter Club home page Giter Club logo

brotherscript's Introduction

brotherscript

A Python script that uses Airium to generate HTML code for the Alpha Eta website.

Prerequisites

Requires Pip and Airium

In your Python environment, install Pip.

Then, install Airium by typing into the commandline: pip install airium

Usage

  1. Edit/update the CSV file that you're trying to generate HTML for (either active.csv, conditionals.csv, or officers.csv)

  2. In the directory with the script and csv file, run the script depending on which you're updating (python active_brotherscript.py, python conditional_brotherscript.py, or python officer_brotherscript.py)

  3. If the CSV files are valid and everything worked correctly, an HTML file is generated under the name of generated_active.html, generated_conditional.html, or generated_officers.html, and then you would copy and paste the contents of that file into the corresponding section in the HTML file of the website.

Structure of each of the CSV files

active.csv and conditionals.csv

Name|Pronouns|Initiation Semester|Hometown|Instrument|Majors|Minors (if not applicable, type N/A)

officers.csv

Name|Pronouns|Officer Position|Officer Email|Initiation Semester|Major|Instrument|Quote about brotherhood (if not applicable, type N/A)

A note about officer_brotherscript.py

Currently, Alpha Eta has 8 Elected Officer positions and 8 Appointed Officer positions, and it is hardcoded to reflect those values through lines 33 and 34:

num_elected = 8
num_appointed = 8

If these numbers change through the creation or removal of officer positions, you can change those variables and it will work as intended. But, officers.csv must be set-up in the order that you would like for it to appear on the website.

A note about pictures

Your machine may have a case-insensitive system, but HTML is a case-sensitive language, so in order for images to be displayed correctly, they must be named with the right casing, as in First_Last.JPG. The pictures also must be 1000 x 1333 pixels for uniformity and decent image quality.

A note to future Webmasters

Keep the CSV files updated every semester! And if you feel like this can be improved in any way, use your best judgment, don't break anything, and as always, test your code before you push it.

brotherscript's People

Contributors

ryanlu-dev avatar kkpsiah avatar admrotob avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.