...
 
Commits (6)
......@@ -2,29 +2,29 @@
# Moody #
This software is in alpha: it still has some rough edges.
For example there is still no support for folders in master.
For example the username setup require restarting the app; I ignore why.
See [CONTRIBUTING.md](/CONTRIBUTING.md) for informations about how it works.
## Quick Install ##
For Arch Linux, there is the [https://aur.archlinux.org/packages/epfl-moody-git/](epfl-moody-git) AUR package.
For Arch Linux, there is the [epfl-moody-git](https://aur.archlinux.org/packages/epfl-moody-git/) AUR package.
Fedora and Debian packages are planned.
### Flatpak ###
(for it to work, you may need to [install flatpak](https://flatpak.org/setup/))
You can also install using flatpak, which should work for every Linux distribution
```sh
flatpak-builder --install-deps-from=flatpak --install --user --force-clean _flatbuild ch.gnugen.Moody.json
```
For some reason, you may need to install elfutils `sudo apt install elfutils`
Flatpak will build libhandy and myhtml from their repositry, and use libsoup and libsecret
Flatpak will build libhandy and myhtml from their repository, and use libsoup and libsecret
from the Gnome runtime.
You can also install it system-wide by removing the `--user` flags.
you may need to [https://flatpak.org/setup/](install flatpak) for it to work
## Build it Yourself ##
### Gnome Builder ###
......@@ -36,7 +36,7 @@ and ask it to clone the repositry. Have a look at the code while it gets the dep
Alternatively, you can install it system-wide outside of the flatpak sandbox;
You first need to install [https://github.com/lexborisov/myhtml](myhtml)
You first need to install [myhtml](https://github.com/lexborisov/myhtml)
or the modest rendering engine; libhandy, libsecret and libsoup.
You may find these in your repos.
......
......@@ -8,7 +8,11 @@
#mesondefine CACHE_ROOT
// how verbose the http requests are: 0–none, 1–headers only, 2–headers and beginning of text 3+–dump all
// how verbose the http requests are:
// 0 – none
// 1 – headers only
// 2 – headers and beginning of response text
// 3+ – dump all
#define LOGGING_REQUESTS 0
#define APP_NAME "ch.gnugen.Moody"
......
......@@ -32,8 +32,8 @@ enum resource_type {
};
struct Courses {
struct Course *courses;
size_t course_count;
struct Course *courses;
};
struct Course {
......
......@@ -18,7 +18,6 @@
#include <myhtml/myhtml.h>
#include <assert.h>
#include <stdlib.h>
#include "moodle-parser.h"
#include "data-struct.h"
#include "config.h"
......@@ -219,8 +218,7 @@ moodle_parse_course_list (const gchar *html, gsize html_size, const gchar *filen
myhtml_collection_destroy (hrefs);
myhtml_tree_destroy (tree);
struct Courses courses_struct = {courses, count};
return courses_struct;
return (struct Courses) {count, courses};
}
......@@ -279,8 +277,7 @@ moodle_extract_week (gchar *week_name, myhtml_tree_t *tree, myhtml_tree_node_t *
}
}
struct Week week = {week_name, resource_count, resources};
return week;
return (struct Week) {week_name, resource_count, resources};
}
......
......@@ -16,11 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <libsoup/soup.h>
#include "moodle-provider.h"
#include "moodle-parser.h"
#include "password.h"
#include "utils.h"
#include "config.h"
......