Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOAP standard #34

Closed
sjehuda opened this issue May 20, 2022 · 11 comments
Closed

DOAP standard #34

sjehuda opened this issue May 20, 2022 · 11 comments

Comments

@sjehuda
Copy link
Contributor

sjehuda commented May 20, 2022

intro

Why I'm for using DOAP?

  • Because it can be used as a standard to share data, similarly to XBEL and vCard.
  • Because XML is a very robust filetype to transfer information.
  • Because JSON is really unprofessional.
  • ~~ If you disagree, I'll sue you in court. ~~

issue

As proposed by @Echolon at #32 (comment)

@ge0rg, please assign me for this task.

Design:
Add custom tags to link to app stores.
Use XPath to retrieve content.

@sjehuda
Copy link
Contributor Author

sjehuda commented May 29, 2022

@Echolon I need help in design.

Problem

I can add a great amount of apps for each platform, which is what I'm going to do.
There are two problems:

  • User might be flooded with an overwhelming list
  • Some web admins will not know how to make their own selection other than deleting those that they don't want; some might as well want to have just a single choice.

Proposal

Please note that we will have a DOAP file per client.

Question

How should we design the client selection mechanism?

Example:

Use a JSON file/array, similarly to how we do it right now, and according to JSON file, DOAP files will be retrieved accordingly.

For instance:

File: clients_Android.json

// Uncomment client to enable
[
   // "blabber"
   // "conv6ations"
    "yaxim",
    "conversation",
    "xabber",
    "bruno",
    "monocles"
   // "snikket"
   // "cheogram"
   // "quicksy"
]

Will use files: yaxim.doap conversation xabber.doap bruno.doap monocles.doap (or .rdf or .xml whatever the file extension is)

What do you think?

@Echolon
Copy link

Echolon commented May 29, 2022

@sjehuda not easy the question. One thing we will have in the future I think is to evaluate the compliance level via doaps. Maybe go for the moment with entries that dont have outdated timestamps + are listed in the xmpp.org "Getting Started" page (afaik)

@sjehuda
Copy link
Contributor Author

sjehuda commented May 29, 2022

I think is to evaluate the compliance level via doaps

Great idea. Thank you @Echolon

I'll keep it at that, because I know how to approach the proposed design above in a concise and clear manner, and especially XPath-wise.

If anyone has an objection to the proposed design, please let me know.

@sjehuda
Copy link
Contributor Author

sjehuda commented May 29, 2022

Focusing on yaximyaxim yaxim.rdf.xml

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:xmpp="https://linkmauve.fr/ns/xmpp-doap#"
        xmlns:foaf="http://xmlns.com/foaf/0.1/"
        xmlns:schema="https://schema.org/">
  <Project>

    <name>yaxim</name>

    <shortdesc xml:lang="en">yet another XMPP instant messenger</shortdesc>
    <description xml:lang="en">yaxim is an Android XMPP/Jabber client with a clean user interface and open source (GPLv3).</description>
    <schema:logo rdf:resource="https://yaxim.org/images/yaxim.svg"/>
    <schema:screenshot rdf:resource="https://yaxim.org/screenshots/tiny/roster.png"/>
    <schema:documentation rdf:resource="https://github.com/yaxim-org/yaxim/wiki"/>

    <homepage rdf:resource="https://yaxim.org/" />
    <wiki rdf:resource="https://github.com/yaxim-org/yaxim/wiki" />
    <bug-database rdf:resource="https://github.com/yaxim-org/yaxim/issues" />
    <category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-client" />
    <category rdf:resource="http://api.gnome.org/doap-extensions#apps" />
    <license rdf:resource="http://usefulinc.com/doap/licenses/gplv3" />

    <programming-language>Java</programming-language>
    <os>Android</os>

    <repository>
      <GitRepository>
        <location rdf:resource="https://github.com/yaxim-org/yaxim.git" />
        <browse rdf:resource="https://github.com/yaxim-org/yaxim" />
      </GitRepository>
    </repository>

    <download>
      <play>
        <location rdf:resource="https://play.google.com/store/apps/details?id=org.yaxim.androidclient" />
        <browse rdf:resource="https://play.google.com/store/apps/details?id=org.yaxim.androidclient" />
      </play>
      <fdroid>
        <location rdf:resource="https://f-droid.org/packages/org.yaxim.androidclient/" />
        <browse rdf:resource="https://f-droid.org/packages/org.yaxim.androidclient/" />
      </fdroid>
      <fallback>
        <location rdf:resource="https://yaxim.org/archive/yaxim-bb.apk" />
        <browse rdf:resource="https://yaxim.org/archive/yaxim-bb.apk" />
      </fallback>
    </download>

  </Project>
</rdf:RDF>

I then retrieve the name from <name>, logo from <schema:logo> and description from <description> and the the download links from .

My question is, what JS mechanism (on cliebnt side) do we have that would allow XSS, that is to check for status 200 for 3rd part links?

P.S. Awesome work on the XSL style!

@ge0rg
Copy link
Collaborator

ge0rg commented May 29, 2022

Maybe we need some server-side code to download the DOAP files and provide an extract of the data. We don't need this much anyway from them, so this could be done periodically by a job that would populate clients_XYZ.json

@Echolon
Copy link

Echolon commented May 29, 2022

Maybe we need some server-side code to download the DOAP files and provide an extract of the data. We don't need this much anyway from them, so this could be done periodically by a job that would populate clients_XYZ.json

Stupod question: Isn't the xsf client.json what you need if you just query the top keys?

@mwild1
Copy link
Contributor

mwild1 commented Jun 1, 2022

This is the code that xmpp.org uses to fetch and extract info from DOAP files (including logos): https://github.com/xsf/xmpp.org/blob/master/tools/prepare_software_list.py

@sjehuda
Copy link
Contributor Author

sjehuda commented Jun 1, 2022

Don't we want to do the querying of XML files on client-side?

I was thinking of using document.evaluate

QUERY = '//name'

document.evaluate(
QUERY, document, null,
XPathResult.STRING_TYPE);
count = count.stringValue;

See https://openuserjs.org/scripts/sjehuda/Downloader.exe_Remover

@sjehuda
Copy link
Contributor Author

sjehuda commented Jun 1, 2022

@Echolon

Isn't the xsf client.json what you need if you just query the top keys?

I think it will suffice. Maybe we'll use json exclusively, eventually.

@sjehuda
Copy link
Contributor Author

sjehuda commented Mar 8, 2023

The DOAP files might be useful when they have "available languages" of which a program is available in.

@sjehuda
Copy link
Contributor Author

sjehuda commented Mar 10, 2023

The compliance concern is valid, but is relevant when we don't do a manual check, which is what we are doing right now by sending code and discussing about it.

We might want to use INI, YAML files instead.

I'm closing this.

@sjehuda sjehuda closed this as completed Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants