Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
S1SYPHOS committed Aug 16, 2021
0 parents commit 8204e21
Show file tree
Hide file tree
Showing 245 changed files with 60,915 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Cache files
/__pycache__/
/.doit.db

# Composer files
/composer.lock
/vendor

# Development files
/.vscode
/.env

# Sensitive information
/login.json
/.*cache

# Auto-generated content
# (1) Build folder
/issues/**/dist/*
!/issues/**/dist/templates
/issues/**/dist/templates/*
!/issues/**/dist/templates/edited.sla
# (2) Finished editions
/issues/**/*.pdf
!/issues/**/*-buchempfehlungen.pdf

# Experimental
/assets/mails/spring.html
/assets/mails/autumn.html
17 changes: 17 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude([
'src',
'dist'
])
->in(__DIR__)
;

return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)
;
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Recommended novelties

## About this project
Every year we put together two [lists of recommended novelties](https://fundevogel.de/en/recommendations) (~ 300 books) that become our spring and autumn editions.

This repository houses the workflow for doing so, all the logic for using [CSV files](https://en.wikipedia.org/wiki/Comma-separated_values), exported from KNV's `pcbis.de` backend, fetching bibliographic data from their WSDL API (powered by [`php-pcbis`](https://github.com/fundevogel/php-pcbis)) and creating each issue from an individual [Scribus](https://www.scribus.net) template using the excellent [`ScribusGenerator`](https://github.com/berteh/ScribusGenerator) library.


## Setup
Create a virtual environment with `python2`, since ScribusGenerator doesn't work with v3, and activate it:

```bash
# Create virtual environment
virtualenv -p python3 .env
source .env/bin/activate

# Install dependencies
python -m pip install -r requirements.txt
```


## Roadmap
- [x] Auto PDF generation from python
- [x] Adding masterpages via import script
- [x] ~~Implement python WSDL workflow (eg using Zeep)~~
- [x] Generate list: book>page, sorted by publisher
- [x] ~~Improving string-replacement~~
- [ ] Adding tests
- [ ] Fixing bug that causes imported pages to be "stacked" somehow (maybe Scribus)


:copyright: Fundevogel Kinder- und Jugendbuchhandlung
Binary file added assets/images/fallback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/hero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,005 changes: 1,005 additions & 0 deletions assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/logo_colored.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/mails/example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<p>
Sehr geehrte Damen und Herren,<br>
<br>
viel Spaß bei den Empfehlungen des Fundevogel-Teams!
</p>
<p>
Die neuen Entdeckungen ergänzen unser Sortiment und sind unentbehrlich
für die individuelle Beratung. Sie finden unsere Empfehlungslisten auch
regelmäßig auf unserer <b><a href="https://fundevogel.de">Webseite</a></b> nebst
persönlichen Buchtipps.
</p>
28 changes: 28 additions & 0 deletions assets/mails/signature.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<p>
Mit besten Grüßen aus dem Fundevogel<br>
<br>
Claus-Peter Jepsen und Team
</p>
<p>
-- <br>
Lieber barfuß als ohne Buch!
</p>
<p>
Kinder- und Jugendbuchhandlung Fundevogel<br>
Inh.: Claus-Peter Jepsen<br>
Marienstr. 13<br>
79098 Freiburg<br>
</p>
<p>
Telefon: 0761/25218<br>
Fax: 0761/30041<br>
E-Mail: [email protected]<br>
Internet: www.fundevogel.de<br>
</p>
<p>
VK.-Nr.: 31776<br>
Volksbank Freiburg: Konto 724 070 8 / BLZ 680 900 00<br>
Bankverbindung Ausland:
IBAN DE 266 809 0000000 7240708 / BIC GENO DE 61 FR 1<br>
USt-ID: DE 142035994<br>
</p>
223 changes: 223 additions & 0 deletions assets/templates/dataList.sla

Large diffs are not rendered by default.

882 changes: 882 additions & 0 deletions assets/templates/main.sla

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "fundevogel/recommended-novelties",
"type": "library",
"description": "Fundevogel book recommendations, published biannually",
"keywords": ["books", "pcbis", "knv", "csv", "dtp"],
"homepage": "https://github.com/Fundevogel",
"license": "GPL-3.0",
"scripts": {
"cs-dry": "php-cs-fixer fix --dry-run --diff",
"cs-fix": "php-cs-fixer fix"
},
"authors": [
{
"name": "Fundevogel",
"homepage": "https://fundevogel.de",
"role": "Project Author"
},
{
"name": "Martin Folkers",
"homepage": "https://twobrain.io",
"role": "Contributor"
}
],
"repositories": [
{
"type": "package",
"package": {
"name": "berteh/scribusgenerator",
"version": "master",
"dist": {
"url": "https://github.com/berteh/scribusgenerator/archive/master.zip",
"type": "zip"
},
"source": {
"url": "[email protected]:berteh/scribusgenerator.git",
"type": "git",
"reference": "master"
}
}
}
],
"require": {
"fundevogel/php-pcbis": "2.2.3",
"berteh/scribusgenerator": "@dev"
}
}
Loading

0 comments on commit 8204e21

Please sign in to comment.