mediawiki

mediawiki mathjax need to use escape $x$

我们两清 提交于 2020-07-06 12:27:53
问题 I am using MediaWiki with MathJax, because a lot of the pages have maths equations. But on some pages I also need to display the string $x$ as is. Is there any way to escape the $x$ so it doesn't invoke MathJax and display as an italic x? MathJax supports \$ to escape a $ within an expression, but that doesn't work with the initial $ (of course). 回答1: If you set processEscapes:true in the tex2jax section of your configuration, then you will be able to escape the initial dollar sign to allow

Parse birth and death dates from Wikipedia?

丶灬走出姿态 提交于 2020-06-09 11:29:12
问题 I'm trying to write a python program that can search wikipedia for the birth and death dates for people. For example, Albert Einstein was born: 14 March 1879; died: 18 April 1955. I started with Fetch a Wikipedia article with Python import urllib2 opener = urllib2.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] infile = opener.open('http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&rvsection=0&titles=Albert_Einstein&format=xml') page2 = infile

How to obtain a list of titles of all Wikipedia articles

元气小坏坏 提交于 2020-05-09 19:31:56
问题 I'd like to obtain a list of all the titles of all Wikipedia articles. I know there are two possible ways to get content from a Wikimedia powered wiki. One would be the API and the other one would be a database dump. I'd prefer not to download the wiki dump. First, it's huge, and second, I'm not really experienced with querying databases. The problem with the API on the other hand is that I couldn't figure out a way to only retrieve a list of the article titles and even if it would need > 4

How to obtain a list of titles of all Wikipedia articles

爱⌒轻易说出口 提交于 2020-05-09 19:31:12
问题 I'd like to obtain a list of all the titles of all Wikipedia articles. I know there are two possible ways to get content from a Wikimedia powered wiki. One would be the API and the other one would be a database dump. I'd prefer not to download the wiki dump. First, it's huge, and second, I'm not really experienced with querying databases. The problem with the API on the other hand is that I couldn't figure out a way to only retrieve a list of the article titles and even if it would need > 4

我只是个1x程序员,这是我五年总结出的经验法则

蹲街弑〆低调 提交于 2020-05-06 13:31:29
云栖号资讯:【 点击查看更多行业资讯 】 在这里您可以找到不同行业的第一手的上云资讯,还在等什么,快来! 作为一名 1x 开发人员,我在亚马逊五年的工作中总结了 20 条经验法则,希望能够在有限的自由时间内自我提升为 1.1X 开发人员。这些经验法则涉及生产力和学习、编程语言、技术、测试、DevOps、安全、设计和项目管理等领域。希望对大家有所启发。 序 言 我不是一个10x 开发人员。自从有了拨号上网以后,我就没有再建过网站。我在大学毕业几年之后才开始学习编程,因为我在政府和政治领域的职业生涯已经走到了瓶颈。 我写了五年代码了,这段时间都在亚马逊。在这期间,我还在养育三个孩子,我刚开始工作时,他们分别是 0 岁、0 岁和 2 岁。 所以我不是那种在晚上和周末还在努力加班的人。我很顾家。 大约一年前,我做了自己的第一个开源项目。这是我的第一个副业项目,它是一个会议网站。 我从来没有系统地从头到尾读过一本关于软件工程的书。 总之,我是一个 1x 开发人员。我为了体面的生活付出了足够的努力。我没有太多有普遍价值的东西要说,也没有太多时间去提升。 作为一个 1x 开发人员,我使用的是大量的传统智慧。 关于软件工程,我没有太多有趣或新鲜的东西可说。 总的来说,我还没有找到方法去从工作中抽出大量时间,或者去做一些更大的副业项目,或者去大量地阅读,又或者是去取得巨大的成就。我只是能抽点小空

How to get page id from wikipedia page title

这一生的挚爱 提交于 2020-03-23 13:03:20
问题 I am trying to find the wiki id of list of pages from wikipedia. So, the format is: input: list of wikipedia page titles output: list of wikipedia page ids. So far, I've gone through Mediawiki API to understand how to proceed, but couldn't find a correct way to implement the function. Can anyone suggest how to get the list of page ids? 回答1: Query basic page information: import requests page_titles = ['A', 'B', 'C', 'D'] url = ( 'https://en.wikipedia.org/w/api.php' '?action=query' '&prop=info'

How to get wiki template's content?

倾然丶 夕夏残阳落幕 提交于 2020-03-18 12:50:26
问题 Does anybody know how to get access to the template's body inside the page? I'm familiar with the API that returns the list of ALL templates that exist on the page, but how I can get access to the template's body? Is there any API for this? For now I see only one possible way... parse it manually. Am I wrong? 回答1: You can use the expandtemplates API call, or the rvexpandtemplates parameter for the revisions API call. 回答2: This is an old question, but it helped me figure out how to fetch a

LDAP on local domain with Mediawiki

对着背影说爱祢 提交于 2020-02-28 23:50:45
问题 Just got my MediaWiki running on a local domain (running as container on Synology nas). Now i want to configure so only domain users can access the Wiki and are automatically logged in. This is for the sole purpose of tracking user name with page edits. My local domain is abc.local and my domain controller is Windows Server 2008 R2. I've done the following: 1) Installed extensions LDAPProvider , LDAPAuthentication2 , and PluggableAuth . 2) Added the following to the bottom of my LocalSettings

关于MediaWiki

。_饼干妹妹 提交于 2020-02-27 11:47:50
安装步骤: docker pull mediawiki docker run -itd -p 5002:80 --volume /host_path:/var/www/html/images --name mediawiki mediawiki #宿主机设置nginx反向代理,在/etc/nginx/conf.d/目录下,创建wiki.conf upstream wiki_docker { server wiki.domain.com:5002; } server { listen 80; server_name wiki.domain.com; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://wiki_docker; } } 浏览器访问http://wiki.domain.com,根据安装向导进行设置,此时需要提供数据库服务器地址,数据库名,数据库用户名和密码。设置完成后,不要管理浏览器。 完成设置后,会提示下载LocalSettings.php,将此文件复制到容器内的/var/www/html/目录下