Commit Graph

34 Commits

Author SHA1 Message Date
a484c9fd6b Fix typo in comment 2022-06-20 21:12:27 +02:00
c234a6a654 Refactor docsload and add support for loading from directory
Break out the tar parsing parts into a function for just that and create
a new one that knows how to load directly from the html directory in the
postgresql source tree, for more efficient snapshot loading.
2022-06-20 21:12:21 +02:00
e6f529dd4e Store the git hash of developer docs loaded
This will require some further updates on the loading side of things
before it's fully valid, but for now track and show a link to the git
hash used to build developer docs *if* one is specified.

We only track it for devel (because releases have release numbers) and
we only show it in the cases where we would already show the loading
time.
2022-06-20 20:32:05 +02:00
e9f4454444 Use the proper set of arguments in docs loader
We parsed it out using the options parser, but then when using it
required a hardcoded order on the commandline. That made no sense...
2022-06-20 20:32:05 +02:00
291511b5b1 Add verbose mode to docs loading and tweak defaults
Instead of printing every single page loaded, print the start of the
process and the statitics by default.

The existing --quiet parameter continues to work to make the process
completely quiet.

Add a new parameter --verbose that makes it run in the old way, printing
everything.
2021-08-11 14:46:35 +02:00
2f969bff76 Make documentation purges use xkey 2021-05-18 09:54:18 +02:00
e24e987c29 Only flag docs as loaded when they've actually changed
We already avoided the actual updates (by filtering the UPDATE
statement), but since we set the load date we'd trigger a change to
every page and kick it ouf of the caches even when not chagned, which is
wasteful. So instead only do that if something has changed. When it has,
we still reset that whole version of the docs since we want the load
date to be consistent across them.
2020-11-23 11:58:51 +01:00
e384b4c917 Fix a number of incorrect escapes
Pointed out by newer versions of pep8, but they were never correct.
2020-01-09 13:25:59 +01:00
b8038754aa Add Bootstrap grid classes to images referenced in the HTML docs. 2019-04-25 17:21:44 -04:00
3d3339249a Add a lot more code documentation to the documentation loader. 2019-03-31 17:02:43 -04:00
1f4c74c2c2 Do not use libtidy on content from SVG files. 2019-03-31 16:38:12 -04:00
a05801ba81 Remove global variable reference that increments the page count in the docloader.
This is primarily to remove some old code to allow for future changes
to how certain types of doc files can be loaded in the future.
2019-03-31 16:20:51 -04:00
c028ce47ea Load docs using COPY instead of INSERT
Issuing individual INSERTs for each line in the docs works decently when
local, but it slow when loading across The Tubes Of The Internet.
Switching to using COPY takes the load time from the buildfarm animal
from just over 2 minutes to about 6-7 seconds.
2019-02-22 16:39:41 +01:00
cbdb937597 Update docsload to use tidylib instead of tidy
The old library is not supported on py3. This is the same migration
we've done for other projects like pgarchives.
2019-01-26 17:21:37 +01:00
a10eb6420b More generic changes from 2to3 2019-01-26 16:19:26 +01:00
07d83eae42 Update script shebangs to use python3 2019-01-26 16:19:26 +01:00
c6c0bf1948 Update print and input syntax for python 3 2019-01-26 16:19:26 +01:00
a156829375 Generic unicode updates 2019-01-26 16:19:26 +01:00
e3ec36b50c Remove multi-statement lines, per pep8 2019-01-17 20:52:17 +01:00
0883ac6423 Fix whitespace and indentation, per pep8 2019-01-17 20:47:43 +01:00
87237f6536 Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
2019-01-17 15:35:39 +01:00
6e89d2fb66 Turn off tidy indent on docs older than 11
It seems the newer tidy in Debian Stretch breaks with the output from
the old docs toolchain, causing indention to happen inside <pre> blocks
which clearly breaks rendering.

Turn it off for thos, but keep it enabled for version 11 and up (at this
point that's just dev), because the output becomes a lot easier to read
when trying to debug things.
2018-04-03 15:04:47 +02:00
3ba7ead866 Disable clean flag in tidy calls on new XML based docs build
Let's see if this cleans up some unintentional formatting
2017-02-18 14:09:57 +01:00
ab0ee30881 Support loading docs in utf-8 from pg version 10 2016-11-16 13:00:50 +01:00
c1e2ce22d6 Go back to using direct psycopg2 for docs loading
This removes the dependency on django from docload, facilitating
incremental upgrades of the infrastructure.

This now requires a new docload.ini file in the tools/docs directory,
with a section "db" and a setting "dsn".
2016-01-29 12:45:48 +01:00
45f53d5d03 When loading the current version of docs, also purge /current/ 2012-09-24 12:38:49 +02:00
47b839c472 Close db connection in docloader
To make Stefan happy...
2012-05-18 10:53:14 -04:00
1ea8ecd12a Include docs load timestamp in developer docs
This makes it possible to figure out when the docs were actually
loaded, since developer docs don't carry a version number. This is
actually going to be the docs *load* timestamp, and not build timestamp,
but they should be close enough together that it shouldn't matter.

Fixes #108
2011-12-04 15:14:54 +01:00
585a0e2efe Purge the correct URL when loading developer docs
They're /docs/devel/, not /docs/0/ - that's just used to cheat the
version system  being a decimal field...
2011-12-04 15:01:43 +01:00
4b4e9348c4 Ignore symlinks in docs tarballs
Required for postgresql <7.1
2011-11-27 16:05:30 +01:00
00d058bc98 Purge newly loaded docs from varnish automatically 2011-11-23 08:55:33 +01:00
bcce9e0aee Add option to docload.py to make it run quietly
Using commandline --quiet. To do this, switch to using the standard
python optionparser for commandline parsing.
2011-11-22 21:09:12 +01:00
03e88eaec8 Make docs loader use the django database connection/configuration
In passing, make it check that the version being loaded actually
exists...
2011-08-16 13:00:30 +02:00
90b758c247 A first very basic import.
Contains basic functionality, and an import of most of the static content
from the old site.

There is still plenty more to do...
2009-09-14 14:39:25 +02:00