Merge branch 'master' of TrueAuraCoral/FreeCompetitors into master
This commit is contained in:
commit
2da4c8ceb3
4 changed files with 47 additions and 9 deletions
35
README.md
35
README.md
|
@ -1,3 +1,36 @@
|
|||
# FreeCompetitors
|
||||
|
||||
A search tool for free software replacements.
|
||||
A search tool for free software replacements.
|
||||
|
||||
# How to add new software:
|
||||
|
||||
In the [apps](apps) folder there are a bunch of json files for software. Here is an example:
|
||||
|
||||
- `names` what the software is called.
|
||||
- `comment` description of the software.
|
||||
- `links` Various links to learn more about the software e.g. `git` (where the source code can be found if it it's available), `website` (software's website if it exists) and `wikipedia` if there is some wiki. At least one of these needs to be there.
|
||||
- `icon` a **link** to the icon of the software. For now no images will be stored in the repository so it takes up less space.
|
||||
- `platforms` where the software can be accessed from e.g. Linux, Windows, Android, iOS, Mac. For websites just write `Web`.
|
||||
- `networks_read` if the software uses something like a [network](https://en.wikipedia.org/wiki/Social_networking_service). This means the software is able to view content on that network.
|
||||
- `networks_write` if the software uses something like a [network](https://en.wikipedia.org/wiki/Social_networking_service). This means the software is able to do stuff like publish or write comments on the network.
|
||||
- `formats_write` if the software can write files to your system what formats does it support.
|
||||
- `generic_name` names that can be used to describe what the software is.
|
||||
- `issues` if the software has privacy related issues.
|
||||
|
||||
```json
|
||||
{"names":["YouTube",
|
||||
"You Tube",
|
||||
"youtube.com",
|
||||
"youtu.be"],
|
||||
"comment":"A platform for uploading and watching videos.",
|
||||
"links":{"website":"https://youtube.com",
|
||||
"wikipedia":"https://en.wikipedia.org/wiki/YouTube",
|
||||
"icon":"https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/YouTube_full-color_icon_%282017%29.svg/120px-YouTube_full-color_icon_%282017%29.svg.png"},
|
||||
"platforms":["Android", "iOS","Web"],
|
||||
"networks_read":["youtube"],
|
||||
"networks_write":["youtube"],
|
||||
"formats_read":[],
|
||||
"formats_write":[],
|
||||
"generic_name":["Video Player", "YouTube Client", "Music Player", "Publication"],
|
||||
"issues":["Surveillance", "Non-Free Software", "Non-Free JavaScript", "DRM"]}
|
||||
```
|
||||
|
|
Binary file not shown.
Binary file not shown.
21
server.py
21
server.py
|
@ -6,14 +6,6 @@
|
|||
# web-masters and a like, so we are counting on
|
||||
# your ability to set it up and running.
|
||||
|
||||
CSS = "https://zortazert.codeberg.page/style/styles.css"
|
||||
PORT = input("Port: ")
|
||||
try:
|
||||
PORT = int(PORT)
|
||||
except:
|
||||
print("Port should be a number")
|
||||
exit()
|
||||
|
||||
# Server side
|
||||
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
from subprocess import *
|
||||
|
@ -23,6 +15,19 @@ import os
|
|||
from modules import search
|
||||
from modules import render
|
||||
|
||||
CSS = "https://zortazert.codeberg.page/style/styles.css"
|
||||
try:
|
||||
with open("port.json","r") as f:
|
||||
json_stuff = json.load(f)
|
||||
PORT = json_stuff["port"]
|
||||
except:
|
||||
PORT = input("Port: ")
|
||||
try:
|
||||
PORT = int(PORT)
|
||||
except:
|
||||
print("Port should be a number")
|
||||
exit()
|
||||
|
||||
# Who fucking made this http.server so I need to use classes?
|
||||
# I fucking hate who ever thought that it was a good idea...
|
||||
|
||||
|
|
Loading…
Reference in a new issue