GithubHelp home page GithubHelp logo

pandada8 / araneae Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 300 KB

A wiki bot finding untranslated information, written in python3, https://bbs.archlinuxcn.org/viewtopic.php?id=3406

Python 85.50% HTML 14.50%

araneae's People

Contributors

pandada8 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

araneae's Issues

touched好像不准确?

Uploading 选区_094.png…

通过这个API调用
api
得到的结果是

{
    "warnings": {
        "info": {
            "*": "The intoken parameter has been deprecated.\nAction 'edit' is not allowed for the current user"
        }
    },
    "query": {
        "normalized": [
            {
                "from": "Main_page_(\u7b80\u4f53\u4e2d\u6587)",
                "to": "Main page (\u7b80\u4f53\u4e2d\u6587)"
            }
        ],
        "pages": {
            "1513": {
                "pageid": 1513,
                "ns": 0,
                "title": "Main page (\u7b80\u4f53\u4e2d\u6587)",
                "contentmodel": "wikitext",
                "pagelanguage": "en",
                "touched": "2015-09-02T09:54:02Z",
                "lastrevid": 391805,
                "length": 3721,
                "starttimestamp": "2015-09-12T03:25:48Z",
                "revisions": [
                    {
                        "timestamp": "2015-08-19T17:29:43Z"
                    }
                ]
            }
        }
    }
}

可以看到touched和revisions里的timstamp不同,revisions里的timestamp跟页面上的last modified time是一样的。而touched比较新。
关于touched:https://www.mediawiki.org/wiki/Manual:Page_table#page_touched
关于revisions里的timestamp:https://www.mediawiki.org/wiki/API:Edit

setup.py

不然用户还得自己研究怎么安装、怎么用。

A more precise way to find the translated version

currently we judge by title, if a page title ends with (简体中文), then it's translated version of some page.
the arch wiki don't use the page's lang attr, so all page are called "en" version

Filter out the out-of-date translated version

I don't want to fetch every post, so let's make it simple

  1. if a page have a specific language version, and the translated version is created before the english version, mark it out-of-date
  2. find all the pages have out-of-date template

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.