GithubHelp home page GithubHelp logo

souravbadami / asknot-ng Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coala/asknot-ng

0.0 0.0 0.0 3.54 MB

What can I do for $ORGANIZATION?

Home Page: http://whatcanidoforfedora.org

License: GNU General Public License v3.0

Shell 1.91% Python 9.46% Ruby 0.17% CSS 23.27% JavaScript 60.72% HTML 4.48%

asknot-ng's Introduction

asknot-ng

Build Status

Ask not what $ORG can do for you, but what you can do for $ORG.

Written by @ralphbean. Inspired by the original work of Josh Matthews, Henri Koivuneva, and others.

I stumbled upon and loved the original whatcanidoformozilla.org and wanted to deploy it for the Fedora Community but I found that I couldn’t easily change the questions and links that were presented. A year went by and in 2015 I wrote this: “asknot-ng”.

The gist of this “next generation” rewrite is to make it as configurable as possible. There is a primary script, asknot-ng.py that works like a static-site generator. It takes as input three things:

  • A questions file, written in yaml (see the example or Fedora’s file). You’ll have to write your own one of these.
  • A template file, written in mako (the default should work for everybody).
  • A ‘theme’ argument to specify what CSS to use. The default is nice enough, but you’ll probably want to customize it to your own use case.

We have a Fedora instance up and running if you’d like to poke it.

Requirements

The site-generator script is written in Python, so you’ll need that. Furthermore, see requirements.txt or just run::

$ sudo yum install python-mako PyYAML python-virtualenv

The script can optionally generate an svg visualizing your question tree. This requires pygraphviz which you could install like so:

$ sudo yum install python-pygraphviz

Giving it a run

Install the requirements, first.

Clone the repo::

$ git clone https://github.com/fedora-infra/asknot-ng.git
$ cd asknot-ng

Create a virtualenv into which you can install the module.

$ virtualenv --system-site-packages venv
$ source venv/bin/activate
$ python setup.py develop

Run the script with the Fedora configuration::

$ ./asknot-ng.py templates/index.html questions/fedora.yml l10n/fedora/locale --theme fedora
Wrote build/en/index.html

and open up build/en/index.html in your favorite browser.

Preparing Translations

First, setup a virtualenv, install Babel, and build the egg info.

$ virtualenv venv
$ source venv/bin/activate
$ pip install Babel
$ python setup.py develop

Then, extract the translatable strings:

$ python setup.py extract_messages --output-file l10n/fedora/locale/asknot-ng.pot

Deploying to OpenShift

This is a very easy way to bring asknot-ng to a production server using OpenShift.

Just create a new application using RHC and set the environment variables to your demands:

rhc app create askorg diy --from-code https://github.com/fedora-infra/asknot-ng#develop
rhc set-env ASKNOT_THEME=org -a askorg
rhc set-env ASKNOT_QUESTION_FILE=questions/org.yml -a askorg
rhc app restart askorg

Contributing back

asknot-ng is licensed GPLv3+ and we’d love to get patches back containing even the things you might not think we want. If you have a questions file for your repo, a modified template, or a CSS theme for your use case, please send them to us. It would be nice to build a library of deployments so we can all learn.

Note: While the application is licensed GPLv3+, The Fedora 22 wallpaper used is licensed under a Creative Commons Attribution 4 License.

Of course, bug reports and patches to the main script are appreciated as always.

Happy Hacking!

asknot-ng's People

Contributors

cydrobolt avatar fitojb avatar hguemar avatar hroncok avatar jaredsmith avatar juhp avatar michel-slm avatar mr-karan avatar nbebout avatar pypingou avatar ralphbean avatar relrod avatar sadin avatar sagarhani avatar sanjayankur31 avatar sayanchowdhury avatar sils avatar sujiniku avatar varesa 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.