How can I export a Module from Wikipedia to my self hosted MediaWiki? - mediawiki

I have a template
http://wordpress-251650-782015.cloudwaysapps.com/index.php?title=Template:Cita_conferenza
Which invokes a LUA module:
http://wordpress-251650-782015.cloudwaysapps.com/wiki/Modulo:Citazione
I have found informations on that module here, but it's not specified how to import it on my wiki.. any hint?
https://it.wikipedia.org/wiki/Modulo:Citazione

Go to Special:Export and export Modulo:Citazione with the "Includi i template" option. Then go to Special:Import of your wiki and import the XML file saved on export.
Also, you need to activate the extension Parser functions to enable the parser functions {{#if:}}, {{ifeq:}} and {{#switch:}}.

Related

How do you export a specific source file in webpack?

I have a file called src/services/data.json which I use to populate some data for one of my services. I use the following
import embeddedData from "./data.json";
to import the file. When I generate the distribution, as expected the contents are merged in so they're not in the resulting dist folder
Is there something I can do to the webpack configuration so it will export JSON data files? (I'm using vue with TypeScript for my framework)
I would go with Dynamic Imports. Webpack will create separate files for such imports by default. In runtime those files are asynchronously loaded. Webpack
transforms import() calls to Promises so you can use await/async as well.

Run action from library

I have an npm library, which contains an NGRX Action with an effect. How do I call it in my own application? Currently nothing happens, once I use store.dispatch().
Or maybe how should the action be exported, so I can access it with my store?
Consider, Exporting all the actions from the library in to index.ts file of library module. Hence when importing your library via app.module of your app, you will have access to actions files of library in your components.
Make sure you import the library module in your .module.ts file.

Plone/SQLAlchemy(?) - How can I import a python package (i.e. sqlalchemy) in a module in a subpackage?

I am trying to import sqlalchemy in a module in a subpackage.
Here is my folder layout
PloneInstance
my.package
my
package
subpackage
In the buildout.cfg file of the root folder, I add "sqlalchemy" to the eggs.
In my.package, in configure.zcml, I add:
In the subpackage, I have a blank __init__.py file, a configure.zcml file, and a file called mymodule.py
In mymodule.py I have a line for importing sqlalchemy
import sqlalchemy
Unfortunately, I am getting an error when I try to run an instance:
ImportError: No module named sqlalchemy
I'm assuming I am missing a step. How do I properly import python packages?
Thank you in advance. I apologize if my terminology is off.
Edit:
The module in question I am importing from turned out to be zope.sqlalchemy.
I accidentally overlooked this because prior to moving files to a subpackage, the import statement for zope.sqlalchemy was working without adding zope.sqlalchemy to the eggs section of the buildout.
Look in the setup.py file at the top directory of your package. You'll find a section like:
install_requires=['setuptools',
# -*- Extra requirements: -*-
],
In place of the "Extra requirements' comment, put a comma-separated list of strings specifying your package's requirements. You may even specify versions.
Do not add standard Plone packages to the list. They're taken for granted.
Re-run buildout after specifying your requirements. The result is that the new install requires will be added to your Python environment when you start Plone.

How to import templates with sub-templates in a wiki

When i try to copy a template from wikipedia to my own wiki, there is a lot of sub-templates associated with it. Do i have to copy paste each sub-templates associated with it to my own wiki which is using mediawiki?
go to https://en.wikipedia.org/wiki/Special:Export and write your template name. you can export anything (article, template, categories, modules, etc.). after download the file your can import it to your wiki via https://yourSiteName.com/wiki/Special:Import.

Get HTML file produced by JavaDocs

I understand that Javadoc is a documentation generator from Sun Microsystems for generating API documentation in HTML format from Java source code.
I infer that the documentation is stored onto an HTML file.
Is there a way I can access it?
If yes where is it stored?
The word Javadoc can refer to
special comments in Java source files (preceding a declaration, and of the form /** ... */)
a program which converts these comments (as well as the declarations themselves) to readable output
the output itself, usually in HTML form.
The Javadoc program is contained in Sun's (or now Oracle's) Java Development Kit (JDK).
If you have installed a JDK (which you should if you do Java development), you can call it on the command line, passing it the package names to document, or some source file names. You should also indicate the output directory, using the -d option.
I'm assuming the following directory (and package) structure in my example below:
current directory
source
de
dclj
paul
examples
HelloWorld.java [containing package de.dclj.paul.examples; and public class HelloWorld { ... }]
docs
Then you use the following command line:
javadoc -sourcpath source -d docs de.dclj.paul.examples
It will then create a the documentation in the docs directory, with an index.html which you can open in your web browser, and other files reachable from it.
For more details have a look at the documentation linked above. For an example output, have a look at the Java Standard API Javadoc.
If you are using an IDE, you likely have a generate Javadoc button there, and the IDE might even show the formatted output of documentation of single classes or methods on the fly.