pyWikiCMS API Documentation
clickstream
Created on 2023-06-11
@author: wf
ClickStream
dataclass
Represents a clickstream with associated page hits and user agent data.
Source code in frontend/clickstream.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
ClickstreamLog
dataclass
single log of clickstreams
Source code in frontend/clickstream.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
ClickstreamManager
Bases: object
logging of client clicks
Source code in frontend/clickstream.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
|
__init__(root_path, rdf_namespace='http://cms.bitplan.com/clickstream#', show_progress=True, verbose=True)
Constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_path
|
str
|
the root path |
required |
rdf_namespace
|
str
|
The base namespace URI for the RDF export. |
'http://cms.bitplan.com/clickstream#'
|
show_progress
|
bool
|
If True, show progress. |
True
|
verbose
|
bool
|
If True, print the output message. |
True
|
Source code in frontend/clickstream.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
add_stream_properties_to_graph(g, CS, stream, entity_counter)
Adds the properties of a clickstream to the RDF graph.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
g
|
Graph
|
The graph to which the properties will be added. |
required |
CS
|
Namespace
|
The namespace for clickstream data. |
required |
stream
|
Any
|
The clickstream object containing the data. |
required |
entity_counter
|
int
|
A counter for creating unique entities. |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
The updated entity counter after adding the properties. |
Source code in frontend/clickstream.py
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
|
export_to_rdf(rdf_file, batch_size, rdf_format='nt')
Export clickstream logs to RDF files in batches. :param rdf_file: The base file name to write the RDF data to. :param batch_size: The number of clickstream records per file. :param rdf_format: The RDF serialization format to use (default is "nt").
Source code in frontend/clickstream.py
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
|
get_progress(iterable, desc='Processing')
Wrap an iterable with a progress bar if show_progress is True
Source code in frontend/clickstream.py
190 191 192 193 194 195 196 197 |
|
load_clickstream_logs(limit=None)
Load all clickstream logs from the directory
Source code in frontend/clickstream.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
|
reload_graph(rdf_file_pattern, rdf_format='nt')
Reloads the RDF data from a batch of files into the clickstream logs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rdf_file_pattern
|
str
|
The file pattern to search for RDF files. A wildcard '*' will be appended if not present. |
required |
rdf_format
|
str
|
The RDF serialization format of the files (default is "nt"). |
'nt'
|
Returns:
Name | Type | Description |
---|---|---|
Graph |
Graph
|
The RDF graph populated with data from the files. |
Source code in frontend/clickstream.py
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
|
serialize_batch(g, rdf_file, file_counter, rdf_format)
Serializes a batch of RDF data to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
g
|
Graph
|
The RDF graph to serialize. |
required |
rdf_file
|
str
|
The base name for the RDF file. |
required |
file_counter
|
int
|
The current file count for naming. |
required |
rdf_format
|
str
|
The format to serialize the RDF data. |
required |
Source code in frontend/clickstream.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
|
DateParse
Source code in frontend/clickstream.py
20 21 22 23 24 25 26 27 28 29 30 31 |
|
parse_date(date_str)
staticmethod
Parse a string to a datetime object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
date_str
|
str
|
The date string to parse. |
required |
Returns:
Name | Type | Description |
---|---|---|
datetime |
datetime
|
The parsed datetime object. |
Source code in frontend/clickstream.py
21 22 23 24 25 26 27 28 29 30 31 |
|
PageHit
dataclass
Represents a single page hit with path and timestamp.
Source code in frontend/clickstream.py
34 35 36 37 38 39 40 41 42 43 44 |
|
UserAgent
dataclass
Represents a user agent with syntax errors, ambiguity and other attributes.
Source code in frontend/clickstream.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
cmsmain
Created on 2022-11-24
@author: wf
CmsMain
Bases: WebserverCmd
ContentManagement System Main Program
Source code in frontend/cmsmain.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
getArgParser(description, version_msg)
override the default argparser call
Source code in frontend/cmsmain.py
20 21 22 23 24 25 26 27 28 |
|
main(argv=None)
main call
Source code in frontend/cmsmain.py
31 32 33 34 35 36 37 |
|
frame
HtmlFrame
A class to frame html content with a basic HTML document structure.
Attributes:
Name | Type | Description |
---|---|---|
lang |
str
|
Language of the HTML document. |
title |
str
|
Title of the HTML document. |
Source code in frontend/frame.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
__init__(frontend, title, lang='en')
Initialize HtmlFrame with a specified language and title.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
str
|
Title for the HTML document. |
required |
lang
|
str
|
Language of the HTML document. Defaults to "en". |
'en'
|
Source code in frontend/frame.py
10 11 12 13 14 15 16 17 18 19 20 |
|
footer()
Generate the footer part of the HTML document.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Footer part of an HTML document as a string. |
Source code in frontend/frame.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
frame(content)
Frame the given HTML content with the header and footer of the document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
content
|
str
|
HTML content to be framed within the HTML structure. |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Complete HTML document as a string with the provided content framed. |
Source code in frontend/frame.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
hamburger_menu()
Generate the HTML, CSS, and JavaScript for a hamburger menu.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Hamburger menu HTML, CSS, and JavaScript. |
Source code in frontend/frame.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
header()
Generate the header part of the HTML document.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Header part of an HTML document as a string. |
Source code in frontend/frame.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
html_table
Created on 2022-10-25
@author: wf
HtmlTables
Bases: WebScrape
HtmlTables extractor
Source code in frontend/html_table.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
__init__(url, debug=False, showHtml=False)
Constructor
url(str): the url to read the tables from debug(bool): if True switch on debugging showHtml(bool): if True show the HTML retrieved
Source code in frontend/html_table.py
15 16 17 18 19 20 21 22 23 24 |
|
get_tables(header_tag=None)
get all tables from my soup as a list of list of dicts
Parameters:
Name | Type | Description | Default |
---|---|---|---|
header_tag(str)
|
if set search the table name from the given header tag |
required |
Return
dict: the list of list of dicts for all tables
Source code in frontend/html_table.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
mediawiki_site
Created on 09.03.2025
@author: wf
MediaWikiSite
a MediaWikiSite and it's current state
Source code in frontend/mediawiki_site.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
__init__(wiki_user, row_index=0, debug=False, show_html=False)
constructor
Source code in frontend/mediawiki_site.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
check_version()
Check the MediaWiki version of the site.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The MediaWiki version string, or an error message if the check fails. |
Source code in frontend/mediawiki_site.py
90 91 92 93 94 95 96 97 98 99 100 101 |
|
check_version_via_url()
Check the MediaWiki version of the site.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The MediaWiki version string, or an error message if the check fails. |
Source code in frontend/mediawiki_site.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
get_software_version_map(tables)
Extract software map from the Special:Version tables.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tables
|
Dict[str, List[Dict[str, Any]]]
|
Dictionary of tables with their headers as keys. |
required |
Returns:
Type | Description |
---|---|
Optional[Dict[str, Dict[str, Any]]]
|
Optional[Dict[str, Dict[str, Any]]]: A dictionary mapping software names to their details, or None if the "Installed software" table is not found. |
Source code in frontend/mediawiki_site.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
servers_view
Created on 2025-07-23
@author: wf
ServerView
Bases: NodeView
A class responsible for displaying details of a Server
Source code in frontend/servers_view.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
probe()
async
Probe remote server and update display.
Source code in frontend/servers_view.py
62 63 64 65 66 67 68 69 |
|
setup_ui()
Setup UI with code display.
Source code in frontend/servers_view.py
48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
ServersView
Display servers
Source code in frontend/servers_view.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
add_to_graph(servers, graph, with_progress)
classmethod
add my serves to the graph
Source code in frontend/servers_view.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
version
Created on 2022-12-03
@author: wf
Version
dataclass
Bases: object
Version handling for pyWikiCMS
Source code in frontend/version.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
webscrape
Created on 2020-08-20
@author: wf
WebScrape
Bases: object
WebScraper
Source code in frontend/webscrape.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
__init__(debug=False, showHtml=False)
Constructor
Source code in frontend/webscrape.py
17 18 19 20 21 22 23 24 |
|
getSoup(url, showHtml)
get the beautiful Soup parser
Parameters:
Name | Type | Description | Default |
---|---|---|---|
showHtml(bool)
|
True if the html code should be pretty printed and shown |
required |
Source code in frontend/webscrape.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
printPrettyHtml(soup)
print the prettified html for the given soup
Parameters:
Name | Type | Description | Default |
---|---|---|---|
soup(BeuatifulSoup)
|
the parsed html to print |
required |
Source code in frontend/webscrape.py
41 42 43 44 45 46 47 48 49 |
|
webserver
Created on 2020-12-30
@author: wf
CmsSolution
Bases: GraphNavigatorSolution
Content management solution
Source code in frontend/webserver.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
|
__init__(webserver, client)
Initialize the solution
Calls the constructor of the base solution Args: webserver (Cms WebServer): The webserver instance associated with this context. client (Client): The client instance this context is associated with.
Source code in frontend/webserver.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
configure_menu()
configure my menu
Source code in frontend/webserver.py
160 161 162 163 164 165 166 167 168 169 170 171 |
|
home()
async
provide the main content page
Source code in frontend/webserver.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
show_nodes(node_type)
async
show nodes of the given type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_type(str)
|
the type of nodes to show |
required |
Source code in frontend/webserver.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
|
CmsWebServer
Bases: GraphNavigatorWebserver
WebServer class that manages the servers
Source code in frontend/webserver.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
__init__()
constructor
Source code in frontend/webserver.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
authenticated()
check authentication
Source code in frontend/webserver.py
49 50 51 52 53 54 55 56 |
|
configure_run()
configure command line specific details
Source code in frontend/webserver.py
126 127 128 129 130 131 132 133 134 135 136 |
|
render_path(frontend_name, page_path)
Renders the content for a specific path of the given frontend.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frontend_name
|
str
|
The name of the frontend to be rendered. |
required |
page_path
|
str
|
The specific path within the frontend to be rendered. |
required |
Returns:
Type | Description |
---|---|
An HTMLResponse containing the rendered page content or an error page if something goes wrong. |
Raises:
Type | Description |
---|---|
SomeException
|
If an error occurs during page content retrieval or rendering. |
Source code in frontend/webserver.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
wikicms
Created on 2020-07-27
@author: wf
WikiFrontend
Bases: object
Wiki Content Management System Frontend
Source code in frontend/wikicms.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
|
__init__(frontend, parser='lxml', proxy_prefixes=['/images/', '/videos'], debug=False, filterKeys=None)
Constructor Args: frontend(FrontendSite): the frontend parser(str): the beautiful soup parser to use e.g. html.parser proxy_prefixes(list): the list of prefixes that need direct proxy access debug: (bool): True if debugging should be on filterKeys: (list): a list of keys for filters to be applied e.g. editsection
Source code in frontend/wikicms.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
checkPath(pagePath)
check the given pathPath
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pagePath
|
str
|
the page Path to check |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
None or an error message with the illegal chars being used |
Source code in frontend/wikicms.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
extract_site_and_path(path)
staticmethod
Splits the given path into the site component and the remaining path.
This static method assumes that the 'site' is the first element of the path when split by "/", and the 'path' is the rest of the string after the site.
Parameters: path (str): The complete path to split.
tuple: A tuple where the first element is the site and the second element is the subsequent path.
Source code in frontend/wikicms.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
filter(html)
filter the given html
Source code in frontend/wikicms.py
201 202 203 204 205 |
|
fixHtml(soup)
fix the HTML in the given soup
Parameters:
Name | Type | Description | Default |
---|---|---|---|
soup(BeautifulSoup)
|
the html parser |
required |
Source code in frontend/wikicms.py
244 245 246 247 248 249 250 251 252 253 254 255 |
|
fixNode(node, attribute, prefix, delim=None)
fix the given node
node (BeautifulSoup): the node attribute (str): the name of the attribute e.g. "href", "src" prefix (str): the prefix to replace e.g. "/", "/images", "/thumbs" delim (str): if not None the delimiter for multiple values
Source code in frontend/wikicms.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
|
fix_images_and_videos(soup)
fix image and video entries in the source code
Source code in frontend/wikicms.py
233 234 235 236 237 238 239 240 241 242 |
|
getContent(pagePath)
get the content for the given pagePath Args: pagePath(str): the pagePath whatToFilter(list): list of filter keys Returns: str: the HTML content for the given path
Source code in frontend/wikicms.py
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
|
get_cms_pages()
get the Content Management elements for this site
Source code in frontend/wikicms.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
get_frame(page_title)
get the frame property for the given page_title
Source code in frontend/wikicms.py
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
get_path_response(path)
get the repsonse for the the given path
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path(str)
|
the path to render the content for |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
str
|
a FastAPI response |
Source code in frontend/wikicms.py
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
|
log(msg)
log the given message if debugging is true
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg
|
str
|
the message to log |
required |
Source code in frontend/wikicms.py
59 60 61 62 63 64 65 66 67 |
|
needsProxy(path)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
the path to check |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if this path needs to be proxied |
Source code in frontend/wikicms.py
169 170 171 172 173 174 175 176 177 178 179 180 |
|
open()
open the frontend
Source code in frontend/wikicms.py
98 99 100 101 102 103 104 105 106 107 108 109 |
|
proxy(path)
Proxy a request. See https://stackoverflow.com/a/50231825/1497139
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
the path to proxy |
required |
Returns:
Type | Description |
---|---|
str
|
the proxied result as a string |
Source code in frontend/wikicms.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
toReveal(html)
convert the given html to reveal see https://revealjs.com/
Source code in frontend/wikicms.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
|
unwrap(soup)
unwrap the soup
Source code in frontend/wikicms.py
257 258 259 260 261 262 263 264 265 266 267 268 269 |
|
wikiPage(pagePath)
Get the wiki page for the given page path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pagePath
|
str
|
The path of the page. |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The title of the page. |
Source code in frontend/wikicms.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
wrapWithReveal(html)
wrap html content with reveal.js structure and dependencies
Source code in frontend/wikicms.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
|
WikiFrontends
wiki frontends
Source code in frontend/wikicms.py
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
|
__init__(servers)
constructor
Source code in frontend/wikicms.py
428 429 430 431 432 433 |
|
enableSites(siteNames)
enable the sites given in the sites list Args: siteNames(list): a list of strings with wikiIds to be enabled
Source code in frontend/wikicms.py
435 436 437 438 439 440 441 442 443 444 |
|
get_frontend(name)
Get WikiFrontend from cache or create new one
Source code in frontend/wikicms.py
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
|
wikigrid
Created on 2022-12-03
@author: wf
WikiCheck
Check to be performed on a Mediawiki.
Source code in frontend/wikigrid.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
as_checkbox()
Return a checkbox representation of the instance.
Source code in frontend/wikigrid.py
32 33 34 35 36 37 |
|
WikiGrid
A grid of Wikis.
Source code in frontend/wikigrid.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
|
add_checkboxes()
Add check boxes.
Source code in frontend/wikigrid.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
check_backup(wiki_state)
Check the backup status for a specific WikiUser.
Source code in frontend/wikigrid.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
|
check_pages(wiki_state)
Try login for wiki user and report success or failure.
Source code in frontend/wikigrid.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
|
check_wiki_version(wiki_state)
Check the MediaWiki version for a specific WikiState.
Source code in frontend/wikigrid.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
|
perform_wiki_checks(_msg)
async
react on the button for check having been clicked
Source code in frontend/wikigrid.py
115 116 117 118 119 120 121 122 123 124 125 |
|
run_all_wiki_checks()
Process all selected wikis sequentially
Source code in frontend/wikigrid.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
run_wiki_check(wiki_state)
perform the selected wiki checks for a single wiki
Source code in frontend/wikigrid.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
setup()
setup the ui
Source code in frontend/wikigrid.py
64 65 66 67 68 69 70 71 72 73 74 |
|