Dear viewer, these subtitles were generated by a machine via the service Trint and therefore are (very) buggy. If you are capable, please help us to create good quality subtitles: https://c3subtitles.de/talk/1144 Thanks!
Hi, everyone, thanks for coming
at this early hour
today here. We'll have a basically a one
hour walk through of building
a wiki data tool
by Lucas works for Wikimedia,
but has independently of that built a
wide range of creative tools, I guess.
So give a hand for Lucas.
Yeah, hi, I'm Lucas.
I work at Wikimania Germany on
the software development team for
wiki data, but I
also write some tools for Wiki
data in my private time.
Not really a wide range of things, but
a few of them.
So. So what I'm doing now is just private
stuff not related to WMD
directly,
but what we're going to build is
a tool for we could data as a tool
generally is almost anything that
people use to interact with
wiki data or with Wikipedia or something.
That's not part of the
wiki software itself.
But more specifically, we're going to
build a tool on this
Wikimedia Tool Forge platform where
the Wikimedia Foundation takes care of
the hosting for us so we don't have to
rent a server or take care
of certificates or anything.
We just write the code for the tool
and the foundation hosts
for us, which is nice.
And more specifically,
we're going to build a tool for
patrolling recent changes so
we could data when
a new user or a user who isn't
even logged in makes edits that edits
is marked as unpatrolled.
And then later, some experienced
editors can go through the list of
uncontrolled changes and see
all these changes. OK, do they make sense
or perhaps someone made a mistake and
this should be done differently?
Or perhaps it's just vandalism
and then they can mark
the edit as patrolled or they can improve
it or revert it and then Mark patrolled.
So marking the edit
as patrol doesn't mean that the edits is
good or bad. It just means
no one needs to look at this anymore.
It's done for now and we're going to
build a tool that helps people with a
bit.
And
so I'm going to do this
now within one hour,
perhaps one and a half hours, depending
on how long it takes, which is obviously
not really realistic for building
a full tool, because I practiced this
a few times now, but
I would say that the tool that we
are going to build now would be
realistic, I think, as a weekend project.
And I don't mean a crazy twelve hours
each day hackathon weekend, but just
a normal, relaxed weekend where you have
perhaps a few hours each day that you
can spend on playing with this
tool and experimenting with it.
And then at the end of the weekend,
you might have some first version of the
tool and then you can improve on that.
I think that would be more
or less the realistic timescale for
what's going to happen now.
And we're going to create
the tool using a template that
takes care of a lot of boilerplate code
for us. So that's called
a cookie cutter template.
And the template is
under my name and it's called Cookie
Cutter Tool Forge.
And then it's going to ask us a few
questions and please let me know
if this is not readable.
Um, so the tool identified is going
to be speed patrolling and the full
name is speed patrolling with them
uppercase letters. So it looks nicer
than maintain a name.
That's my own username
and my email address in case something
goes really wrong is this
and the tool is going to work on weekdays
of work and not on any other weekend.
So that's just OK.
No,
I practiced this like yesterday evening,
who created this
talent,
did I create that accidentally?
Hang on. First problem of the day,
did I create a.
No, I did not.
Who created speed patrolling?
Uh,
well, if the true name
is already taken, we'll just have to make
up a different one, I guess.
So let's instead call it.
Yes. Thank you.
Krick patrolling
and copy the rest of the information.
OK, do I not have an
Internet connection anymore?
That would be, of course, wonderful.
Oh, that would also be why this
doesn't work, because I don't have
Internet. Apparently,
I do have DNS.
What the hell?
We data is running,
but.
Oh, now it's running.
Oh. To Tool's starts.
Oops. Sorry. That is of course the meth
labs.
OK, uh
I'll just try again with
speed patrolling I guess.
Now, uh.
OK.
Why,
um,
what can I do?
Let me just delete this,
and this
is what I meant. Yes, yes,
and try to run it again
and kill it.
And then we have cookie
cutters.
There it is.
And I'm just going to
disable this hook and
then we will be able to
proceed with the template, at least
speed patrolling,
and then we will see later if we are
actually able to create the tool
or not. But we'll just bypass this
warning
for now.
There we go. OK.
And I'm just going to open the new
terminal. There we go.
So here, let's open the read me
first. That is generated for us.
It says for local
development set up.
We want to run this
command.
So to install the dependencies,
which should hopefully not take too long.
There we go.
And then we can run this command
to run the tool for now just on our
local system.
And we can open this, your URL
in a browser.
And there we go. There's a first version
of the tool. And here's a long
page that tells you all
kinds of things about how you would
proceed with building
the tool the next steps.
And if
you're building the tool, you should
definitely follow this page because it's
hopefully useful. But I'm going to skip
most of it just for time reasons.
So we're going to create the tool that we
can be a tool for immediate lead, because
that takes a few minutes behind the
scenes and I don't want to wait for that
later. So let's create speech
patrolling.
No, that is indeed
already in use or invalid.
Can I use quick patrolling?
No speed.
Speed minus patrolling
that's available.
OK, so I guess it's now called speed
and minus patrolling speeds,
patrolling the space.
In that case, I guess and I already wrote
the description, so I'll just
copy that.
It is a
tool to patrol and patrol recent changes
on the daytime. Autonomous patrols are
rolling the back as appropriate.
Given user writes, the software will
be the HPL
and the text are key data
and patrol
and create the tool.
And behind the scenes, some stuff
is happening that we don't care about for
now, sorry.
And instead we are going to
move ahead and register an oil
consumer. So off is
oops. This is not readable by the way.
Sorry, off
is how we talk to we
could data and because we need to
do things on behalf of the of
our user, the tool user.
But if we don't want them to just give us
their username and password because that
would be terrible. And then if my tool
gets hacked, all my users are compromised
as well, which I don't want.
So instead we're going to use a laugh and
say this tool only needs
to be able to do these few things.
And
we never see the user's password.
We just see a bunch of tokens which
we will give us.
And usually this is not
the first thing you do when you start
working on the tool.
Usually you can hack around a bit and
then eventually get around to adding off.
But we need off
actually just to get a list of
uncontrolled changes because that's
not public. So we need
to have the privileges of our
tool user even to just see
which changes are not patrolled yet,
which changes we should show to the user.
So we're going to start with that.
And our consumer
is going to be called speed
patrolling.
The version is going to be one point OS
dash dev No.
Oh one that's made point one and
I wrote the description as well.
Do not approve of this consumer.
We will see in a second why
and the callback.
Your URL is going to be what it says
here, except
it's going to be speed minus patrolling
because speed patrolling was apparently
taking.
This consumer will only work on
wiki data and not on any other wiki.
And the rights we need is
our to patrol changes and
to roll back changes.
So we will only
be able to make changes as patrols and
to revert them if necessary.
And we don't want any other privileges.
So even if this tool
gets. Compromised.
No one can make weird
edits using it, and
I accept
and acknowledge all these things and
I'm going to propose the consumer.
And no, apparently,
oh, that's an invalid value.
Can I use it in lowercase?
Yes, OK.
And here we have a consumer token and a
secret token, which is
why I put this big uppercase
do not approve this consumer in that
description, because this secret token
is now public to all of you and to the
entire Internet.
So we are going to copy these for now
and add them
to the.
So we are going to copy the config
example file to a real config file,
ensure that no one else can read it and
then edit it and put the consumer
key here and the consumer's secret
here.
And we can also fill in this secret
key just with a bunch of keyboard
mashing. That's fine.
And now next, we need
to tell the
admins that we have requested this
consumer. So we do that
on
this page using
this template.
So we copy this example
code and edit
this section of manual requests
and add our own requests
at the bottom, which just sets
off approval requests for
speed patrolling
the app name is speed.
Patrolling the version is zero
point one dash dev.
The publisher is myself
and the consumer key is
this thing.
And my comments I have already
written to tell the people that they're
not supposed to approve this consumer
because the secret token
is actually public.
So let's check if that looks more
or less OK.
Yes, OK, so
act or approve
request.
So if this off
tool is not accepted, then
I will be the only one who is able to use
it so
I can test using my account right now.
But no one else will be able
to use this tool right now.
And then later I will request the
different consumer. And that's going to
be the real one where the secret tokens
actually secret.
But usually, of course, if you were
building the tool, then you just request
one consumer and don't tell the
admins to not approve
that consumer because that's a bit weird.
OK, so now we should be able
to go back to this tool and
open the login page.
Uh huh. OK, now hang on a second.
We we've changed the config file, so we
need to restart
the server.
Let's do that.
There we go.
Speed patrolling, wants to interact,
patrol changes and roll back changes.
I'm going to allow that.
And of course, this goes through the
callback your be specified, which we
haven't set up yet.
So I'm just going to edit all this to
go back to local hotspot five
thousands
and oops.
Oh.
Well, I'm not sure
where that's coming from.
OK, let's try
going back here, and I
might need to clear out some storage
because I as
I said, I practiced this a few times, so
there might be some old cookie hanging
around there. So let's go to log in
and do this again
and edit the URL again.
Localhost part five thousand show
off. There we go.
And now I'm logged in as the
concertmaster.
OK, so now we should be able to
make API requests to be data using
this account here.
So let's start by actually editing
the tools code.
There's a lot of example code here which
we can use and we're
going to start we will need some kind of
authorization so we can just copy this
code from here.
So this is already some code that
makes an API request in this
case to get the user's gender.
We don't need that, but we do need this
part, which is just sets up the session
using the total.
And we're going to put that in your
methods, authenticated
session and
paste all this here.
And if there is no
off access token in the session, then for
now we just return none.
And this will probably crash sooner or
later. But I don't care.
And instead of assigning this, we return
this session and
now we need
to get a list of all
the recent changes so that we can pick
one of them and show it to the user.
And so we're going to write a new method
for that
unpatrolled changes
and get the session
and make an API request.
So to figure out what that looks like, we
can use the API sandbox
on Wiki data, which is an extremely
useful way to just play with the API
and experiment with it.
So if we want to get a list of anything
so like lists of the recent changes,
we're usually going to use this query
module and then here
it asks us which list would we like?
And there is a list called Recent
Changes, which sounds very promising.
And specifically, we want
um, we're not interested
in the timestamp and title, actually.
We only need the I.D.
of the changes we only want
and patrol changes and we
would like as many as possible.
And that's
it, I think. And so we can make the
request here and we see a bunch
of results and we're going to make the
same request over
in the tools. So we need to
get request action as
query.
Is that
OK? I'm just going to continue.
I hope it's not too bad.
We want this to be recent
changes.
No, not the cut,
I think.
Just.
That's new.
OK, is this microphone that's
very inconvenient.
OK, I'll I'll try to
continue like this for now hour until
they set up.
Oh, no.
Where's this coming from?
OK.
OK, and I.
OK, so I'll just have to lean here
because I have to talk and
type at the same time.
Sorry.
Around here I guess.
Is this is this OK?
Yeah. OK, that that
sounds great. Thank you.
So we got a list of recent changes and
our see prop equals
D and
our C show on patrol.
We just copy everything from the API
request we just made and see Limit
should be Max
and then we're going to get
a list of these results.
So actually for
each result in
the results of this and from
there, the query
recent changes part.
Um, no, actually, hang on.
We also want.
So there's some indication here if we
want to get more changes than we already
have, we can continue the API request.
And this library, this
Python library, which we're using to,
um, to interact
with the API, can follow that
automatically. So we're going to
specify continue
Raiche and equals true, I think.
And then that's a list of where
we get a list of results and then
each of them has
looks like this. So for
change in results, recent
query,
recent changes
and now changes one of these objects.
And we want to just return
their revision idea.
And now to just try out if this
works, we're going to write a quick
debug method which
returns the first element
of these uncontrolled changes
and make that available under
the debug endpoint.
And now we can open
source, slash, debug and
the browser and
inch object is not callable.
So we need to return
a string of this.
Actually, I think
yes. OK, so that we have a random
revisionary of an uncontrolled change, we
can quickly
look at that just to verify.
Yes, I can make this edit as patrol so
it's not patrolled yet.
So that works.
And next
we want to have um,
so we want the user to visit a page
like diff and then it's going to
be OK. You can see in my history where
I'm going with this because as
I said this before, so
this dif page is going to pick a random
recent change that's on patrol and then
redirect to that.
So we are going to write this endpoint
next.
We are going to do that somewhere up here
just below the index HTML.
Sorry, I wasn't
so just below index.
Maybe add a new route
for diff.
Um, we are
going to call that method any diff and
the just for now we take
the first idea from these uncontrolled
changes.
So I lied when I said it's a random one,
it's just we take the first one.
That's it for now and we return
a redirect
to the
u r l for a diff page
where the ID is.
This ID and diff
is the next method we're going to
return. So that's a route
that's below slash diff slash.
And here goes the I d.
And for now, we're just going to return
the string of this ID and then we will
take care of that in a second, but if I
now go to Jeff, then
I've been redirected to the Jeff page for
this, and I could just verify that this
works.
Hello, world.
And if I relo this again, then I see the
hello world here. OK, so
now we should actually
populate this page with something.
And what we want to do first is just
show that if to the user and for that
we're going to imbeds the
page from the wiki.
So something like
this page, except that there's a lot
of clutter here that we don't really want
to embed. There's a logo,
there's the whole sidebar, there's my
notifications up here.
So we don't really want to
show all that to the user.
So fortunately, there's a different
special page called
Mobile Diff, which
we can use.
And if we open it on
the mobile side, then we get
a much more.
I need to zoom in here a much more
minimal representation of the difference
with almost no clutter around the page.
So that's what we want to embed.
So that creates a real template for this
page.
The templates are here in the templates
directory. There are some examples,
templates from the templates
which we can delete eventually, but for
now we just keep them and we copy
greeter HTML to
Schimel and edits Stiffed
or Schimel.
And instead of this hello, whatever, we
are going to embed an iFrame,
it's going to be
100 percent wide and
let's say 70 percent
of the viewport high and
the source is going to be
and wiki dates state-of-the-art
special mobile diff
and here goes the I d
and close the iFrame again.
And now here, instead of
just returning the ID, we're going to
return and template.
The template name was different XML.
And there's one parameter which is this
ID and
now we reload this and
we should see.
A surprise.
OK, so when I tested this
week, data wouldn't let me in about this
and I had to add a whole ugly workaround,
but apparently this
is working now.
So let's proceed with that and
be happy that I don't need to spend five
minutes on the workaround and see if it
becomes necessary later.
So we've embedded the different page
right now because I'm so, so zoomed in
by default, you can actually see the
difference.
But that's not going to be a problem
later because I'm only zoomed in right
now for the presentation.
So real users should hopefully be able to
see the difference here and now.
So below this embedded iFrame,
we're going to add a
new row.
So there's just some
standard boot class
bootstrap thing
and no, actually not
so outside of the row.
So we want to add a few buttons
so that users can do stuff and we're
going to do that with an HMO
form. So let's add a form and said
it's going to post to our end
point and then those the form
again. And also because we're using
a form, we need to include
protection against cross site, request
forgery.
Otherwise other people on the Internet
will be able to use our tool to make a
random users patrol of random edits,
which is not what we want.
And to protect us against that,
we can copy something from this
Prasert HMO because that also has a form
and there's a CSF token here.
We just copy this whole line
and then later we'll have to
take care of that in our Python code.
But most of this is already provided by
the template as well.
OK, now that we have that,
we're going to have a row with three
columns.
So that's a column
as M and
inside the column, there's going to be a
button, which is a
bootstrap button, primary one.
And it's this is going to be called Skip.
So that's the most important button.
If the user doesn't understand
this edits, we don't want to force them
to do anything. So Skip should be
definitely the first option.
They have to just go to the next edit.
And this is going to post to
skip and point.
And then we copy this two more times,
once for a patrol
button and once for a rollback
button, which go to roll back
and
patrol respectively as well.
And also I forgot something, Ardeo.
And so we don't want this patrol or
rollback button to be enabled
if the user doesn't actually have
permissions to patrol or back or a
specifically rollback is
limited to a few hundred users,
I think, on key data.
So most users of our tool
will probably not be allowed to roll
back. So we don't want to show them this
button, which would be misleading.
So we will want to disable that.
So for that, we need to make some more
API calls to figure out if the user is
actually allowed to patrol.
So let's go back to the API sandbox
and we still want to create something,
but this time we want to query some meta
information, specifically user info.
Oops, that didn't work.
And what we want of the user is the
user's rights.
And if I make this request, we see
I have this rollback rights.
It's even at the top of the list,
apparently.
And so we want to get this list of
all the rights which the user has and
check.
Can they actually roll back?
And if they can, then we just disable
that button. So first
we're going to add a method here,
def user rights.
So again, we get an authenticated
session and then we return
session gets
action query and
what was it,
user info and
UI properties rights.
And from the response we want
the query remember,
and then the
user info member and then the rights
member. And that should return us this
area of user rights.
And we want to have a helper
method just user can control,
which just checks if
petrol is in
user rights.
And copy that again for
patrol instead of roll back
instead of patrol.
And these two should also be available in
the templates templates
lobal. We're going to see that in a
second.
What that does.
And it's tested with debug method, which
you already have here. So let's return
the string of user rights.
And a space ring of yours
can patrol.
Straying from user can
roll back
and go back to the trail,
back to Dybbuk,
and we see here's the gist of my rights
and I can patrol and I can roll back.
So those methods seem to work great.
And now in here, we want
to make something conditional.
If not, the user can
patrol.
So this method is now available here
because we've made it and we've declared
it as a template.
And if the user can patrol, then we just
say this button is disabled
and we do exactly the same thing
down here with the
rollback button.
I accept the method is, of course, now
user can roll back.
And now if we reload
this page again, we should see the three
buttons and
oh, they're still all three primary
buttons. Let's fix that. This is
a success button, I think, and this
is a dangerous button.
And now they all have three different
colors, which is nice.
And apparently there's something here.
Looks like a typo.
Yeah, they're OK.
And the buttons aren't centered yet.
Or we could change the design further.
But for now, this is just enough for
me at least.
And now we need to actually
deal with what happens if users do
something with these buttons.
So if I click Skip and it's going to
go to Skip and the server is going to
say, I don't know what that means, so
we're going to implement that.
And we start with Skip, which
is fairly easy.
So we go back where we already
had this thing
end point and now we're going to define
Skip.
And the route is
if the ID is still there
and then skip and this only
accepts post requests,
not get requests.
And we're going to first
of all, we should check if this is a
valid request or not.
So to protect ourselves against
see our. So there's a method down here
called submitted request valid.
And we're just going to say,
if that's not the case, then we return
just the same bowstring, saying C is our
F error and a generic
blind error as the status
code. And we can later perhaps
turn that into a nicer page.
But for now, that's good enough.
And now we know it's a real request.
So we should, um.
So what we should actually do when the
user says, I want to skip this edits,
we want to load the next one, but if
we just do that and nothing else, then
we'll just load the same edits again
and again, because that's still the most
recent omeprazole edits.
And so we need to start somewhere
that the user has already
wanted to skip this
change of this idea.
So we're going to store that in the user
session.
So we're going to get a list of skipped
ideas from the
session, which gives us
under the key script IDs.
And if it's not in the session yet,
because we've never put it there,
we fall back to an empty list and
now we open to that list,
the ID, which we have,
and then we
start again.
Session skipped IDs
is skipped. It is.
And then we return
actually the same thing as
of here.
No, not quite the same thing.
And we return a first
year,
a redirect for
the year, l for the
any diff and point which is different up
here. So you're L for always take the
method name and that doesn't need any
parameters.
So let's
hope that this works.
Let's just reload this.
Oops.
No I think I just need to reload.
That's, that happens.
I think if it's partially loaded
I have a secure kookiest object
is not callable.
Oh right. OK, so we
can actually try out this in browser
debugger which you get which is really
convenient if you use flask.
So we just need to pick out the pin
from the output of the server process.
It's right here and then
we can actually
try out to run some code against this
in our
browser. So
I could say,
um, what is the idea of this request,
for example?
Um, so
that's really convenient. But in this
case, we don't really know what this
should not be for last session.
This should be for last session.
DOT gets.
So let's reload.
And now it seems to be working OK?
We're now at this edit and
let's skip this
and.
I'm not sure if this is the same or
different one, it ends in age eight
and oh, OK,
no, we've sort of right now we're just
adding to this list of script ideas again
and again, but we're not using it.
So up here, in the end, if we shouldn't
just take the first uncontrolled change,
instead, we should
iterate over them in uncontrolled
changes.
If so,
we get these script ideas from the
session again, just like down here.
And if the idea is
in the script ideas, then we
continue with the next idea.
Otherwise we
return this redirect.
So now we go through the recent changes
until we find one that we don't want to
skip yet and we can optimize this
in the future. Like
right now, we're never, ever removing
any ideas from script ideas.
So the list will just grow to infinity.
But we can take care of that later.
But let's try to skip this now and
now. We should see a different edit
and try it again.
We see again a different
one. Yeah.
OK, so that's SERP taken care of
and next would be the patrol button.
So if the user
wants to
patrol and edit, that's going
to be almost the same branch.
If I'd
just patrol instead of skip, it's still
just for post requests.
And we also need to check if the request
is actually valid and otherwise return an
error.
And now we need to make an API
request to the meta wiki API.
So let's go again to the trusty
API sandbox.
And this time we don't want to get a list
of anything. We want to
patrol the change. So let's check if
there is just an action called
patrol. And in fact there is,
which is very nice.
And this action just needs
the revision idea, which we have
and a token.
So we're going to need to
supply this token. So first, we need an
API request, so
we need the session authenticated
session and we first need to make
a request to get this token for the media
wiki API. So
session gets it says
action query meter equals tokens.
Let's go back to the sandbox
because we don't actually need a standard
token. We need a special
patrol token.
So the request we need is action query.
Um, yeah,
Mr equals tokens,
and the type is
we want a patrol token and then
in the response we want Creevey tokens,
patrol objects.
Patrol talking, sorry.
So there we should have a token, and
now that we have that, we will be able to
insert that here and in the
sandbox. We can just fill it
automatically. But to us, that's
in the tool we need to do it ourselves.
And now we can just
so we don't want to make this request
here right now because I haven't filled
this in. But basically, we will need
to post to the session with action
being patrol and the
ref RFID is
the ID we have and
that token is the token we have.
And if that was successful,
we just want to redirect to the next
step. So just like here,
we do the same thing.
So let's go back to the speed
patrolling tool.
Um, and let's
just get a new dif oops.
Uh huh. That's uh.
That should be method's equals post.
Sorry.
Um, let me go change
claim website username, so it used to be
just ATSE and now it's at
Backup's.
So, um,
I don't want to patrol that.
I want to skip that.
Um, let's hope I can find an edit that I
want to patrol quickly.
So the Spanish description was changed.
No, no, no.
I don't want to patrol that either.
No, come on, give me some
good at it,
OK, this sounds great.
So here are links to German Wikipedia
edits for Davnie
or Stephanie Carr. I'm not sure.
And this is supposed to a Wikimedia
disambiguation page and this is also
a disintegration page.
So I think this is a good edit.
This makes sense.
So I'm going to put
actually let's just quickly
open this diff here.
So currently I could still market this
patrol here because it hasn't been marked
as patrolled yet.
And now we try to patrol it from here
and there's no error.
And if we reload the page here,
then this link is gone because we've
already patrolled. So that works
as well.
So the missing step would be
rollback.
Unfortunately, there's actually or
there seems to be a bug in media wiki.
I couldn't figure out how to make a
rollback via the API work.
So we're just going to skip that for now
and have a few more minutes instead,
because now the first version of the tool
is more or less done.
All we need to do now is to patrol this
on we a tool forge.
So we already created this tool account
and we should be able to
go into Tool Forge
and oops, I need to enter
my HQ.
I hope no one can get the password from
the keystroke sounds that we
are and we want to become this
speed
patrolling account
that doesn't look good.
I'm not a member of the group.
I'm
do not create the tool
speed minus patrolling.
Uh, does
it really take this long to propagate?
Uh,
so I'm in
some tools, but not.
Oh.
Oh dear.
Uh huh, uh huh.
I created this, uh, using my volunteer
account, but there's actually my work
laptop. So this I'm logged in
here as my work account.
Oh, damn.
OK,
OK.
I think I can fix this.
Let's age into my computer at home
and uh, from
there we should be able to access
to forge
and then yes, I
need to enter the passphrase again
and please just ignore what my computers
are called. It's a silly scheme and here
I can become speed patrolling.
Yes. OK,
and so we need uh.
So we I think
there are some instructions for this on
the index page. Right.
So I don't need to remember this.
Yes. Deploy.
So we've done create a troll account when
we can get to forge, we are just going to
skip the source code repository step
because that takes even longer and
instead we're going to create
the base directory of the tool.
And now we need to
get the source code on here and we're
just going to copy all the files
and then I'll take care of it later.
So for now, we
just create a tar ball, creates
zipped for both of
us in the file, some speed
patrolling the target
sets of all
the files. Yeah.
Uh, are there
any hidden files?
No. OK, so I can just use this hopefully.
And now I can copy this speed
patrolling through my
computer at home and now from there
I can copy it
onto Tool Forge.
And now I actually need to close
this shell I think because it's so it's
now in my home directory of the look
of my user and I'm
going to copy speed petroleum charges
that into the home directory of tools
DOT what was it called
here. Speed patrolling
and now become that user
again.
And now we have the speed patrolling here
and we just want in
we in the python, we want to
create a source directory, go
there and extract,
um,
um, SP's
petroleum charges that
we go now. We have all the code here
instead of doing a Gitlow,
OK, and we need to
get a shell in
with the right Python version,
and then we need to set
up a virtual environment where
we're going to install all the
dependencies so that
we don't need to worry about which
version of whatever libraries installed
globally.
We just get our own environment and
we want to
copy this thing
and
upgrade PIP itself, apparently.
Let's hope that doesn't take too long.
OK.
And then we want to install all the
requirements which we have, so
Flask and the library to talk to the
media, API and
everything else,
and that might take a little
while. I hope not too long.
Yeah. So it's every library to
talk to all of and all kinds of things.
Downloading and stalling.
Looks like we're going to be done very
soon.
OK, now it's still has to install all of
them.
OK, now we're done and
we can exit this again.
Now all we need to do is start the
Web servers.
Oops.
And now we should be able to
go to school,
so we have let's start our speeds
minus puch, trolling
us stiff because the index page
is still the default thing.
But OK,
and usually it can take a few more
seconds after starting or restarting the
server until it works. So let's just
retry.
Uh, there's an internal server error.
Why is that?
Let's check the log.
So this is the part that I didn't
practice because you can only create the
ones. So of course not.
That's what doesn't work.
Um,
anything here? Uh
oh. Of course, I didn't log in.
So it's unable to
get a list of recent changes.
And ideally, there should be better error
handling for this. But I was just too
lazy. So that's log in.
And this time we will not have to mess
with the callback there.
We are locked in and now
we can go to diff and
here we are.
And that's a tool running on.
We can be a tool for in apparently
around forty five minutes or a.
Which means we actually have at least
15 minutes for questions, which I did
not expect at all, so I probably went
way too fast here.
I'm sorry. I was not sure if this would
work, but do you have
any questions?
Come on.
And otherwise, as I mentioned,
if you want to do any of this yourself,
this was not a complete introduction to
how to build a tool.
But if you need help with any step,
then I will be in the kitchen area
for the next, I think, hour or
so. And there we can discuss
anything you want if there
really aren't any questions right now,
OK?
Was that a question?
No. OK.
Then I guess we're done already.
Thank you very much.