termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.19k stars 3.02k forks source link

Termux Wiki #8327

Open ghost opened 2 years ago

ghost commented 2 years ago

Current Termux Wiki has two main issues:

I don't review Wiki editing history every day and thus can't revert changes made by malicious actors. I can lock down page editing, but that means Wiki will not be editable by users. On other hand as I already stated, there very few contributions from users which means that Wiki is rarely updated.

@agnostic-apollo has already proposed to move Wiki to GitHub Pages, which has number of benefits over current solution including possibility to review user contributions.

What do you think about replacing Termux Wiki with GitHub Pages site? @Grimler91 @Neo-Oli @fornwall

Dawimpy commented 2 years ago

Wow! That's good 👍. So now devs can prevent the trash content and more people can contribute it!

agnostic-apollo commented 2 years ago

Check related issue #8320 for malicious editing.

Moreover, maintaining wiki info in app github READMEs and wiki and also on termux.wiki site creates duplication. termux.wiki site has lot of outdated info. Everything should be hosted in one place, preferably github due to granular control of who has access, reviewing changes and markdown support. I am not even sure if that wiki site is even backed up by someone, other than neo, github would be much better for that too.

The way I am currently designing is that each app repo will have a docs directory in which app specific documentation would exist. Only some important files (minimize space usage) from the docs directory will also be shipped with each app in apk assets directory to allow offline viewing with build.gradle filtering tasks, specially for people who don't have access to internet at all times or have low data limits. The termux-app settings will have an option to open docs for each app. The assets directories of other plugins should be accessible due to sharedUserId if plugin Context is passed to AssetManager. The doc files will dynamically add the links to the latest github version file at the top since assets files may be old. Those links and files that are not shipped with the apk will be opened in a webview inside the app directly from github. Users can open in browser too from options.

Support for full documentation download can be added too later, which can be downloaded to ~/.termux/docs. Markdown navigation is also supported to jump to different files via relative links, just like on github. Technically, any git repo on local filesystem would be viewable via the API I am adding for the media viewer, although API would just be experimental in next release since it needs more work internally and changes would likely be required. It's complicated, I am not sure of the best way to implement that yet, since further future APIs need to be added too, with different reqs.

So now that each app will have a docs directory which can be updated while features are being added instead of separately later, which often isn't done quickly (like by me), the https://github.com/termux/termux.github.io will host rest of the documentation that is hosted on termux wiki site, etc. The app specific docs directory will be added as git submodules so that they are accessible too from the github pages site termux.github.io.

https://docs.github.com/en/pages/getting-started-with-github-pages/using-submodules-with-github-pages

Hopefully, this design should work. Most of it is working locally for me. There are some things left that need to be implemented like a file manager support so that specific files can be manually opened or view as option to allow user to decide how he wants to open the file markdown/text/image/webview or external. There are obviously so many mime types/ file extensions, so user will have to decide for most of them themselves, and all wouldn't be viewable anyways, at least currently like audio/video, etc. Moreover, need to add support to jump to markdown headings when links are clicked or new files with url fragment opened.

Neo-Oli commented 2 years ago

Some stats

I pulled out the latest stats. They could be useful in this discussion. In the last two weeks the Wiki had 92,442 unique visitors and 1,480,057 total requests. That's about 6,000-7,000 visitors a day with 80,000-90,000 requests each day. Currently there are 332 pages (including User pages).

We had a big issue with spam pages in the early days. That's why new users can't create new Pages unless approved by a moderator (which sort of defeats the point of having a wiki). There are currently 13,294 registered users, though most of them are spam accounts.

Some history

We moved from Github pages to the dedicated MediaWiki in July 2017. It has steadily grown in both requests and content since then. The great surge of user contributions we were hoping for back then never really manifested and most of the content was written by just a few people, most of them very active contributors already.

Some technical issues

I'm hosting the wiki on a very small virtual server on which I also host my personal websites and the personal websites of a few of my friends. The wiki has very much outgrown this setup. It is by far the largest site there. A few months ago I added a cache in front of the wiki which helped a lot with page speed and server resource usage. The wiki should probably be moved to a dedicated server with more resources sometimes soon.

Right now I am the only person who has access to this server, which isn't a good situation. In case I became unavailable no one else could upgrade or fix the wiki. I too don't check on the wiki every day, so if there is spam it might sit there for a while. I do have a monitoring set up, so if it goes down entirely it is usually solved in a few hours at most.

Some conclusion

We'd need more moderators, more people with server access and a better server if we were to continue using the MediaWiki for a lot longer.

I think, moving the help pages back to GitHub pages would be a good way to alleviate some or most of these issues. I think the original rationale for moving to a MediaWiki no longer applies today. @agnostic-apollo's proposed setup sounds very fancy.

Some notes about migrating

There are a lot of blog posts, forum posts and other websites that link to pages in the wiki. We should probably create a jumphost at wiki.termux.com that redirects the old content to the new.

The wiki is also reachable via https://termux-wiki.glow.li/wiki/Main_Page. So while we move it can still be reached using that link, even after we switch over the wiki.termux.com domain to the new solution. This could be useful for transferring over the information.

leap0x7b commented 2 years ago

I remade the Termux Wiki in Next.js here https://github.com/leapofazzam123/termux-wiki.git https://termux-wiki.vercel.app

It's using the original Termux Wiki pages converted from Mediawiki to Markdown (sometimes updated), currently not all pages are translated to Markdown.

sk0kanik commented 2 years ago

One spam is still not removed on Package Management page.

ghost commented 2 years ago

Thanks, previous content has been recovered.

ghost commented 2 years ago

I remade the Termux Wiki in Next.js here

@leapofazzam123 That's good and you can keep your wiki variant up. But our solution should be simple and don't use any additional hostings. GitHub Pages is best variant there.

leap0x7b commented 2 years ago

I guess so

Yisus7u7 commented 2 years ago

I think it is an excellent idea, but in what format will we keep the web pages?, in html or Markdown?

agnostic-apollo commented 2 years ago

in what format will we keep the web pages?, in html or Markdown?

Markdown, since that is the standard almost everywhere and is human friendly and easy to write.

Yisus7u7 commented 2 years ago

Excellent!

Maxython commented 2 years ago

Can someone give me access to edit wiki.termux? I want to write an article on how to create and configure an AUR for termux.

Yisus7u7 commented 2 years ago

I would also like to have access, if you want, I can bring interesting content for the x11 area (graphical environment)

Neo-Oli commented 2 years ago

@Maxython @Yisus7u7 Have you already created User accounts?

Maxython commented 2 years ago

@Maxython @Yisus7u7 Have you already created User accounts?

Yes, I have (https://wiki.termux.com/wiki/User:Maxython)

Yisus7u7 commented 2 years ago

@Maxython @Yisus7u7 Have you already created User accounts?

Yes, https://wiki.termux.com/wiki/User:Yisus7u7v

Neo-Oli commented 2 years ago

@Maxython @Yisus7u7 I added you to the trusted group. You should now be able to edit and create pages.

Maxython commented 2 years ago

@Neo-Oli , thank

GalaxySnail commented 2 years ago

I would like to add this link to this page, may I have access to edit wiki.termux? It's my account: https://wiki.termux.com/wiki/User:GalaxySnail

GalaxySnail commented 2 years ago

I'm not sure if here is the proper place to ask this question, but is there any way to contribute to the wiki of this repository? I want to add libandroid-posix-semaphore to https://github.com/termux/termux-packages/wiki/Common-porting-problems, but GitHub said "You do not have permission to update this wiki."

agnostic-apollo commented 2 years ago

Create a new issue with what you want to add/update and someone with access can do it for you. Only termux maintainers and known contributors should get access to wiki.

GalaxySnail commented 2 years ago

OK, thanks!

Neo-Oli commented 2 years ago

I would like to add this link to this page, may I have access to edit wiki.termux? It's my account: https://wiki.termux.com/wiki/User:GalaxySnail

@GalaxySnail I did give you permissions to the MediaWiki.

Yisus7u7 commented 2 years ago

@Maxython @Yisus7u7 I added you to the trusted group. You should now be able to edit and create pages.

Thanks!

GalaxySnail commented 2 years ago

Thanks! @Neo-Oli

thunder-coding commented 2 years ago

I'm temporary unpinning the issue so that I can pin some other one. Will revert soon

agnostic-apollo commented 2 years ago

I'm temporary unpinning the issue so that I can pin some other one.

How dare ye! You gonna get haunted by the ghost!

On a serious note, for packages updates, a new category packages should be created on termux.github.io and a new post added for any news termux devs want to give to users. There is RSS support https://termux.github.io/posts, so users can subscribe to it, support will be added in termux app in future as well. If you want me to create the packages category, let me know.

https://github.com/termux/termux.github.io#add-new-category-for-posts

thunder-coding commented 2 years ago

On a serious note, for packages updates, a new category packages should be created on termux.github.io and a new post added for any news termux devs want to give to users.

That will be a nice to have feature !

EDIT: Let me see if I can do this myself.

agnostic-apollo commented 2 years ago

That will be a nice to have feature !

I have added apps and packages category. You will just need to create posts as per https://github.com/termux/termux.github.io#add-new-post-in-category.

agnostic-apollo commented 2 years ago

https://termux.com will automatically mirror https://termux.org now with https://github.com/termux/termux.com.

2096779623 commented 2 years ago

https://github.com/termux/termux-packages/issues/9982#issuecomment-1095549082

Add cryptography to the Python page.

The rust package needs to be installed before executing pip3 install cryptography.

Iclo30 commented 2 years ago

https://wiki.termux.com/wiki/Main_Page

ghost commented 2 years ago

@Iclo30 This is not a place for off-topic discussions! you are temporarily blocked for a day due to excessive amount of your deleted messages in this issue ticket

Spz2022 commented 2 years ago

@Neo-Oli Can someone give me access to edit wiki.termux? ME : https://wiki.termux.com/wiki/User:Spz2021

Neo-Oli commented 1 year ago

@Spz2022 Sorry. I missed this. I've now given you access.

Maxython commented 1 year ago

We would do well to update the https://wiki.termux.com/wiki/Package_Management article. Need to update the repos information and update the list of pkg commands. Also, for this article, it would not hurt to add information about pacman, if you of course approve of it.

agnostic-apollo commented 1 year ago

Yeah, sure, open a new issue and post a MediaWiki formatted (not markdown) file and we can update the wiki once changes are approved. Can grant you access too, but changes should still be approved first.

Also, for this article, it would not hurt to add information about pacman, if you of course approve of it.

You can add pacman and tur info under community repositories.