PHP validation script


Service: (NONE)
Status: DECLINED
Case: none
Changes: 2
Source: link
Author: import script (4) Bot


PHP validation script


Comments:
On 2018-05-18 14:05:00 UTC, Deleted wrote:

imported from 2720

On 2018-05-23 12:41:34 UTC, Deleted wrote:

https://groups.google.com/forum/#!msg/tosdr/3PzLf6ZIlag/PM_eagvQ-bEJ Heya!

So in the process of writing a tool to import *.json -> CouchDD I found a
need to write a validation script, the first working version of which is in my
fork on github.
It's run from the command line (opening it in a browser would likely not be
readable). A few things I'm wondering about...

1. There's a "type" attribute on services, that's almost always set to
"service". Should this always be set to service and a "type": "point"
introduced to points, or is this meant to track a different metric (eg:
eulas) in the future? Right now, to avoid overwriting "type" I'm needing
to make a new "datatype": "service" or "point" for import to Couch. Is that
something that should be in the original *.json files, or is it pointless?
2. Why do so many points not have full attributes (especially "service"
attributes)? Is this list automatically generated?
3. Is there any technical reason "id"s cannot have the -1 or -2 added to
match file names?

Anyone, feel free to suggest other things this code should check for. If
you'd like a hand making all these changes to the *.json files I'd be
willing to help. In any case, here is the script's current output with
everything except the "Points must have a "service" attribute." since there
are so many:

> php validate_json.php
>
> RESULTS
>
> ../services/facebook-connect.json: Internal "type" is not "service".
>> Internal "type" is: software
>
> ../services/minecraft.json: Internal "id" does not match filename.
>> Internal "id" is: minecrat
>
> ../services/mozilla-persona.json: Internal "type" is not "service".
>> Internal "type" is: software
>
> ../services/status-net.json: Internal "type" is not "service". Internal
>> "type" is: software
>
> ../services/yahoo.json: Internal "id" does not match filename. Internal
>> "id" is: Yahoo
>
> ../points/7EArFDi7faE-2.json: Internal "id" does not match filename.
>> Internal "id" is: 7EArFDi7faE
>
> ../points/DRj4SuDbnP8-1.json: Internal "id" does not match filename.
>> Internal "id" is: DRj4SuDbnP8
>
> ../points/EpPNnYXBW_w.json: Internal "id" does not match filename.
>> Internal "id" is: EpPNnYXBW_wk
>
> ../points/L5pl0Vn9lKY-1.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-10.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-11.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-2.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-3.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-4.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-5.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-6.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-7.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-8.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/L5pl0Vn9lKY-9.json: Internal "id" does not match filename.
>> Internal "id" is: L5pl0Vn9lKY
>
> ../points/Rn8M-KQOcNU.json: Internal "id" does not match filename.
>> Internal "id" is: t-INoE6fH982
>
> ../points/T98obrJsjJA-2.json: Internal "id" does not match filename.
>> Internal "id" is: account-killer-blacklist
>
> ../points/_ZNQ9J07ntI.json: Internal "id" does not match filename.
>> Internal "id" is: aPGR2C_AkskJ
>
> ../points/aXOIDbzevYE-1.json: Internal "id" does not match filename.
>> Internal "id" is: VYXGTAktQuAJ
>
> ../points/damOWTFaho0-1.json: Internal "id" does not match filename.
>> Internal "id" is: damOWTFaho0
>
> ../points/pseudos-allowed.json: Internal "id" does not match filename.
>> Internal "id" is: x2OybdCClW0
>
>
>> Process finished with exit code 0 at 01:31:15.
>
> Execution time: 3,218 ms.
>
>
Hopefully the import_to_couchdb.php script will be along shortly.

/Robin

--
www.tos-dr.info // www.twitter.com/tosdr // www.github.com/didnotread
---
You received this message because you are subscribed to the Google Groups "Terms of Service; Didn't Read" group.
To post to this group, send email to tosdr@googlegroups.com.
To unsubscribe from this group, send email to tosdr+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/tosdr?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

On 2018-05-30 12:50:18 UTC, Deleted wrote:

imported status as declined



We track editorial changes to analyses and updates to a point's status and display the previous versions here as part of an effort to promote transparency regarding our curation process.

Version 1: 2018-05-30 12:50:18 UTC by Deleted Bot

Previous Title: No changes recorded

Updated Title: No changes recorded

Previous Analysis: No changes recorded

Updated Analysis: No changes recorded

Previous Status: PENDING

Updated Status: DECLINED

Version 2: 2018-05-18 14:05:00 UTC by Deleted Bot

Previous Title:

Updated Title: PHP validation script

Previous Analysis:

Updated Analysis: PHP validation script

Previous Status:

Updated Status: PENDING