Giter VIP home page Giter VIP logo

allup-satwiki's Introduction

I'm @yusancky , a senior high school student from Guangzhou, Guangdong, China.

allup-satwiki's People

Contributors

dependabot[bot] avatar yusancky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

bcfeather

allup-satwiki's Issues

MW parser function-related code needs to be refactored

As you can see, some of the code for the Mediawiki parser is pretty bad.

return f"{{{{#switch:{{{{{{id|}}}}}}|1={{{{#switch:{{{{{{section|}}}}}}|km={data[1]['km']}|au={data[1]['au']}|kms={data[1]['kms']}|aus={data[1]['aus']}|speed={data[1]['speed']}|lt={data[1]['lt']}|#default=请输入正确的选项名!}}}}|2={{{{#switch:{{{{{{section|}}}}}}|km={data[2]['km']}|au={data[2]['au']}|kms={data[2]['kms']}|aus={data[2]['aus']}|speed={data[2]['speed']}|lt={data[2]['lt']}|#default=请输入正确的选项名!}}}}|#default=请输入正确的编号!}}}}"

return f"{{{{#switch:{{{{{{section|}}}}}}|Inclination={data['Inclination']}|Eccentricity={data['Eccentricity']}|RA ascending node={data['RA ascending node']}|Argument perihelion={data['Argument perihelion']}|Mean anomaly={data['Mean anomaly']}|Orbital period={data['Orbital period']}|Epoch of osculation={data['Epoch of osculation']}|#default=请输入正确的选项名!}}}}"

AllUp_content = f"<includeonly>{{{{#switch:{{{{{{1|}}}}}}|t={make('t')}|1={make(1)}|2={make(2)}|#default={make('default')}}}}}</includeonly><noinclude>[[Category:模板]]{{{{documentation}}}}</noinclude>"

Parser functions related to wikitext have two significant things in common:

  • The syntax of wikitext is the same.
  • The currently used form is extremely unreadable and not easy to maintain.

Obviously, we can generate wikitext with a Python function.

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.