ent8r / blacklistr Goto Github PK
View Code? Open in Web Editor NEWA website for visualizing country specific data
Home Page: https://ent8r.github.io/blacklistr/
License: GNU General Public License v3.0
A website for visualizing country specific data
Home Page: https://ent8r.github.io/blacklistr/
License: GNU General Public License v3.0
Referring #20 I'd also say this needs a better error handling.
https://ent8r.github.io/blacklistr/?java=tactile_paving/AddTactilePavingCrosswalk.java doesn't work.
Perhaps change the parsing to look for Countries\.noneExcept\s*(\s*new\s+String\s*\[\]
instead of getEnabledForCountries
?
It would be awesome if I can export the image for the Quests wiki.
From streetcomplete/StreetComplete#824 (comment):
By the way, rugk, this would also be great for your Quests wiki page, to show where certain quests are enabled or disabled.
From streetcomplete/StreetComplete#824 (comment):
so you can export the image as a PNG, or, better, SVG (otherwise we'd have to screenshot this, but that may not be nice, e.g. one may want a transparent background and the same size, which us hard when screenshotting)
From streetcomplete/StreetComplete#824 (comment):
make sure there are tree colors/states for: enabled, disabled by default and blacklisted (the last one cannot be enabled manually in the setting)
States are:
I.e. especially for illustrations in the wiki this is useful (see #2).
I'll do that, just want to have an issue for that, here. You can assign me, if that is possible.
https://ent8r.github.io/blacklistr/?java=postbox_collection_times/AddPostboxCollectionTimes.java
The list is too long… 😄
If you want, I can fix that. It should just be a small CSS change, I think.
The Readme (or website) should explain how you can load data into the web app.
After the migration of quests in Streetcomplete to Kotlin, unfortunately the endpoint does not work anymore :-(
It now looks like this (commented out what is may or may not be there / is optional)
override val enabledForCountries/* : Countries*/ /* get() */ = Countries.noneExcept(
// all of Northern and Western Europe, most of Central Europe, some of Southern Europe
"NO","SE","FI","IS","DK",
// etc...
)
So, the most future proof method would be to look for the first Countries.
after override val enabledForCountries
to read either noneExcept
or allExcept
, then look for the first "
and parse the list of country codes as usual until the first )
that is not in a comment.
https://ent8r.github.io/blacklistr/?java=housenumber/AddHousenumber.java
Blacklisted in Netherlands, undefined, Denmark, undefined, Norway, undefined, Czech Republic
😆
From streetcomplete/StreetComplete#824 (comment):
to make it really easy you could also automatically generate the alt/title text, which should list the countries and the quest's state there.
Actually you already have it mostly. You have the list on the right. Now it would only be useful if you can show this list in a human-readable way.
This can then be used as a text-description of the black- or whitelist this is generating. As said, this is useful for the alt and title text for the image in the wiki (#2).
E.g. https://ent8r.github.io/blacklistr/?java=tactile_paving/AddTactilePavingCrosswalk.java:
only
# Europe
NO,SE,
GB,IE,NL,BE,FR,ES,
DE,PL,CZ,SK,HU,AT,CH,
LV,LT,EE,RU,
# America
US,CA,AR,
# Asia
HK,SG,KR,JP,
# Oceania
AU,NZ,
The comments are not necessary.
I wana target this:
https://github.com/westnordost/StreetComplete/pull/1628/files#diff-17aac284c3410c5985409eb090dd1263R18-R20
But this link
https://ent8r.github.io/blacklistr/?streetcomplete=postbox_ref/AddPostboxRef.kt
Does not work and shows me the error
TypeError: This file is not valid because it contains no black- or whitelist!
in Firefox 72
Also, is the ?java
endpoint still valid? Still used in OSM wiki.
It is really funny to see these, and also useful for StreetComplete/technical aspects, but for Wiki visitors (see #2) it is not that useful.
So maybe just add a toggle, so you can hide these.
I am very sorry, but I do not know all country names in their local language… 😄
https://github.com/ENT8R/blacklistr/blob/master/README.md mentions:
To load the data used by StreetComplete use the endpoint /?streetcomplete={questDirectory/questName}
Example: /?streetcomplete=housenumber/AddHousenumber.kt
However, that (example at least) doesn't seem to work for me (https://ent8r.github.io/blacklistr/?streetcomplete=housenumber/AddHousenumber.kt does not show any countries)
I just looked into that again, and was quite surprised to see blacklistr does some format conversion and does not support the exactly format, that StreetComplete uses.
Does not this defeat one whole use case?
Because as a StreetComplete developer/contributor/... I want to have a simple copy & paste workflow.
I.e. I want to:
The third thing is not possible, because the syntax is different. And doing the conversion back by hand, totally defeats the purpose of blacklistr - then I can also just edit it by hand.
/cc @westnordost
Hi @ENT8R , man, you are quick. It is impressive how quickly you can whip something up like this. So, here are the promised requirements. What @rugk writes is well-meant, but in my opinion, he is missing the big picture. Since you already built most of it, I am just telling what I'd want to have changed:
We have two use cases:
AddHousenumber
quest, there is a comment for each blacklisted countrymaster
of the StreetComplete repos and will never have to update this.Format
I thought it would be best to have an own simple format for specifying these white/blacklists to have it both human readable and not verbose. It is basically a comma separated list + line comments + specifying whether it is a white-or blacklist. Here is an example file:
all except
NL, # https://forum.openstreetmap.org/viewtopic.php?id=60356
DK, # https://lists.openstreetmap.org/pipermail/talk-dk/2017-November/004898.html
NO, # https://forum.openstreetmap.org/viewtopic.php?id=60357
CZ, # https://lists.openstreetmap.org/pipermail/talk-cz/2017-November/017901.html
or
# See https://ent8r.github.io/blacklistr?path=/app/src/main/assets/quest_blacklists/AddCycleway.txt
# #749. sources:
# Google Street View (driving around in virtual car)
# https://en.wikivoyage.org/wiki/Cycling
only
DE, AT,NO, FI, IS, DK, CZ, HU,CH,ES,
IE,LU, FI,
LI, # may not have cycleways after all, bla bla bla
PL, # by local knowlege of xyz (forum link)
# US source: http://peopleforbikes.org/get-local/
US-WA,US-OR, HI, US-CA,US-AZ,
US-TX
So:
all except
or only
(could also be none except
, or none but
... opinions?), then a space, and then...,
#
and go till the end of the lineA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.