GithubHelp home page GithubHelp logo

glua-ua / meals-ua Goto Github PK

View Code? Open in Web Editor NEW
13.0 8.0 1.0 308 KB

A python script that presents the menus at all of the University of Aveiro's canteens.

Python 94.15% Shell 5.85%
aveiro python university meals

meals-ua's People

Contributors

andralves717 avatar dependabot[bot] avatar jpfonseca avatar ludeed avatar rodrigorosmaninho avatar tuxpt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meals-ua's Issues

Integrate systemd notification support

This would be a direct port from @tuxPT 's repository.

In my opinion this should be disabled by default and enabled by the user either in the tutorial screen or later in a configuration UI. The user should also be able to indicate preferred times for the notifications to appear.

This may be achieved with the ~/.ementasrc json file that is already present. However, a mechanism to allow the user to later change his mind needs to be implemented.

(More people are welcome to assign this issue to themselves)

Install script bug when using zsh

The install script does not correctly detect if the alias already exists in the configuration files when executed in zsh using this command:

sudo ./install.sh

The alias is never added.
It only works when using:

sudo sh ./install.sh

Therefore, something must be wrong with the syntax of the inner if conditions. There must be a solution that works on both bash and zsh.

Code, for reference:

# Check Configuration file
# Either bashrc or zshrc
if [ -f "$BASHRC" ]; then
    echo "bashrc found"

    if ! grep -q "^alias ementa=" "$BASHRC"; then
        # Create alias
        printf "\n## Meals@UA Script ##\nalias ementa=$COMMAND" >> $BASHRC
    fi
fi
if [ -f "$ZSHRC" ]; then
    echo "zshrc found"

    if ! grep -q "^alias ementa=" ~/.zshrc ; then
        # Create alias
        printf "\n## Meals@UA Script ##\nalias ementa=$COMMAND" >> $ZSHRC
    fi
fi

Print additional info about AFUAv meals

Right now AFUAv meals print this:

Pratos disponíveis:
Creme de legumes
Bolos bacalhau
Bife de frango panado
Lasanha
Salsicha alemã com ovo

Ideal behavior would be:

Jantar
(Post a 24/4 às 18h56)

Pratos disponíveis:
Creme de legumes
Bolos bacalhau
Bife de frango panado
Lasanha
Salsicha alemã com ovo

Which means detecting if meal is dinner or lunch and getting the post timestamp from the facebook request (which right now is discarded). Post timestamp would increase the user's confidence that the information is correct.

Let the user choose default location

Current default location is the Santiago Campus, with optional flags to display data about ESTGA, ESAN, ...

Instead, the user should be prompted to choose on the tutorial screen which location to use.
A mechanism to allow the user to change his mind later also needs to be implemented.

This may be achieved with the ~/.ementasrc json file that is already present.

(More people are welcome to assign this issue to themselves)

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.