glua-ua / meals-ua Goto Github PK
View Code? Open in Web Editor NEWA python script that presents the menus at all of the University of Aveiro's canteens.
A python script that presents the menus at all of the University of Aveiro's canteens.
Make a package to install meals-ua on several distros.
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)
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
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.
Some distributions started to disabling .pam_environment by default. Possible candidate for substitution is the systemd environment.d
Have all the API queries and Facebook scrapping in one file that can be used by the CLI script and systemd service
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.