mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2025-12-17 12:31:03 +01:00
Compare commits
3 Commits
intern/moc
...
feature/ch
| Author | SHA1 | Date | |
|---|---|---|---|
| 04aa2d07a3 | |||
| f41b89f6fe | |||
| 4b0066d6ce |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,6 +3,3 @@ kleingebaeck
|
|||||||
releases
|
releases
|
||||||
t/out
|
t/out
|
||||||
.bak
|
.bak
|
||||||
t/httproot/out
|
|
||||||
t/httproot/kleinanzeigen
|
|
||||||
t/httproot/favicon.ico
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
# Mock http server
|
|
||||||
|
|
||||||
Install ehfs from https://github.com/mjpclab/extra-http-file-server/.
|
|
||||||
|
|
||||||
Install p2cli from https://github.com/wrouesnel/p2cli.
|
|
||||||
|
|
||||||
Run `templates/render.sh` to build the file structure.
|
|
||||||
|
|
||||||
Run `server.sh` to start the http server.
|
|
||||||
|
|
||||||
To scrape an ad from it, use such a URL:
|
|
||||||
|
|
||||||
http://localhost:8080/s-anzeige/first-ad/111-11-111
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
ehfs -a :/s-anzeige:./kleinanzeigen \
|
|
||||||
-a :/api/v1/prod-ads/images/fc:./img \
|
|
||||||
-l localhost:8080 -I index.html
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
<head>
|
|
||||||
<title>Ad Listing</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="l-container-row">
|
|
||||||
<div id="vap-brdcrmb" class="breadcrump">
|
|
||||||
<a class="breadcrump-link" itemprop="url" href="/" title="Kleinanzeigen ">
|
|
||||||
<span itemprop="title">Kleinanzeigen </span>
|
|
||||||
</a>
|
|
||||||
<a class="breadcrump-link" itemprop="url" href="/egal">
|
|
||||||
<span itemprop="title">{{ category }}</span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% for image in images %}
|
|
||||||
<div class="galleryimage-element" data-ix="3">
|
|
||||||
<img src="http://localhost:8080/api/v1/prod-ads/images/fc/{{ image.id }}?rule=$_59.JPG"/>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<h1 id="viewad-title" class="boxedarticle--title" itemprop="name" data-soldlabel="Verkauft">
|
|
||||||
{{ title }}</h1>
|
|
||||||
<div class="boxedarticle--flex--container">
|
|
||||||
<h2 class="boxedarticle--price" id="viewad-price">
|
|
||||||
{{ price }}</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="viewad-extra-info" class="boxedarticle--details--full">
|
|
||||||
<div><i class="icon icon-small icon-calendar-gray-simple"></i><span>{{ created }}</span></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="splitlinebox l-container-row" id="viewad-details">
|
|
||||||
<ul class="addetailslist">
|
|
||||||
<li class="addetailslist--detail">
|
|
||||||
Zustand<span class="addetailslist--detail--value" >
|
|
||||||
{{ condition }}</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="l-container last-paragraph-no-margin-bottom">
|
|
||||||
<p id="viewad-description-text" class="text-force-linebreak " itemprop="description">
|
|
||||||
{{ text }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de" >
|
|
||||||
<head>
|
|
||||||
<title>Ads</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
{% for ad in ads %}
|
|
||||||
<h2 class="text-module-begin">
|
|
||||||
<a class="ellipsis"
|
|
||||||
href="/s-anzeige/{{ ad.slug }}/{{ ad.id }}">{{ ad.title }}</a>
|
|
||||||
</h2>
|
|
||||||
{% endfor %}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh -x
|
|
||||||
base="../kleinanzeigen"
|
|
||||||
mkdir -p $base
|
|
||||||
|
|
||||||
echo "Generating /s-bestandsliste.html"
|
|
||||||
p2cli -t index.tpl -i vars.yaml > $base/s-bestandsliste.html
|
|
||||||
|
|
||||||
for idx in 0 1; do
|
|
||||||
slug=$(cat vars.yaml | yq ".ads[$idx].slug")
|
|
||||||
id=$(cat vars.yaml | yq ".ads[$idx].id")
|
|
||||||
mkdir -p $base/$slug/$id
|
|
||||||
cat vars.yaml | yq ".ads[$idx]" | p2cli -t ad.tpl -f yaml > $base/$slug/$id/index.html
|
|
||||||
done
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
ads:
|
|
||||||
- slug: first-ad
|
|
||||||
id: 111-11-111
|
|
||||||
title: First Ad
|
|
||||||
price: "19 €"
|
|
||||||
condition: "Sehr gut"
|
|
||||||
category: "Weitere Elektronik"
|
|
||||||
created: 21.12.2023
|
|
||||||
images:
|
|
||||||
- id: fcf6d664-5258-42c2-bf58-d1b8e9221574
|
|
||||||
- id: fcf6d664-5258-42c2-bf58-as43as5d43as
|
|
||||||
text: |
|
|
||||||
Zu Verkaufen.
|
|
||||||
Zahlung nur Paypal.
|
|
||||||
- slug: second-ad
|
|
||||||
id: 222-22-222
|
|
||||||
title: Second Ad
|
|
||||||
price: "200 €"
|
|
||||||
condition: "Sehr gut"
|
|
||||||
category: "Elektronik"
|
|
||||||
created: 21.12.2023
|
|
||||||
images:
|
|
||||||
- id: cdas4sd5-5258-42c2-bf58-d1b8e9221574
|
|
||||||
- id: cdas4sd5-5258-42c2-bf58-as43as5d43as
|
|
||||||
text: |
|
|
||||||
Zu Verkaufen.
|
|
||||||
Zahlung nur Überweisung.
|
|
||||||
Reference in New Issue
Block a user