GithubHelp home page GithubHelp logo

nicksneo / badgeyay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fossasia/badgeyay

0.0 1.0 0.0 29.45 MB

Visitor Badge Generator for Conferences https://badgeyay-dev.herokuapp.com

License: GNU General Public License v3.0

Python 57.66% CSS 7.15% JavaScript 3.22% HTML 30.70% Shell 1.27%

badgeyay's Introduction

badgeyay

Travis branch Codecov branch Gitter

badgeyay is a simple badge generator with a simple web UI to add data and generate printable badges in a zip.

The user should be able to:

  • Choose size of badges
  • Choose background of badges and upload logo and background image
  • Upload a CSV file or manually enter CSV data as: name, type of attendee, nick/handle, organization/project

Checkout badgeyay in action:

Demo GIF

Demo YouTube

Our current goal is to provide an interface to generate badges for the FOSSASIA conference.

If you like to join developing,

  • you can chat on gitter, mentioning the maintainers.
  • you can find/create issues and solve them.
    • When you solve an issue, you do not own it. Share your progress via a Pull-Requst as soon as possible.
    • Discuss with others who work on the issue about the best solution. It is your responsibility, not the maintainer's to choose the best solution.
  • If in doubt, let's follow CCCC.

Specification

Technologies Used

Badgeyay uses a number of open source projects:

  • Flask - Microframework powered by python
  • Bootstrap - Responsive frontend framework
  • Shell - Script used for merging badges of different types
  • Heroku - Webapp deployed here
  • Travis - Continuous Integration of the project
  • Github Release - Releases are GitHub's way of packaging and providing software to the users

Input

  • The input is a set of csv files in the same folder, UTF-8.

  • The csv file is named after the badge type to take. Example: vip.png.csv uses the picture vip.png.

  • The CSV has up to 4 columns for the name and the twitter handle. They will be filled if this number is filled:

    • __X_
    • __XX
    • _XXX
    • XXXX
  • Optional configuration file in json format to customise badges.

  • A sample configuration file is shown below

    {
      "options": {
          "badge_wrap": true,
          "paper_size_format": "A3"
      }
    }
    
    • badge_wrap: It can be true or false. If set to true then for each entry in the csv file two badges will be generated so that they can be wrapped around the badge card.
    • paper_size_format: As of now it's value can be either "A3" or "A4". The value will decide the size of the page on which the badges (in groups of 8) will be printed. Not required if width and height of parameters are explicitly mentioned.
    • width: Width of the page on which badges (in groups of 8) will be printed. Value should be in mm. For example: "297mm"
    • height: Height of the page on which badges (in groups of 8) will be printed. Value should be in mm. For example: "420mm".

Output

The output file is svg / pdf / multipage pdf of size A3. Each badge has the size A6. The outputs are in a folder derived from the input csv. The outputs can be either of the two types, viz ZIPs or PDFs, or both. User has the choice to choose from either of the two or from both of them.

Customization

You can change the font style, font size, color etc from the .svg file in the folder badges. Inkscape is generally used for editing of such files.

Usage

You need Ubuntu to run the application. We are working on integrating vagrant to make it easier to run on windows. Check out the User Input Guide for more details.

Install Dependencies

Badgeyay requires the following dependencies to be installed

  • python3
  • rsvg-convert
  • pdftk

For Ubuntu/Debian based Package Managers

sudo apt-get update
sudo apt-get install python3 librsvg2-bin pdftk

For Fedora/CentOS/RPM based package managers

sudo -i
dnf install librsvg2 librsvg2-tools
dnf install gcc gcc-c++ libXrandr gtk2 libXtst libart_lgpl
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/libgcj-4.4.7-18.el6.x86_64.rpm
wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
rpm -ivh --nodeps libgcj-4.4.7-11.el6.x86_64.rpm
rpm -i pdftk-2.02-1.el6.x86_64.rpm
exit

Running locally

  1. Fork the main repo.
  2. Clone your local repo. git clone https://github.com/<your_username>/badgeyay.git
  3. Create a virtual environment. virtualenv -p python3 venv
  4. Activate the virtual environment. source activate venv
  5. Go to badgeyay directory. cd badgeyay
  6. Install the requirements. pip install -r requirements.txt
  7. Run python app/main.py to start server.
  • Remember: python app/main.py should only be executed from root directory.

Vagrant Installation Instructions

  1. Install Vagrant from Vagrant Download Page
  2. Install Virtualbox from Vitualbox Download Page
  3. Clone the project from git clone https://github.com/<your_username>/badgeyay.git
  4. Enter the directory using cd badgeyay
  5. In Terminal in the "badgeyay" directory, type vagrant up to bring up the virtual machine. This will start installation of a ubuntu box within which the server will run with all its components. If after typing "vagrant up" you received an error stating “valid providers not found ...", type vagrant up --provider=virtualbox
  6. After the installation is completed ssh into vagrant environment using vagrant ssh. This will bring you to the root directory of the Virtual Machine
  7. Move to your project using cd /vagrant
  8. To Run the flask server you need to be in the "app" directory. Do cd app
  9. Run flask server in port 0.0.0.0
    export FLASK_APP=main.py
    python -m flask run --host=0.0.0.0
    
  10. Now your server is up and running. To view the badgeyay page go to localhost:8001

Contributions, Bug Reports, Feature Requests

This is an Open Source project and we would be happy to see contributors who report bugs and file feature requests by submitting pull requests as well. Please report issues in the GitHub tracker.

Issue and Branch Policy

Before making a pull request, please file an issue. So, other developers have the chance to give feedback or discuss details. Match every pull request with an issue please and add the issue number in description e.g. like "Fixes #123".

We have the following branches

  • development
    All development goes on in this branch. If you're making a contribution, you are supposed to make a pull request to development. PRs to master must pass a build check and a unit-test check on Travis.
  • master
    This contains shipped code. After significant features/bugfixes are accumulated on development, we make a version update, and make a release.

Also read CONTRIBUTING.md

Installation

Badgeyay can be easily deployed on a variety of platforms. Currently it can be deployed in following ways.

  1. Local Installation

  2. Deployment on Heroku

  3. Deployment with Docker

One-click Docker, Heroku, Scalingo and Bluemix deployment is also available:

Deploy to Docker Cloud Deploy Deploy on Scalingo Deploy to Bluemix

Implementation

generate_badges.py creates svg files from the csv, png and badges/8BadgesOnA3.svg.

merge_badges.py converts them into pdf files and merges them together into one.

Travis creates new releases with the all-badges.pdf file.

License

Badgeyay - A simple badge generator. Its main purpose is to generate badges for events/conferences under the Open Event project of FOSSASIA. The Open Event project aims to make server and client software required for hosting events/conferences easy to build and configure. Copyright (C) 2016, FOSSASIA. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Maintainers

You can reach the maintainers and ping them personally by looking at the Badgeyay team.

You can become a maintainer by following the project and contributing code to it. Please see your role in the CCCC.

The project is maintained by the Badgeyay maintainer's team. To join the team:

  1. Contribute
  2. You or someone else proposes you in an issue to become a member of the team.
  3. A Badgeyay admin adds you.

To stay a maintainer in the team:

  1. Follow the rules of CCCC or Badgeyay and do not violate them willingly or in a harmful way.

To be removed from the team:

  1. Someone creates an issue to ask for removal, e.g. because of inactivity or a violation.
  2. An admin removes you.

badgeyay's People

Contributors

niccokunzmann avatar s2606 avatar jajodiaraghav avatar gabru-md avatar nanspro avatar vaibhavsingh97 avatar meets2tarun avatar djmgit avatar devesh-verma avatar pushkalkatara avatar rupav avatar abhilash-neog avatar alirizwi avatar idealadarsh avatar mohdomama avatar mish24 avatar parths007 avatar rahuldecoded avatar surana-mudit avatar mariobehling avatar bhaveshan avatar ananyo2012 avatar althafhussaink avatar apoorvaeternity avatar nemani avatar 0xdaksh avatar jishnujayakumar avatar palnabarun avatar pk13055 avatar sounak98 avatar

Watchers

James Cloos 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.