Compare commits

...

5 Commits
v0.0.8 ... main

Author SHA1 Message Date
sergiotarxz e7ff014da8 Adding github sponsor button. 2022-06-03 00:25:46 +02:00
sergiotarxz 8da7632ddd Adding complete RELEASE.PL 2022-05-09 00:09:29 +02:00
sergiotarxz 37c4c00240 Removing unused functions. 2022-05-06 18:56:53 +02:00
sergiotarxz 14fc2c48a3 Adding better instructions. 2022-05-06 05:06:53 +02:00
sergiotarxz 33a688bc75 Adding dont theme my app. 2022-05-06 04:56:28 +02:00
4 changed files with 51 additions and 62 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
github: sergiotarxz

View File

@ -2,12 +2,44 @@
OpenMG is a GTK4 + Libadwaita manga reader written in C which uses `readmng` as its backend.
[![Please do not theme this app](https://stopthemingmy.app/badge.svg)](https://stopthemingmy.app)
## Demostration
![Demostration vídeo of the manga reader.](https://gitea.sergiotarxz.freemyip.com/sergiotarxz/mangareader/raw/branch/main/demostration.gif)
## Installing the app.
These are the installation methods supported currently.
### Flatpak
Download from https://gitea.sergiotarxz.freemyip.com/sergiotarxz/mangareader/releases the latest `openmg-x86_64-(version).flatpak` and run:
```shell
flatpak install openmg-x86_64-(version).flatpak
```
Beware that not being in Flathub yet you will have to come here again
to get updates.
### Gentoo
```shell
sudo eselect repository enable sergiotarxz
echo 'app-misc/openmg ~amd64' | sudo tee -a /etc/portage/package.accept_keywords/zz-autounmask
sudo emerge -a openmg --autounmask
```
If the installation ask you for a package masked for ~amd64 you can run
`sudo etc-update`, upgrade the `package.accept_keywords` config file
and try again the latest command of the installation instructions.
## Build from source
### Flatpak
First fine tune the options in `me.sergiotarxz.openmg.json` for
meson you want to have, for example preview images, complete list is
on `meson_options.txt`
@ -20,12 +52,28 @@ flatpak-builder --install --user build me.sergiotarxz.openmg.json me.sergiotarxz
```
### Native
```shell
meson build
meson compile -C build
sudo meson install -C build
```
## Running the app
If using flatpak:
```shell
flatpak run me.sergiotarxz.openmg
```
If native installated:
```shell
openmg
```
## Donations welcome:
btc: `bc1q0apxdedrm5vjn3zr0hxswnruk2x2uecwqrusmj`

View File

@ -56,6 +56,8 @@ sub compile {
my $flatpak_builder_file = 'me.sergiotarxz.openmg.json';
my $app_id = 'me.sergiotarxz.openmg';
my $app_output_name = path("openmg-$arch-$tag.flatpak")->absolute;
system 'cp', '/usr/bin/qemu-aarch64',
"$ENV{HOME}/.local/share/flatpak/runtime/org.gnome.Sdk/aarch64/master/active/files/bin/";
my $push = pushd $clone_path;
system 'flatpak-builder', '--force-clean', '--arch', $arch, '--install', '--user',

View File

@ -57,14 +57,6 @@ mg_backend_readmng_class_init (MgBackendReadmngClass *class) {
mg_backend_readmng_properties);
}
static xmlNodePtr
mg_backend_readmng_get_a_for_chapter (
MgBackendReadmng *self,
xmlNodePtr li);
static MgMangaChapter *
mg_backend_readmng_loop_li_chapter (
MgBackendReadmng *self,
xmlNodePtr li);
static char *
mg_backend_readmng_fetch_search (MgBackendReadmng *self,
const char *search_query, size_t *response_len);
@ -672,60 +664,6 @@ cleanup_mg_backend_readmng_get_data_from_check_box_card:
return chapter;
}
static MgMangaChapter *
mg_backend_readmng_loop_li_chapter (
MgBackendReadmng *self,
xmlNodePtr li) {
MgUtilXML *xml_utils = self->xml_utils;
MgMangaChapter *chapter = NULL;
xmlNodePtr a = mg_backend_readmng_get_a_for_chapter (
self, li);
if (!a) return NULL;
char *url = mg_util_xml_get_attr (xml_utils, a, "href");
size_t val_len = 0;
size_t dte_len = 0;
xmlNodePtr *val = mg_util_xml_find_class (xml_utils, a, "val", &val_len, NULL, 1);
xmlNodePtr *dte = mg_util_xml_find_class (xml_utils, a, "dte", &dte_len, NULL, 1);
if (val_len && dte_len) {
char *val_str = (char *) xmlNodeGetContent (val[0]);
char *dte_str = (char *) xmlNodeGetContent (dte[0]);
chapter = mg_manga_chapter_new (val_str, dte_str, url);
g_free (val_str);
g_free (dte_str);
}
if (url) {
g_free (url);
}
if (val) {
g_free (val);
val = NULL;
}
if (dte) {
g_free (dte);
dte = NULL;
}
return chapter;
}
static xmlNodePtr
mg_backend_readmng_get_a_for_chapter (
MgBackendReadmng *self,
xmlNodePtr li) {
for (xmlNodePtr child = li->children; child; child = child->next) {
if (!strcmp((char *) child->name, "a")) {
return child;
}
}
return NULL;
}
static xmlDocPtr
mg_backend_readmng_fetch_xml_details (MgBackendReadmng *self,
MgManga *manga) {