# Help for new app packaging : 13ft \[12ft.io alternative\] - bypass paywalls

**URL:** https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665
**Category:** Apps packaging
**Tags:** english
**Created:** [December 16, 2022, 11:05pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665 "2022-12-16T23:05:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 16, 2022, 11:05pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/1 "2022-12-16T23:05:39Z")

</div>

Hello 🙂

I would like to package [13ft](https://github.com/wasi-master/13ft), a selfhosted equivalent of [12ft ladder](https://12ft.io/). It allows to bypass _some_ paywalls by fooling the website, impersonating GoogleBot (guess what : a lot of website gives their whole content to GoogleBot for SEO ranking).

It seems “simple”:

- install python flask dependency
- run a python script
- the app is working.

I started to work on it here : [GitHub - lapineige/13ft\_ynh: A 12ft.io replacement, based on 13ft.](https://github.com/lapineige/13ft_ynh)

Feel free to help 🙂

Thanks 😃

* * *

My current questions:

- how do I start this python script properly ? Including on server restart.

- how to stop it properly ? (shut down a SystemD service ?)

- how to uninstall properly

- how do we transfer an app to Yunohost catalog ? I don’t remember 😅  
edit : I found how to do it (in the repository settings), now I waiting for github to unfork the repository as I can’t transfert a `example_ynh` fork, even with a different name.

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 17, 2022, 11:41am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/2 "2022-12-17T11:41:20Z")

</div>

> [@Lapineige](#):
>
> how do I start this python script properly ? Including on server restart.

This is called a daemon or service, so you want to look into systemd service configuration

For example, pepettes (powers [donate.yunohost.org](http://donate.yunohost.org) and is also a flask app) : [https://github.com/YunoHost-Apps/pepettes\_ynh/blob/master/conf/systemd.service](https://github.com/YunoHost-Apps/pepettes_ynh/blob/master/conf/systemd.service)

you will usually want to use gunicorn which is a small piece of software that creates a bunch of workers for the app such that it’s not a single process handling all the request (imagine only 1 waiter/waitress/cook in a 1000-person restaurant)

(and cf also the `ynh_add_systemd_config` and similar helper calls in the app install, remove, upgrade, restore))

> [@Lapineige](#):
>
> how to stop it properly ? (shut down a SystemD service ?)
> 
> - how users could do it ?

Not sure why you’d want to stop it ? Maybe you’re referring to having the systemd service listed in the “Services” section of the webadmin. For this you can have a look at the call to `yunohost service add` in the app install script

> [@Lapineige](#):
>
> how to uninstall properly
> 
> - how can we check that flask isn’t used by another app before removing it ?

Usually Python apps use what’s called virtualenv to properly separate all their dependencies from the rest of the system (similar to nodejs `node_modules` folder)

This implies the app provides a `requirements.txt` as part of its source to list its dependencies (and for the love of god, please don’t install stuff with `pip` globally on a yunohost system, that tends to make everything explode)

correct example in pepettes : [https://github.com/YunoHost-Apps/pepettes\_ynh/blob/master/scripts/install#L123-L126](https://github.com/YunoHost-Apps/pepettes_ynh/blob/master/scripts/install#L123-L126)

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 17, 2022, 12:31pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/3 "2022-12-17T12:31:02Z")

</div>

I configured a systemd service (and registration into yunohost web admin interface), but I’m unsure how to do it properly. Right now the command is `python 3 /var/www/[app path]/init.py` and that’s it.

> [@Aleks](#):
>
> you will usually want to use gunicorn which is a small piece of software that creates a bunch of workers for the app such that it’s not a single process handling all the request (imagine only 1 waiter/waitress/cook in a 1000-person restaurant)

I don’t know if it’s needed in that case, it’s a very simple and lightweight app, and I believe it won’t be used that much.  
Is it simple to do ? What’s the drawbacks ?

> [@Aleks](#):
>
> Not sure why you’d want to stop it ?

When I uninstall it ?  
And also I think it’s good that users have the control to shut it down.

> [@Aleks](#):
>
> Maybe you’re referring to having the systemd service listed in the “Services” section of the webadmin. For this you can have a look at the call to `yunohost service add` in the app install script

Already done, thanks :), it’s very simple with the handler and the default example 🙂

> [@Aleks](#):
>
> Usually Python apps use what’s called virtualenv to properly separate all their dependencies from the rest of the system

Oh yeah, I haven’t deployed a python app for so long that I forgot about that 😂 😅

> [@Aleks](#):
>
> This implies the app provides a `requirements.txt` as part of its source to list its dependencies

Great, thanks for the tip. What the syntax ? Just `flask` ?

> [@Aleks](#):
>
> correct example in pepettes : [pepettes\_ynh/install at master · YunoHost-Apps/pepettes\_ynh · GitHub](https://github.com/YunoHost-Apps/pepettes_ynh/blob/master/scripts/install#L123-L126)

Thanks for pointing this, very appreciated, I was a bit lost about how to do it properly _the yunohost way_ 😅

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 17, 2022, 1:07pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/4 "2022-12-17T13:07:26Z")

</div>

> [@Lapineige](#):
>
> I don’t know if it’s needed in that case, it’s a very simple and lightweight app, and I believe it won’t be used that much.  
> Is it simple to do ? What’s the drawbacks ?

Hmmm yeah maybe you’re right, I didnt really have a look into the actual app 😛. Just highlighting that’s the usual stuff, but big +1 for not blindly copypasting stuff, each app has its own quirks

> [@Lapineige](#):
>
> When I uninstall it ?  
> And also I think it’s good that users have the control to shut it down.

Then yeah I guess you mean the service integration in the Services section of the webadmin

During the uninstall, just stop the service, remove it from yunohost with `yunohost service remove(?)` and remove the systemd conf with the appropriate helper … the example app should show all this

> [@Lapineige](#):
>
> Great, thanks for the tip. What the syntax ? Just `flask` ?

Hmmm not sure what you mean, `requirements.txt` should be provided by the upstream app … though you could also build one manually … The syntax is for example this: [https://github.com/YunoHost/pepettes/blob/main/requirements.txt](https://github.com/YunoHost/pepettes/blob/main/requirements.txt) (you can see Flask in the list along a bunch of other stuff). `requirements.txt` are usually generated by running something like `pip freeze` which list all packages installed + their version

Note that if this is just to install Flask, then there’s no need for a requirements.txt … They become relevant when you start having a bunch of dependencies. To install flask inside the venv, you can just run `venv/bin/pip install Flask` (not sure about the exact syntax and the call to pip inside the venv depends on the exact context)

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 17, 2022, 1:49pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/5 "2022-12-17T13:49:01Z")

</div>

> [@Aleks](#):
>
> Hmmm yeah maybe you’re right, I didn’t really have a look into the actual app 😛. Just highlighting that’s the usual stuff, but big +1 for not blindly copypasting stuff, each app has its own quirks

😂 I understand 😉  
On the other side, the configuration you shared allows for an easy way to shutdown the app, as well as reloading it (not sure it’s useful).

> [@Aleks](#):
>
> During the uninstall, just stop the service, remove it from yunohost with `yunohost service remove(?)` and remove the systemd conf with the appropriate helper … the example app should show all this

Great, thanks.

> [@Aleks](#):
>
> `requirements.txt` should be provided by the upstream app …

~~It doesn’t have it~~. The app is very simple, and html file, a python file, that’s it.  
edit: the software author added this file ! So I’m using it.

> [@Aleks](#):
>
> though you could also build one manually … The syntax is for example this: [pepettes/requirements.txt at main · YunoHost/pepettes · GitHub](https://github.com/YunoHost/pepettes/blob/main/requirements.txt) (you can see Flask in the list along a bunch of other stuff)

I guess I’ll have to do that… thanks for sharing this example.

> [@Aleks](#):
>
> Note that if this is just to install Flask, then there’s no need for a requirements.txt … They become relevant when you start having a bunch of dependencies. To install flask inside the venv, you can just run `venv/bin/pip install Flask` (not sure about the exact syntax and the call to pip inside the venv depends on the exact context)

Oh ok great, so I’ll only do this.

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 17, 2022, 6:53pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/6 "2022-12-17T18:53:58Z")

</div>

By the way : do you know how I can enable again “issues” and the [github repository](https://github.com/YunoHost-Apps/13ft_ynh) ? I can’t find a way.

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 17, 2022, 7:31pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/7 "2022-12-17T19:31:52Z")

</div>

go to “Settings” on the repo, first page, tick the “Issues” feature

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 17, 2022, 7:33pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/8 "2022-12-17T19:33:00Z")

</div>

Hm just saw you only had Write access to the repo, I changed it to “Maintain” which should give you access to repo settings

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 17, 2022, 7:50pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/9 "2022-12-17T19:50:46Z")

</div>

That’s the thing I didn’t know !  
I believed that I would keep the right to do that as I can write to it and shared it with Yunohost-Apps organisation.

Thanks !

edit : I only have “Wikis” and “Projects” 😕

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 17, 2022, 8:11pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/10 "2022-12-17T20:11:50Z")

</div>

Changed to “Admin”, should be good now

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 17, 2022, 8:25pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/11 "2022-12-17T20:25:15Z")

</div>

It is !

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 18, 2022, 10:36am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/12 "2022-12-18T10:36:20Z")

</div>

Is it possible that the source files (in that cas only one file) is not formatted as an archive ?

In that case it’s only a python script.  
Can I specify something in the app source configuration so it will not try to untar or something like that ?

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 18, 2022, 2:33pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/13 "2022-12-18T14:33:25Z")

</div>

According to the [helpers doc](https://yunohost.org/fr/packaging_apps_helpers) (ynh\_setup\_source) :

> The src file need to contains:
> 
> […]
> 
> ```plaintext
> # (Optional) If it set as false don't extract the source. Default: true
> # (Useful to get a debian package or a python wheel.)
> SOURCE_EXTRACT=(true|false)
> 
> ```

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 18, 2022, 8:18pm UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/14 "2022-12-18T20:18:57Z")

</div>

Oh, thanks, I didn’t manage to find it ! 🎉

The app packaging main page is a bit… loose on some specific points like this 😅

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [December 19, 2022, 12:37am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/15 "2022-12-19T00:37:56Z")

</div>

![74sh7m](https://forum.yunohost.org/uploads/default/original/2X/b/b4e346d271c260c3e906ee1831b4fe8cbc896168.jpeg)

(The current packaging doc is absolutely horendous and outdated, i started to rework it from scratch but ugh there’s quite a lot of work x\_x)

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [December 19, 2022, 10:11am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/16 "2022-12-19T10:11:55Z")

</div>

I understand that… good luck with that amount of work, it’s very valuable ! 😃

Unfortunately I can’t help much as I don’t even know the basics of packaging 😕

---

<div class="post-metadata">

### Author: ![jln](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jln/32/2123_2.png) [@jln](https://forum.yunohost.org/u/jln)
#### Post date: [June 5, 2023, 8:20am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/17 "2023-06-05T08:20:47Z")

</div>

Hi,  
I get the application working thanks to [the answers on Github](https://github.com/YunoHost-Apps/13ft_ynh/issues/2#issuecomment-1564634875), but unfortunately the result isn’t at all convincing: I’ve tried with L’Humanité and Alternatives Économiques, and in both cases I can’t get past the paywall (whereas I can with the Bypass Paywalls Clean extension for Firefox).

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [June 5, 2023, 9:17am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/18 "2023-06-05T09:17:28Z")

</div>

It’s clearly not working 100% of the time, it’s only a trick for some special cases…  
Does it work with [https://12ft.io](https://12ft.io) ?

---

<div class="post-metadata">

### Author: ![jln](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jln/32/2123_2.png) [@jln](https://forum.yunohost.org/u/jln)
#### Post date: [June 5, 2023, 9:52am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/19 "2023-06-05T09:52:19Z")

</div>

Yep. In fact I’m facing two different issues:

- with Alternatives Économiques, it works with 12ft, not at all with 13ft
- with L’Humanité, it works with 12ft and 13ft, but the style of the page is “destroyed” with the last one (as if css didn’t load)

I’ll just have to find which websites 13ft is capable to browse 🙂

---

<div class="post-metadata">

### Author: ![Lapineige](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@Lapineige](https://forum.yunohost.org/u/Lapineige)
#### Post date: [June 5, 2023, 10:10am UTC](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665/20 "2023-06-05T10:10:02Z")

</div>

I’m curious to figure out if it’s an 13ft issue or a Yunohost packaging one…  
But I don’t know how to check that 🤔

[Next page](https://forum.yunohost.org/t/help-for-new-app-packaging-13ft-12ft-io-alternative-bypass-paywalls/22665.md?page=2)
