1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00

Res: Add resources from xowa_app_windows_64_v4.5.26.1810

This commit is contained in:
gnosygnu 2018-11-02 09:58:55 -04:00
parent a672fd8340
commit 5721913241
6057 changed files with 1156950 additions and 0 deletions

View File

@ -0,0 +1,369 @@
OFL FAQ - Frequently Asked Questions about the SIL Open Font License (OFL)
Version 1.1-update2 - 23 August 2010
(See http://scripts.sil.org/OFL for updates)
CONTENTS OF THIS FAQ
1 USING AND DISTRIBUTING FONTS LICENSED UNDER THE OFL
2 USING OFL FONTS FOR WEB PAGES AND ONLINE WEBFONT SERVICES
3 MODIFYING OFL-LICENSED FONTS
4 LICENSING YOUR ORIGINAL FONTS UNDER THE OFL
5 CHOOSING RESERVED FONT NAMES
6 ABOUT THE FONTLOG
7 MAKING CONTRIBUTIONS TO OFL PROJECTS
8 ABOUT THE LICENSE ITSELF
9 ABOUT SIL INTERNATIONAL
APPENDIX A - FONTLOG EXAMPLE
1 USING AND DISTRIBUTING FONTS LICENSED UNDER THE OFL
1.1 Can I use the fonts for a book or other print publication?
Yes. You can mention the font and author in the book's colophon if you wish, but that is not required.
1.2 Can the fonts be included with Free/Libre and Open Source Software collections such as GNU/Linux and BSD distributions?
Yes! Fonts licensed under the OFL can be freely included alongside other software under FLOSS (Free/Libre and Open Source Software) licenses. Since fonts are typically aggregated with, not merged into, existing software, there is little need to be concerned about incompatibility with existing software licenses. You may also repackage the fonts and the accompanying components in a .rpm or .deb package and include them in distribution CD/DVDs and online repositories. (Also see section 5.9 about rebuilding from source.)
1.3 I want to distribute the fonts with my program. Does this mean my program also has to be Free/Libre and Open Source Software?
No. Only the portions based on the Font Software are required to be released under the OFL. The intent of the license is to allow aggregation or bundling with software under restricted licensing as well.
1.4 Can I sell a software package that includes these fonts?
Yes, you can do this with both the Original Version and a Modified Version of the fonts. Examples of bundling made possible by the OFL would include: word processors, design and publishing applications, training and educational software, games and entertainment software, mobile device applications, etc.
1.5 Can I include the fonts on a CD of freeware or commercial fonts?
Yes, as long some other font or software is also on the disk, so the OFL font is not sold by itself.
1.6 Why won't the OFL let me sell the fonts alone?
The intent is to keep people from making money by simply redistributing the fonts. The only people who ought to profit directly from the fonts should be the original authors, and those authors have kindly given up potential direct income to distribute their fonts under the OFL. Please honour and respect their contribution!
1.7 What about sharing OFL fonts with friends on a CD, DVD or USB stick?
You are very welcome to share open fonts with friends, family and colleagues through removable media. Just remember to include the full font package, including any copyright notices and licensing information as available in OFL.txt. In the case where you sell the font, it has to come bundled with software.
1.8 Can I host the fonts on a web site for others to use?
Yes, as long as you make the full font package available. In most cases it may be best to point users to the main site that distributes the Original Version so they always get the most recent stable and complete version. See also discussion of webfonts in Section 2.
1.9 Can I host the fonts on a server for use over our internal network?
Yes. If the fonts are transferred from the server to the client computer by means that allow them to be used even if the computer is no longer attached to the network, the full package (copyright notices, licensing information, etc.) should be included.
1.10 Does the full OFL license text always need to accompany the font?
The only situation in which an OFL font can be distributed without the text of the OFL (either in a separate file or in font metadata), is when a font is embedded in a document or bundled within a program. In the case of metadata included within a font, it is legally sufficient to include only a link to the text of the OFL on http://scripts.sil.org/OFL, but we strongly recommend against this. Most modern font formats include metadata fields that will accept the full OFL text, and full inclusion increases the likelihood that users will understand and properly apply the license.
1.11 What do you mean by 'embedding'? How does that differ from other means of distribution?
By 'embedding' we mean inclusion of the font in a document or file in a way that makes extraction (and redistribution) difficult or clearly discouraged. In many cases the names of embedded fonts might also not be obvious to those reading the document, the font data format might be altered, and only a subset of the font - only the glyphs required for the text - might be included. Any other means of delivering a font to another person is considered 'distribution', and needs to be accompanied by any copyright notices and licensing information available in OFL.txt.
1.12 So can I embed OFL fonts in my document?
Yes, either in full or a subset. The restrictions regarding font modification and redistribution do not apply, as the font is not intended for use outside the document.
1.13 Does embedding alter the license of the document itself?
No. Referencing or embedding an OFL font in any document does not change the license of the document itself. The requirement for fonts to remain under the OFL does not apply to any document created using the fonts and their derivatives. Similarly, creating any kind of graphic using a font under OFL does not make the resulting artwork subject to the OFL.
1.14 If OFL fonts are extracted from a document in which they are embedded (such as a PDF file), what can be done with them? Is this a risk to author(s)?
The few utilities that can extract fonts embedded in a PDF will typically output limited amounts of outlines - not a complete font. To create a working font from this method is much more difficult and time consuming than finding the source of the original OFL font. So there is little chance that an OFL font would be extracted and redistributed inappropriately through this method. Even so, copyright laws address any misrepresentation of authorship. All Font Software released under the OFL and marked as such by the author(s) is intended to remain under this license regardless of the distribution method, and cannot be redistributed under any other license. We strongly discourage any font extraction - we recommend directly using the font sources instead - but if you extract font outlines from a document, please be considerate: use your common sense and respect the work of the author(s) and the licensing model.
1.15 What about distributing fonts with a document? Within a compressed folder structure? Is it distribution, bundling or embedding?
Certain document formats may allow the inclusion of an unmodified font within their file structure which consists of a compressed folder containing the various resources forming the document (such as pictures and thumbnails). Including fonts within such a structure is understood as being different from embedding but rather similar to bundling (or mere aggregation) which the license explicitly allows. In this case the font is conveyed unchanged whereas embedding a font usually transforms it from the original format. The OFL does not allow anyone to extract the font from such a structure to then redistribute it under another license. The explicit permission to redistribute and embed does not cancel the requirement for the Font Software to remain under the license chosen by its author(s).
1.16 What about ebooks shipping with open fonts?
The requirements differ depending on whether the fonts are linked, embedded or distributed (bundled or aggregated). Some ebook formats use web technologies to do font linking via @font-face, others are designed for font embedding, some use fonts distributed with the document or reading software, and a few rely solely on the fonts already present on the target system. The license requirements depend on the type of inclusion as discussed in 1.15.
1.17 Can Font Software released under the OFL be subject to URL-based access restrictions methods or DRM (Digital Rights Management) mechanisms?
Yes, but these issues are out-of-scope for the OFL. The license itself neither encourages their use nor prohibits them since such mechanisms are not implemented in the components of the Font Software but through external software. Such restrictions are put in place for many different purposes corresponding to various usage scenarios. One common example is to limit potentially dangerous cross-site scripting attacks. However, in the spirit of libre/open fonts and unrestricted writing systems, we strongly encourage open sharing and reuse of OFL fonts, and the establishment of an environment where such restrictions are unnecessary. Note that whether you wish to use such mechanisms or you prefer not to, you must still abide by the rules set forth by the OFL when using fonts released by their authors under this license. Derivative fonts must be licensed under the OFL, even if they are part of a service for which you charge fees and/or for which access to source code is restricted. You may not sell the fonts on their own - they must be part of a larger software package, bundle or subscription plan. For example, even if the OFL font is distributed in a software package or via an online service using a DRM mechanism, the user would still have the right to extract that font, use, study, modify and redistribute it under the OFL.
1.18 I've come across a font released under the OFL. How can I easily get more information about the Original Version? How can I know where it stands compared to the Original Version or other Modified Versions?
Consult the copyright statement(s) in the license for ways to contact the original authors. Consult the FONTLOG for information on how the font differs from the Original Version, and get in touch with the various contributors via the information in the acknowledgement section. Please consider using the Original Versions of the fonts whenever possible.
1.19 What do you mean in condition 4? Can you provide examples of abusive promotion / endorsement / advertisement vs. normal acknowledgement?
The intent is that the goodwill and reputation of the author(s) should not be used in a way that makes it sound like the original author(s) endorse or approve of a specific Modified Version or software bundle. For example, it would not be right to advertise a word processor by naming the author(s) in a listing of software features, or to promote a Modified Version on a web site by saying "designed by ...". However, it would be appropriate to acknowledge the author(s) if your software package has a list of people who deserve thanks. We realize that this can seem to be a grey area, but the standard used to judge an acknowledgement is that if the acknowledgement benefits the author(s) it is allowed, but if it primarily benefits other parties, or could reflect poorly on the author(s), then it is not.
2 USING OFL FONTS FOR WEBPAGES AND ONLINE WEBFONT SERVICES
2.1 Can I make webpages using these fonts?
Yes! Go ahead! Using CSS (Cascading Style Sheets) is recommended. Your three best options:
- referring directly in your stylesheet to open fonts which may be available on the user's system
- providing links to download the full package of the font - either from your own website or from elsewhere - so users can install it themselves
- using @font-face to distribute the font directly to browsers. This is recommended and explicitly allowed by the licensing model because it is distribution. The font file itself is distributed with other components of the webpage. It is not embedded in the webpage but referenced through a web address which will cause the browser to retrieve and use the corresponding font to render the webpage (see 1.11 and 1.15 for details related to embedding fonts into documents). As you take advantage of the @font-face cross-platform standard, be aware that webfonts are often tuned for a web environment and not intended for installation and use outside a browser. The reasons in favour of using webfonts are to allow design of dynamic text elements instead of static graphics, to make it easier for content to be localized and translated, indexed and searched, and all this with cross-platform open standards without depending on restricted extensions or plugins. You should check the CSS cascade (the order in which fonts are being called or delivered to your users) when testing.
2.2 Can I make and use WOFF (Web Open Font Format) versions of OFL fonts?
Yes, but you need to be careful. A change in font format normally is considered modification, and Reserved Font Names (RFNs) cannot be used. Because of the design of the WOFF format, however, it is possible to create a WOFF version that is not considered modification, and so would not require a name change. You are allowed to create, use and distribute a WOFF version of an OFL font without changing the font name, but only if:
- the original font data remains unchanged except for WOFF compression, and
- WOFF-specific metadata is either omitted altogether or present and includes, unaltered, the contents of all equivalent metadata in the original font.
If the original font data or metadata is changed, or the WOFF-specific metadata is incomplete, the font must be considered a Modified Version, the OFL restrictions would apply and the name of the font must be changed: any RFNs cannot be used and copyright notices and licensing information must be included and cannot be deleted or modified. You must come up with a unique name - we recommend one corresponding to your domain or your particular web application. Be aware that only the original author(s) can use RFNs. This is to prevent collisions between a derivative tuned to your audience and the original upstream version and so to reduce confusion.
Please note that most WOFF conversion tools and online services do not meet the two requirements listed above, and so their output must be considered a Modified Version. So be very careful and check to be sure that the tool or service you're using is compressing unchanged data and completely and accurately reflecting the original font metadata.
2.3 What about other webfont formats such as EOT/EOTLite/CWT/etc.?
In most cases these formats alter the original font data more than WOFF, and do not completely support appropriate metadata, so their use must be considered modification and RFNs may not be used.
2.4 Can I make OFL fonts available through webfont online services?
Yes, you are welcome to include OFL fonts in online webfont services as long as you properly meet all the conditions of the license. The origin and open status of the font should be clear among the other fonts you are hosting. Authorship, copyright notices and license information must be sufficiently visible to your users or subscribers so they know where the font comes from and the rights granted by the author(s). Make sure the font file contains the needed copyright notice(s) and licensing information in its metadata. Please double-check the accuracy of every field to prevent contradictory information. Other font formats, including EOT/EOTLite/CWT and superior alternatives like WOFF, already provide fields for this information. Remember that if you modify the font within your library or convert it to another format for any reason the OFL restrictions apply and you need to change the names accordingly. Please respect the author's wishes as expressed in the OFL and do not misrepresent original designers and their work. Don't lump quality open fonts together with dubious freeware or public domain fonts. Consider how you can best work with the original designers and foundries, support their efforts and generate goodwill that will benefit your service. (See 1.17 for details related to URL-based access restrictions methods or DRM mechanisms).
2.5 Can I make and publish CMS themes or templates that use OFL fonts? Can I include the fonts themselves in the themes or templates? Can I sell the whole package?
Yes, you are very welcome to integrate open fonts into themes and templates for your preferred CMS and make them more widely available. Be aware that you can only sell the fonts and your CMS add-on as part of a software bundle. (See 1.4 for details and examples about selling bundles).
2.6 Some webfont formats and services provide ways of "optimising" the font for a particular website or web application; is that allowed?
Yes, it is permitted, but remember that these optimised versions are Modified Versions and so must follow OFL requirements like appropriate renaming. Also you need to bear in mind the other important parameters beyond compression, speed and responsiveness: you need to consider the audience of your particular website or web application, as choosing some optimisation parameters may turn out to be less than ideal for them. Subsetting by removing certain glyphs or features may seriously limit functionality of the font in various languages used by your users. It may also introduce degradation of quality in the rendering or specific bugs on the various platforms compared to the original font. In other words, remember that one person's optimised font may be another person's missing feature. Various advanced typographic features are also available through CSS and may provide the desired effects without the need to modify the font.
3 MODIFYING OFL-LICENSED FONTS
3.1 Can I change the fonts? Are there any limitations to what things I can and cannot change?
You are allowed to change anything, as long as such changes do not violate the terms of the license. In other words, you are not allowed to remove the copyright statement(s) from the font, but you could put additional information into it that covers your contribution.
3.2 I have a font that needs a few extra glyphs - can I take them from an OFL licensed font and copy them into mine?
Yes, but if you distribute that font to others it must be under the OFL, and include the information mentioned in condition 2 of the license.
3.3 Can I charge people for my additional work? In other words, if I add a bunch of special glyphs and/or OpenType/Graphite code, can I sell the enhanced font?
Not by itself. Derivative fonts must be released under the OFL and cannot be sold by themselves. It is permitted, however, to include them in a larger software package (such as text editors, office suites or operating systems), even if the larger package is sold. In that case, you are strongly encouraged, but not required, to also make that derived font easily and freely available outside of the larger package.
3.4 Can I pay someone to enhance the fonts for my use and distribution?
Yes. This is a good way to fund the further development of the fonts. Keep in mind, however, that if the font is distributed to others it must be under the OFL. You won't be able to recover your investment by exclusively selling the font, but you will be making a valuable contribution to the community. Please remember how you have benefited from the contributions of others.
3.5 I need to make substantial revisions to the font to make it work with my program. It will be a lot of work, and a big investment, and I want to be sure that it can only be distributed with my program. Can I restrict its use?
No. If you redistribute a Modified Version of the font it must be under the OFL. You may not restrict it in any way beyond what the OFL permits and requires. This is intended to ensure that all released improvements to the fonts become available to everyone. But you will likely get an edge over competitors by being the first to distribute a bundle with the enhancements. Again, please remember how you have benefited from the contributions of others.
3.6 Do I have to make any derivative fonts (including extended source files, build scripts, documentation, etc.) publicly available?
No, but please consider sharing your improvements with others. You may find that you receive in return more than what you gave.
3.7 If a trademark is claimed in the OFL font, does that trademark need to remain in modified fonts?
Yes, any trademark notices must remain in any derivative fonts to respect trademark laws, but you may add any additional trademarks you claim, officially registered or not. For example if an OFL font called "Foo" contains a notice that "Foo is a trademark of Acme", then if you rename the font to "Bar" when creating a Modified Version, the new trademark notice could say "Foo is a trademark of Acme Inc. - Bar is a trademark of Roadrunner Technologies Ltd.". Trademarks work alongside the OFL and are not subject to the terms of the licensing agreement. Please refer to the appropriate trademark laws.
4 LICENSING YOUR ORIGINAL FONTS UNDER THE OFL
4.1 Can I use the SIL OFL for my own fonts?
Yes! We heartily encourage everyone to use the OFL to distribute their own original fonts. It is a carefully constructed license that allows great freedom along with enough artistic integrity protection for the work of the authors as well as clear rules for other contributors and those who redistribute the fonts. The licensing model is used successfully by various organisations, both for-profit and not-for-profit, to release fonts of varying levels of scope and complexity.
4.2 What do I have to do to apply the OFL to my font?
If you want to release your fonts under the OFL, we recommend you do the following:
4.2.1 Put your copyright and Reserved Font Names information at the beginning of the main OFL.txt file in place of the dedicated placeholders. Include this file in your release package.
4.2.2 Put your copyright and the OFL text with Reserved Font Names into your font files (the copyright and license fields). A link to the OFL text on the OFL web site is an acceptable (but not recommended) alternative. Also add this information to any other components (build scripts, glyph databases, documentation, test files, etc). Depending on the format of your fonts and sources, you can use template human-readable headers or machine-readable metadata.
4.2.3 Write an initial FONTLOG.txt for your font and include it in the release package.
4.2.4 Include the relevant practical documentation on the license by including the OFL-FAQ.txt in your package.
4.3 Will you make my font OFL for me?
We won't do the work for you. We can, however, try to answer your questions, unfortunately we do not have the resources to review and check your font packages for correct use of the OFL.
4.4 Will you distribute my OFL font for me?
No, although if the font is of sufficient quality and general interest we may include a link to it on our partial list of OFL fonts on the OFL web site. You may wish to consider other open font catalogs or hosting services, such as the Unifont Font Guide (http://unifont.org/fontguide), The League of Movable Type (http://theleagueofmovabletype.com), Kernest (http://kernest.com/) or the Open Font Library (http://openfontlibrary.org/), which despite the name has no direct relationship to the OFL or SIL. We do not endorse any particular catalog or hosting service - it is your responsibility to determine if the service is right for you.
4.5 Why should I use the OFL for my fonts?
- to meet needs for fonts that can be modified to support minority languages
- to provide a legal and clear way for people to respect your work but still use it (and reduce piracy)
- to involve others in your font project
- to enable your fonts to be expanded with new weights and improved writing system/language support
- to allow more technical font developers to add features to your design (such as OpenType and Graphite support)
- to renew the life of an old font lying on your hard drive with no business model
- to allow your font to be included in Libre Software operating systems like Ubuntu
- to give your font world status and wide, unrestricted distribution
- to educate students about quality typeface and font design
- to expand your test base and get more useful feedback
- to extend your reach to new markets when users see your metadata and go to your website
- to get your font more easily into one of the webfont online services
- to attract attention for your commercial fonts
- to make money through webfont services
- to make money by bundling fonts with applications
- to make money adjusting and extending existing open fonts
- to get a better chance that foundations/NGOs/charities/companies who commission fonts will pick you
- to be part of a sharing design and development community
- to give back and contribute to a growing body of font sources
5 CHOOSING RESERVED FONT NAMES
5.1 What are Reserved Font Names?
These are font names, or portions of font names, that the author has chosen to reserve for use only with the Original Version of the font, or for Modified Version(s) created by the original author.
5.2 Why can't I use the Reserved Font Names in my derivative font names? I'd like people to know where the design came from.
The best way to acknowledge the source of the design is to thank the original authors and any other contributors in the files that are distributed with your revised font (although no acknowledgement is required). The FONTLOG is a natural place to do this. Reserved Font Names ensure that the only fonts that have the original names are the unmodified Original Versions. This allows designers to maintain artistic integrity while allowing collaboration to happen. It eliminates potential confusion and name conflicts. When choosing a name, be creative and avoid names that reuse almost all the same letters in the same order or sound like the original. It will help everyone if Original Versions and Modified Versions can easily be distinguished from one another and from other derivatives. Any substitution and matching mechanism is outside the scope of the license.
5.3 What do you mean by "primary name as presented to the user"? Are you referring to the font menu name?
Yes, this applies to the font menu name and other mechanisms that specify a font in a document. It would be fine, however, to keep a text reference to the original fonts in the description field, in your modified source file or in documentation provided alongside your derivative as long as no one could be confused that your modified source is the original. But you cannot use the Reserved Font Names in any way to identify the font to the user (unless the Copyright Holder(s) allow(s) it through a separate agreement). Users who install derivatives (Modified Versions) on their systems should not see any of the original Reserved Font Names in their font menus, for example. Again, this is to ensure that users are not confused and do not mistake one font for another and so expect features only another derivative or the Original Version can actually offer.
5.4 Am I not allowed to use any part of the Reserved Font Names?
You may not use individual words from the Reserved Font Names, but you would be allowed to use parts of words, as long as you do not use any word from the Reserved Font Names entirely. We do not recommend using parts of words because of potential confusion, but it is allowed. For example, if "Foobar" was a Reserved Font Name, you would be allowed to use "Foo" or "bar", although we would not recommend it. Such an unfortunate choice would confuse the users of your fonts as well as make it harder for other designers to contribute.
5.5 So what should I, as an author, identify as Reserved Font Names?
Original authors are encouraged to name their fonts using clear, distinct names, and only declare the unique parts of the name as Reserved Font Names. For example, the author of a font called "Foobar Sans" would declare "Foobar" as a Reserved Font Name, but not "Sans", as that is a common typographical term, and may be a useful word to use in a derivative font name. Reserved Font Names should also be single words. A font called "Flowing River" should have Reserved Font Names "Flowing" and "River", not "Flowing River". You also need to be very careful about reserving font names which are already linked to trademarks (whether registered or not) which you do not own.
5.6 Do I, as an author, have to identify any Reserved Font Names?
No, but we strongly encourage you to do so. This is to avoid confusion between your work and Modified Versions.
5.7 Are any names (such as the main font name) reserved by default?
No. That is a change to the license as of version 1.1. If you want any names to be Reserved Font Names, they must be specified after the copyright statement(s).
5.8 Is there any situation in which I can use Reserved Font Names for a Modified Version?
The Copyright Holder(s) can give certain trusted parties the right to use any of the Reserved Font Names through separate written agreements. For example, even if "Foobar" is a RFN, you could write up an agreement to give company "XYZ" the right to distribute a modified version with a name that includes "Foobar". This allows for freedom without confusion.
5.9 Do font rebuilds require a name change? Do I have to change the name of the font when my packaging workflow includes a full rebuild from source?
Yes, all rebuilds which change the font data and the smart code are Modified Versions and the requirements of the OFL apply: you need to respect what the Author(s) have chosen in terms of Reserved Font Names. However if a package (or installer) is simply a wrapper or a compressed structure around the final font - leaving them intact on the inside - then no name change is required. Please get in touch with the author(s) and copyright holder(s) to inquire about the presence of font sources beyond the final font file(s) and the recommended build path. That build path may very well be non-trivial and hard to reproduce accurately by the maintainer. If a full font build path is made available by the upstream author(s) please be aware that any regressions and changes you may introduce when doing a rebuild for packaging purposes is your responsibility as a package maintainer since you are effectively creating a separate branch. You should make it very clear to your users that your rebuilt version is not the canonical one from upstream.
5.10 Can I add other Reserved Font Names when making a derivative font?
Yes. List your additional Reserved Font Names after your additional copyright statement, as indicated with example placeholders at the top of the OFL.txt file. Be sure you do not remove any exiting RFNs but only add your own.
6 ABOUT THE FONTLOG
6.1 What is this FONTLOG thing exactly?
It has three purposes: 1) to provide basic information on the font to users and other developers, 2) to document changes that have been made to the font or accompanying files, either by the original authors or others, and 3) to provide a place to acknowledge authors and other contributors. Please use it!
6.2 Is the FONTLOG required?
It is not a requirement of the license, but we strongly recommend you have one.
6.3 Am I required to update the FONTLOG when making Modified Versions?
No, but users, designers and other developers might get very frustrated with you if you don't. People need to know how derivative fonts differ from the original, and how to take advantage of the changes, or build on them. There are utilities that can help create and maintain a FONTLOG, such as the FONTLOG support in FontForge.
6.4 What should the FONTLOG look like?
It is typically a separate text file (FONTLOG.txt), but can take other formats. It commonly includes these four sections:
- brief header describing the FONTLOG itself and name of the font family
- Basic Font Information - description of the font family, purpose and breadth
- ChangeLog - chronological listing of changes
- Acknowledgements - list of authors and contributors with contact information
It could also include other sections, such as: where to find documentation, how to make contributions, information on contributing organizations, source code details, and a short design guide. See Appendix A for an example FONTLOG.
7 MAKING CONTRIBUTIONS TO OFL PROJECTS
7.1 Can I contribute work to OFL projects?
In many cases, yes. It is common for OFL fonts to be developed by a team of people who welcome contributions from the wider community. Contact the original authors for specific information on how to participate in their projects.
7.2 Why should I contribute my changes back to the original authors?
It would benefit many people if you contributed back in response to what you've received. Your contributions and improvements to the fonts and other components could be a tremendous help and would encourage others to contribute as well and 'give back'. You will then benefit from other people's contributions as well. Sometimes maintaining your own separate version takes more effort than merging back with the original. Be aware that any contributions, however, must be either your own original creation or work that you own, and you may be asked to affirm that clearly when you contribute.
7.3 I've made some very nice improvements to the font. Will you consider adopting them and putting them into future Original Versions?
Most authors would be very happy to receive such contributions. Keep in mind that it is unlikely that they would want to incorporate major changes that would require additional work on their end. Any contributions would likely need to be made for all the fonts in a family and match the overall design and style. Authors are encouraged to include a guide to the design with the fonts. It would also help to have contributions submitted as patches or clearly marked changes - the use of smart source revision control systems like subversion, svk, mercurial, git or bzr is a good idea. Please follow the recommendations given by the author(s) in terms of preferred source formats and configuration parameters for sending contributions. If this is not indicated in a FONTLOG or other documentation of the font, consider asking them directly. Examples of useful contributions are bug fixes, additional glyphs, stylistic alternates (and the smart font code to access them) or improved hinting. Keep in mind that some kinds of changes (esp. hinting) may be technically difficult to integrate.
7.4 How can I financially support the development of OFL fonts?
It is likely that most authors of OFL fonts would accept financial contributions - contact them for instructions on how to do this. Such contributions would support future development. You can also pay for others to enhance the fonts and contribute the results back to the original authors for inclusion in the Original Version.
8 ABOUT THE LICENSE ITSELF
8.1 I see that this is version 1.1 of the license. Will there be later changes?
Version 1.1 is the first minor revision of the OFL. We are confident that version 1.1 will meet most needs, but are open to future improvements. Any revisions would be for future font releases, and previously existing licenses would remain in effect. No retroactive changes are possible, although the Copyright Holder(s) can re-release the font under a revised OFL. All versions will be available on our web site: http://scripts.sil.org/OFL.
8.2 Does this license restrict the rights of the Copyright Holder(s)?
No. The Copyright Holder(s) still retain(s) all the rights to their creation; they are only releasing a portion of it for use in a specific way. For example, the Copyright Holder(s) may choose to release a 'basic' version of their font under the OFL, but sell a restricted 'enhanced' version. Only the Copyright Holder(s) can do this.
8.3 Is the OFL a contract or a license?
The OFL is a license and not a contract and so does not require you to sign it to have legal validity. By using, modifying and redistributing components under the OFL you indicate that you accept the license.
8.4 I really like the terms of the OFL, but want to change it a little. Am I allowed to take ideas and actual wording from the OFL and put them into my own custom license for distributing my fonts?
We strongly recommend against creating your very own unique open licensing model. Using a modified or derivative license will likely cut you off - along with the font(s) under that license - from the community of designers using the OFL, potentially expose you and your users to legal liabilities, and possibly put your work and rights at risk. The OFL went though a community and legal review process that took years of effort, and that review is only applicable to an unmodified OFL. The text of the OFL has been written by SIL (with review and consultation from the community) and is copyright (c) 2005-2010 SIL International. You may re-use the ideas and wording (in part, not in whole) in another non-proprietary license provided that you call your license by another unambiguous name, that you do not use the preamble, that you do not mention SIL and that you clearly present your license as different from the OFL so as not to cause confusion by being too similar to the original. If you feel the OFL does not meet your needs for an open license, please contact us.
8.5 Can I translate the license and the FAQ into other languages?
SIL certainly recognises the need for people who are not familiar with English to be able to understand the OFL and its use. Making the license very clear and readable has been a key goal for the OFL, but we know that people understand their own language best.
If you are an experienced translator, you are very welcome to translate the OFL and OFL-FAQ so that designers and users in your language community can understand the license better. But only the original English version of the license has legal value and has been approved by the community. Translations do not count as legal substitutes and should only serve as a way to explain the original license. SIL - as the author and steward of the license for the community at large - does not approve any translation of the OFL as legally valid because even small translation ambiguities could be abused and create problems.
SIL gives permission to publish unofficial translations into other languages provided that they comply with the following guidelines:
- Put the following disclaimer in both English and the target language stating clearly that the translation is unofficial:
"This is an unofficial translation of the SIL Open Font License into <language_name>. It was not published by SIL International, and does not legally state the distribution terms for fonts that use the OFL. A release under the OFL is only valid when using the original English text. However, we recognize that this unofficial translation will help users and designers not familiar with English to better understand and use the OFL. We encourage designers who consider releasing their creation under the OFL to read the OFL-FAQ in their own language if it is available. Please go to http://scripts.sil.org/OFL for the official version of the license and the accompanying OFL-FAQ."
- Keep your unofficial translation current and update it at our request if needed, for example if there is any ambiguity which could lead to confusion.
If you start such a unofficial translation effort of the OFL and OFL-FAQ please let us know.
9 ABOUT SIL INTERNATIONAL
9.1 Who is SIL International and what do they do?
SIL serves language communities worldwide, building their capacity for sustainable language development, by means of research, translation, training and materials development. SIL makes its services available to all without regard to religious belief, political ideology, gender, race, or ethnic background. SIL's members and volunteers share a Christian commitment.
9.2 What does this have to do with font licensing?
The ability to read, write, type and publish in one's own language is one of the most critical needs for millions of people around the world. This requires fonts that are widely available and support lesser-known languages. SIL develops - and encourages others to develop - a complete stack of writing systems implementation components available under open licenses. This open stack includes input methods, smart fonts, smart rendering libraries and smart applications. There has been a need for a common open license that is specifically applicable to fonts and related software (a crucial component of this stack), so SIL developed the SIL Open Font License with the help of the Free/Libre and Open Source Software community.
9.3 How can I contact SIL?
Our main web site is: http://www.sil.org/
Our site about complex scripts is: http://scripts.sil.org/
Information about this license (and contact information) is at: http://scripts.sil.org/OFL
APPENDIX A - FONTLOG EXAMPLE
Here is an example of the recommended format for a FONTLOG, although other formats are allowed.
-----
FONTLOG for the GlobalFontFamily fonts
This file provides detailed information on the GlobalFontFamily Font Software. This information should be distributed along with the GlobalFontFamily fonts and any derivative works.
Basic Font Information
GlobalFontFamily is a Unicode typeface family that supports all languages that use the Latin script and its variants, and could be expanded to support other scripts.
NewWorldFontFamily is based on the GlobalFontFamily and also supports Greek, Hebrew, Cyrillic and Armenian.
More specifically, this release supports the following Unicode ranges...
This release contains...
Documentation can be found at...
To contribute to the project...
ChangeLog
1 August 2008 (Tom Parker) GlobalFontFamily version 1.2.1
- Tweaked the smart font code (Branch merged with trunk version)
- Provided improved build and debugging environment for smart behaviours
7 February 2007 (Pat Johnson) NewWorldFontFamily Version 1.3
- Added Greek and Cyrillic glyphs
7 March 2006 (Fred Foobar) NewWorldFontFamily Version 1.2
- Tweaked contextual behaviours
1 Feb 2005 (Jane Doe) NewWorldFontFamily Version 1.1
- Improved build script performance and verbosity
- Extended the smart code documentation
- Corrected minor typos in the documentation
- Fixed position of combining inverted breve below (U+032F)
- Added OpenType/Graphite smart code for Armenian
- Added Armenian glyphs (U+0531 -> U+0587)
- Released as "NewWorldFontFamily"
1 Jan 2005 (Joe Smith) GlobalFontFamily Version 1.0
- Initial release
Acknowledgements
If you make modifications be sure to add your name (N), email (E), web-address (if you have one) (W) and description (D). This list is in alphabetical order.
N: Jane Doe
E: jane@university.edu
W: http://art.university.edu/projects/fonts
D: Contributor - Armenian glyphs and code
N: Fred Foobar
E: fred@foobar.org
W: http://foobar.org
D: Contributor - misc Graphite fixes
N: Pat Johnson
E: pat@fontstudio.org
W: http://pat.fontstudio.org
D: Designer - Greek & Cyrillic glyphs based on Roman design
N: Tom Parker
E: tom@company.com
W: http://www.company.com/tom/projects/fonts
D: Engineer - original smart font code
N: Joe Smith
E: joe@fontstudio.org
W: http://joe.fontstudio.org
D: Designer - original Roman glyphs
Fontstudio.org is an not-for-profit design group whose purpose is...
Foobar.org is a distributed community of developers...
Company.com is a small business who likes to support community designers...
University.edu is a renowed educational institution with a strong design department...
-----

View File

@ -0,0 +1,87 @@
Copyright (c) 2010-2013, Khaled Hosny (<khaledhosny@eglug.org>)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
---------------------------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
---------------------------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development
of collaborative font projects, to support the font creation efforts of academic
and linguistic communities, and to provide a free and open framework in which
fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed
freely as long as they are not sold by themselves. The fonts, including any
derivative works, can be bundled, embedded, redistributed and/or sold with any
software provided that any reserved names are not used by derivative works. The
fonts and derivatives, however, cannot be released under any other type of license.
The requirement for fonts to remain under this license does not apply to any
document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright Holder(s) under
this license and clearly marked as such. This may include source files, build
scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the copyright
statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting, or
substituting -- in part or in whole -- any of the components of the Original Version,
by changing formats or by porting the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical writer or other
person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the
Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell
modified and unmodified copies of the Font Software, subject to the following
conditions:
1) Neither the Font Software nor any of its individual components, in Original or
Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled, redistributed
and/or sold with any software, provided that each copy contains the above copyright
notice and this license. These can be included either as stand-alone text files,
human-readable headers or in the appropriate machine-readable metadata fields within
text or binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless
explicit written permission is granted by the corresponding Copyright Holder. This
restriction only applies to the primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall
not be used to promote, endorse or advertise any Modified Version, except to
acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with
their explicit written permission.
5) The Font Software, modified or unmodified, in part or in whole, must be distributed
entirely under this license, and must not be distributed under any other license. The
requirement for fonts to remain under this license does not apply to any document
created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,8 @@
designer: Khaled Hosny
url: http://amirifont.org
license: OFL
description: Amiri is a classical Arabic typeface in Naskh style for
typesetting books and other running text. Its design is a revival of the
beautiful typeface pioneered in early 20th century by Bulaq Press in Cairo,
also known as Amiria Press, after which the font is named.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,602 @@
NOTE: This page is also in XOWA under home/wiki/Help:Luaj
== Source ==
The luaj_xowa.jar was built using the source at http://sourceforge.net/projects/luaj/files/luaj-3.0/3.0-beta2/luaj-3.0-beta2.zip/download.
Its source is not currently included with XOWA. It is available at the following location: https://sourceforge.net/projects/xowa/files/support/luaj/
== Modification ==
The luaj_xowa.jar was created for the following reasons:
* Backward compatibility:
: Scribunto is currently using Lua 5.1 whereas luaj 3.0 is designed for Lua 5.2
: Lua 5.2 is not backward-compatible with Lua 5.1; several functions are obsoleted (for example, table.maxn)
: The luaj_xowa.jar was tailored to support Scribunto's 5.1 environment.
* Patches / bug fixes:
: Luaj has a handful of minor issues / defects. They are listed below.
== $engines variable ==
Note that the $engines variable refers to /xowa/bin/any/lua/mediawiki/extensions/Scribunto/engines/
== Luaj changes ==
=== Luaj 2.0.3 errors fixed in 3.0 ===
==== os.time doesn't handle dates before 1970 ====
* fix : incorrect Birth / Date; EX: ru.w:Пушкин,_Александр_Сергеевич
* file: /src/core/org/luaj/vm2/lib/OsLib.java
==== pairs.next fails when setting val to null ====
* fix : Finnish declension table; EX:d:Latvia
* file: /src/core/org/luaj/vm2/LuaTable.java
=== Luaj 2.0.3 features removed from 3.0 ===
==== string.gfind deprecated ====
* fix : missing Video_game_reviews; EX: w:Sonic_Heroes
* file: /src/core/org/luaj/vm2/lib/StringLib.java
* code: call
<pre>
old:
"sub"} );
new:
"sub", "gfind"} );
</pre>
* code: invoke
<pre>
add:
case 4:
case 9: return StringLib.gmatch( args );
</pre>
==== math.log10 deprecated ====
* fix : blank references; EX:w:Earth
* file: /src/jse/org/luaj/vm2/lib/JseMathLib.java
* code:
<pre>
math.set("log10", new log10());
static final class log10 extends UnaryOp { protected double call(double d) { return Math.log10(d); } }
</pre>
==== math.mod deprecated ====
* fix : missing table; EX:d:աղբիւր
* file: /src/core/org/luaj/vm2/lib/MathLib.java
* code:
<pre>
fmod fmod_func = new fmod();
math.set("mod", fmod_func);
math.set("fmod", fmod_func);
</pre>
==== table.maxn deprecated ====
file: /src/core/org/luaj/vm2/lib/TableLib.java
* code:
<pre>
public LuaValue getn() {
int len = length();
for (int n = len; n > 0; --n )
if ( !rawget(n).isnil() )
return LuaInteger.valueOf(n);
return ZERO;
}
</pre>
file: /src/core/org/luaj/vm2/lib/TableLib.java
<pre>
table.set("maxn", new maxn());
static class maxn extends OneArgFunction {
public LuaValue call(LuaValue arg) {
return LuaValue.valueOf(arg.checktable().maxn());
}
}
</pre>
==== table.getn deprecated ====
* fix : missing text; EX: d:aceite d:Module:pt-verb-form-of
* file: /src/core/org/luaj/vm2/LuaTable.java
code:
<pre>
public LuaValue getn() {
int len = length();
for (int n = len; n > 0; --n )
if ( !rawget(n).isnil() )
return LuaInteger.valueOf(n);
return ZERO;
}
</pre>
* file: /src/core/org/luaj/vm2/lib/TableLib.java
* code:
<pre>
table.set("getn", new getn());
static class getn extends OneArgFunction {
public LuaValue call(LuaValue arg) {
return arg.checktable().getn();
}
}
</pre>
==== automatic arg variable in varargs function deprecated ====
* fix : Horizontal timeline; EX: w:Cretaceous%E2%80%93Paleogene_extinction_event
* file: /src/core/org/luaj/vm2/LuaClosure.java
code:
<pre>
case Lua.OP_GETTABUP: /* A B C R(A) := UpValue[B][RK(C)] */
// stack[a] = upValues[i>>>23].getValue().get((c=(i>>14)&0x1ff)>0xff? k[c&0x0ff]: stack[c]);
// HACK: handle deprecated "arg" for "..."
int OP_GETTABUP_c = (i>>14)&0x1ff;
boolean OP_GETTABUP_b = OP_GETTABUP_c>0xff;
LuaValue OP_GETTABUP_idx = OP_GETTABUP_b ? k[OP_GETTABUP_c&0x0ff]: stack[OP_GETTABUP_c];
stack[a] = upValues[i>>>23].getValue().get(OP_GETTABUP_idx);
// HACK: handle deprecated "arg"
if ( p.is_vararg == 1
&& stack[a] == NIL
&& OP_GETTABUP_b
&& "arg".equals(OP_GETTABUP_idx.tojstring())
)
stack[a] = new LuaTable(varargs);
continue;
</pre>
=== Luaj 3.0 defects ===
==== os.date does not accept UTC format ====
* fix : incorrect age in ym; EX:w:Supreme_Court_of_the_United_States
* file: /src/core/org/luaj/vm2/lib/OsLib.java
* proc: invoke.DATE
<pre>
boolean utc = false;
if (s.startsWith("!")) {
utc = true;
s = s.substring(1);
}
if (s.equals("*t")) {
Calendar d = Calendar.getInstance();
long time_in_ms = (long)(t*1000);
if (utc) {
java.util.TimeZone current_tz = d.getTimeZone();
int offset_from_utc = current_tz.getOffset(time_in_ms);
time_in_ms += -offset_from_utc;
}
</pre>
==== string.gsub fails with out_of_bounds error ====
* fix : blank references; EX:w:Earth
* file: /src/core/org/luaj/vm2/lib/StringLib.java
* proc: gsub
<pre>
old:
if ( anchor )
break;
new:
if ( anchor )
break;
if (soffset >= srclen) break; // assert soffset is in bounds, else will throw ArrayIndexOutOfBounds exception;
</pre>
==== string.gsub fails if string is empty====
* fix : blank references; EX:w:Woburn,_Massachusetts
* file: /src/core/org/luaj/vm2/lib/StringLib.java
* proc: gsub
<pre>
static Varargs gsub( Varargs args ) {
LuaString src = args.checkstring( 1 );
final int srclen = src.length();
if (srclen == 0) return varargsOf(src, LuaValue.ZERO); // exit early
</pre>
==== string.format ignores precision for double args ====
* fix : Convert calls will show full precision for numbers; EX:w:Tomato
* file: /src/core/org/luaj/vm2/lib/StringLib.java
<pre>
old:
case 'G':
fdsc.format( result, args.checkdouble( arg ) );
new:
case 'c': // merged c with e E f F g G
fdsc.format( result, fmt.tojstring().substring(i - fdsc.length, i), args.checkdouble( arg ));
</pre>
* proc: format
<pre>
old:
buf.append( v) );
new:
try {
fmtstr = "%" + fmtstr; // % stripped above
buf.append( String.format(fmtstr, v) ); // call String.format
}catch (java.util.MissingFormatWidthException e) {
// HACK: handle invalid format of "%0.1f" -> "%.1f"; %0 should be followed by valid number, but in this case, ignore it;
String old_fmt = e.getFormatSpecifier();
if (old_fmt.startsWith("0")) {
String new_fmt = old_fmt.substring(1); // remove initial 0
fmtstr = fmtstr.replace(old_fmt, new_fmt);
buf.append( String.format(fmtstr, v) ); // call String.format
}
else
throw e;
}
</pre>
* note: forces a 1.5 JRE (as opposed to 1.3)
==== string.tonumber should trim all whitespace ====
* fix: Population tables; EX: w:Woburn,_Massachusetts
* file: /src/core/org/luaj/vm2/LuaString.java
* proc: scannumber
<pre>
// trim ws
int idx = i;
while (idx < j) {
switch (m_bytes[idx]) {
case 9: case 10: case 13: case 32:
++idx;
i = idx;
break;
default:
idx = j;
break;
}
}
idx = j - 1;
while (idx >= i) {
switch (m_bytes[idx]) {
case 9: case 10: case 13: case 32:
j = idx;
--idx;
break;
default:
idx = i -1;
break;
}
}
</pre>
==== multi-byte strings not fully supported ====
* fix : Thai calendar; EX:th.w:เหตุการณ์ปัจจุบัน
* file: /src/core/org/luaj/vm2/LuaString.java
<pre style='overflow:auto'>
public static LuaString valueOf(char[] chars, int off, int len) {
// COMMENTED: does not handle 2+ byte chars; assumes 1 char = 1 byte
// byte[] b = new byte[len];
// for ( int i=0; i<len; i++ )
// b[i] = (byte) chars[i + off];
// return valueOf(b, 0, len);
int bry_len = 0;
for (int i = 0; i < len; i++) // iterate over chars to sum all single / multi-byte chars
bry_len += LuaString.Utf8_len_by_int((int)(chars[i + off]));
byte[] bry = new byte[bry_len];
int bry_idx = 0;
for (int i = 0; i < len; i++) {
int c = (int)(chars[i + off]);
int c_len_in_bytes = LuaString.Utf8_encode_by_int(c, bry, bry_idx);
bry_idx += c_len_in_bytes;
}
return valueOf(bry, 0, bry_len);
}
public static String decodeAsUtf8(byte[] bytes, int offset, int length) {
// COMMENTED: does not handle 3+ byte chars
// int i,j,n,b;
// for ( i=offset,j=offset+length,n=0; i<j; ++n ) {
// switch ( 0xE0 & bytes[i++] ) {
// case 0xE0: ++i;
// case 0xC0: ++i;
// }
// }
// char[] chars=new char[n];
// for ( i=offset,j=offset+length,n=0; i<j; ) {
// chars[n++] = (char) (
// ((b=bytes[i++])>=0||i>=j)? b:
// (b<-32||i+1>=j)? (((b&0x3f) << 6) | (bytes[i++]&0x3f)):
// (((b&0xf) << 12) | ((bytes[i++]&0x3f)<<6) | (bytes[i++]&0x3f)));
// }
// return new String(chars);
return new String(bytes, offset, length, java.nio.charset.Charset.forName("UTF-8"));
}
public static int lengthAsUtf8(char[] chars) {
// COMMENTED: does not handle 3+ byte chars
// int i,b;
// char c;
// for ( i=b=chars.length; --i>=0; )
// if ( (c=chars[i]) >=0x80 )
// b += (c>=0x800)? 2: 1;
// return b;
int len = chars.length;
int rv = 0;
for (int i = 0; i < len; i++)
rv += LuaString.Utf8_len_by_int(chars[i]);
return rv;
}
public static int encodeToUtf8(char[] chars, int nchars, byte[] bytes, int off) {
// COMMENTED: does not handle 4+ byte chars; already using Encode_by_int, so might as well be consistent
// char c;
// int j = off;
// for ( int i=0; i<nchars; i++ ) {
// if ( (c = chars[i]) < 0x80 ) {
// bytes[j++] = (byte) c;
// } else if ( c < 0x800 ) {
// bytes[j++] = (byte) (0xC0 | ((c>>6) & 0x1f));
// bytes[j++] = (byte) (0x80 | ( c & 0x3f));
// } else {
// bytes[j++] = (byte) (0xE0 | ((c>>12) & 0x0f));
// bytes[j++] = (byte) (0x80 | ((c>>6) & 0x3f));
// bytes[j++] = (byte) (0x80 | ( c & 0x3f));
// }
// }
// return j - off;
int bry_idx = off;
for (int i = 0; i < nchars; i++ ) {
int c = chars[i];
int c_len_in_bytes = LuaString.Utf8_encode_by_int(c, bytes, bry_idx);
bry_idx += c_len_in_bytes;
}
return nchars; // NOTE: code returned # of bytes which is wrong; Globals.UTF8Stream.read caches rv as j which is used as index to char[] not byte[]; will throw out of bounds exception if bytes returned
}
public static int Utf8_len_by_int(int charAsInt) {
if (charAsInt < 0x80) return 1;
else if (charAsInt < (1 << 11)) return 2;
else if (charAsInt < (1 << 16)) return 3;
else if (charAsInt < (1 << 21)) return 4;
else if (charAsInt < (1 << 26)) return 5;
else return 6;
}
public static int Utf8_len_by_byte(byte b) {
int i = b & 0xff;
switch (i) {
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15:
case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31:
case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47:
case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58: case 59: case 60: case 61: case 62: case 63:
case 64: case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79:
case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 91: case 92: case 93: case 94: case 95:
case 96: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111:
case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: case 123: case 124: case 125: case 126: case 127:
case 128: case 129: case 130: case 131: case 132: case 133: case 134: case 135: case 136: case 137: case 138: case 139: case 140: case 141: case 142: case 143:
case 144: case 145: case 146: case 147: case 148: case 149: case 150: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 158: case 159:
case 160: case 161: case 162: case 163: case 164: case 165: case 166: case 167: case 168: case 169: case 170: case 171: case 172: case 173: case 174: case 175:
case 176: case 177: case 178: case 179: case 180: case 181: case 182: case 183: case 184: case 185: case 186: case 187: case 188: case 189: case 190: case 191:
return 1;
case 192: case 193: case 194: case 195: case 196: case 197: case 198: case 199: case 200: case 201: case 202: case 203: case 204: case 205: case 206: case 207:
case 208: case 209: case 210: case 211: case 212: case 213: case 214: case 215: case 216: case 217: case 218: case 219: case 220: case 221: case 222: case 223:
return 2;
case 224: case 225: case 226: case 227: case 228: case 229: case 230: case 231: case 232: case 233: case 234: case 235: case 236: case 237: case 238: case 239:
return 3;
case 240: case 241: case 242: case 243: case 244: case 245: case 246: case 247:
return 4;
case 248: case 249: case 250: case 251:
return 5;
case 252: case 253:
return 6;
case 254: case 255:
default:
return 6;
}
}
public static int Utf8_decode_to_int(byte[] ary, int pos) {
byte b0 = ary[pos];
if ((b0 & 0x80) == 0) {
return b0;
}
else if ((b0 & 0xE0) == 0xC0) {
return ( b0 & 0x1f) << 6
| ( ary[pos + 1] & 0x3f)
;
}
else if ((b0 & 0xF0) == 0xE0) {
return ( b0 & 0x0f) << 12
| ((ary[pos + 1] & 0x3f) << 6)
| ( ary[pos + 2] & 0x3f)
;
}
else if ((b0 & 0xF8) == 0xF0) {
return ( b0 & 0x07) << 18
| ((ary[pos + 1] & 0x3f) << 12)
| ((ary[pos + 2] & 0x3f) << 6)
| ( ary[pos + 3] & 0x3f)
;
}
else if ((b0 & 0xFC) == 0xF8) {
return ( b0 & 0x03) << 24
| ((ary[pos + 1] & 0x3f) << 18)
| ((ary[pos + 2] & 0x3f) << 12)
| ((ary[pos + 3] & 0x3f) << 6)
| ( ary[pos + 4] & 0x3f)
;
}
else if ((b0 & 0xFC) == 0xFC) {
return ( b0 & 0x03) << 30
| ((ary[pos + 1] & 0x3f) << 24)
| ((ary[pos + 2] & 0x3f) << 18)
| ((ary[pos + 3] & 0x3f) << 12)
| ((ary[pos + 4] & 0x3f) << 6)
| ( ary[pos + 5] & 0x3f)
;
}
else {
return b0 & 0xFF;
}
}
public static int Utf8_encode_by_int(int charAsInt, byte[] src, int pos) {
if (charAsInt < 0x80) {
src[pos] = (byte)charAsInt;
return 1;
}
else if (charAsInt < (1 << 11)) {
src[pos] = (byte)(0xC0 | (charAsInt >> 6));
src[++pos] = (byte)(0x80 | (charAsInt & 0x3F));
return 2;
}
else if (charAsInt < (1 << 16)) {
src[pos] = (byte)(0xE0 | (charAsInt >> 12));
src[++pos] = (byte)(0x80 | (charAsInt >> 6) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt & 0x3F));
return 3;
}
else if (charAsInt < (1 << 21)) {
src[pos] = (byte)(0xF0 | (charAsInt >> 18));
src[++pos] = (byte)(0x80 | (charAsInt >> 12) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt >> 6) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt & 0x3F));
return 4;
}
else if (charAsInt < (1 << 26)) {
src[pos] = (byte)(0xF8 | (charAsInt >> 24));
src[++pos] = (byte)(0x80 | (charAsInt >> 18) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt >> 12) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt >> 6) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt & 0x3F));
return 5;
}
else if (charAsInt < (1 << 31)) {
src[pos] = (byte)(0xFC | (charAsInt >> 30));
src[++pos] = (byte)(0x80 | (charAsInt >> 24) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt >> 18) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt >> 12) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt >> 6) & 0x3F);
src[++pos] = (byte)(0x80 | (charAsInt & 0x3F));
return 6;
}
else if (charAsInt == 0) {
src[pos] = (byte)0xC0;
src[++pos] = (byte)0x80;
return -1;
}
return -1;
}
</pre>
* file: /src/core/org/luaj/vm2/compiler/LexState.java
* proc: read_string
<pre style='overflow:auto'>
if (c > UCHAR_MAX)
lexerror("escape sequence too large", TK_STRING);
save(c, false); // NOTE: specify that c is integer and does not need conversion; EX: \128 -> 128 -> (char)128, not Utf8_encode(128)
</pre>
* file: /src/core/org/luaj/vm2/compiler/LexState.java
<pre style='overflow:auto'>
void save(int c) {save(c, true);}
void save(int c, boolean c_might_be_utf8) {
int bytes_len = c_might_be_utf8 ? LuaString.Utf8_len_by_byte((byte)c) : 1;
if (bytes_len > 1) { // c is 1st byte of utf8 multi-byte sequence; read required number of bytes and convert to char; EX: ← is serialized in z as 226,134,144; c is currently 226; read 134 and 144 and convert to ←
temp_bry[0] = (byte)c;
for (int i = 1; i < bytes_len; i++) {
nextChar();
temp_bry[i] = (byte)current;
}
c = LuaString.Utf8_decode_to_int(temp_bry, 0);
}
if ( buff == null || nbuff + 1 > buff.length )
buff = LuaC.realloc( buff, nbuff*2+1 );
buff[nbuff++] = (char)c;
}
private static byte[] temp_bry = new byte[6];
</pre>
=== build.xml ===
* note: this change is needed to get luaj to compile with the String.format(String, double) call
* file: build.xml
<pre>
old:
<javac destdir="build/jme/classes" encoding="utf-8" source="1.3" target="1.2" bootclasspathref="wtk-libs"
srcdir="build/jme/src"/>
<javac destdir="build/jse/classes" encoding="utf-8" source="1.3" target="1.3"
classpath="lib/bcel-5.2.jar"
srcdir="build/jse/src"
excludes="**/script/*,**/Lua2Java*,lua*"/>
<javac destdir="build/jse/classes" encoding="utf-8" source="1.5" target="1.5"
classpath="build/jse/classes"
srcdir="build/jse/src"
includes="**/script/*,**/Lua2Java*"/>
<javac destdir="build/jse/classes" encoding="utf-8" source="1.3" target="1.3"
classpath="build/jse/classes"
srcdir="build/jse/src"
includes="lua*"/>
new:
<javac destdir="build/jse/classes" encoding="utf-8" source="1.5" target="1.5"
classpath="lib/bcel-5.2.jar"
srcdir="build/jse/src"
excludes="**/script/*,**/Lua2Java*,lua*"/>
<javac destdir="build/jse/classes" encoding="utf-8" source="1.5" target="1.5"
classpath="build/jse/classes"
srcdir="build/jse/src"
includes="**/script/*,**/Lua2Java*"/>
<javac destdir="build/jse/classes" encoding="utf-8" source="1.5" target="1.5"
classpath="build/jse/classes"
srcdir="build/jse/src"
includes="lua*"/>
</pre>
=== Luaj tests ===
<pre>
package org.luaj.vm2;
import org.luaj.vm2.lib.StringLib;
import junit.framework.*;
public class Xowa_tst extends TestCase {
private Xowa_fxt fxt = new Xowa_fxt();
public void test_tonumber_ws() {
fxt.Test_tonumber_int("123" , 123);
fxt.Test_tonumber_int("\t\n\r 123\t\n\r" , 123);
fxt.Test_tonumber_nil("1a");
fxt.Test_tonumber_nil("1 2");
fxt.Test_tonumber_nil("");
fxt.Test_tonumber_nil("\t\n\r \t\n\r");
}
public void test_gsub() {
fxt.Test_gsub("abc", "a", "A", "Abc"); // basic
fxt.Test_gsub("a#b", "#", "", "ab"); // match() fails when shortening string
fxt.Test_gsub("", "%b<>", "A", ""); // balance() fails with out of index when find is blank
}
public void test_format() {
fxt.Test_format("%.1f" , "1.23", "1.2"); // apply precision; 1 decimal place
fxt.Test_format("(%.1f)", "1.23", "(1.2)"); // handle substring; format_string should be "%.1f" not "(%.1f)"
fxt.Test_format("%0.1f" , "1.23", "1.2"); // handle invalid precision of 0
}
}
class Xowa_fxt {
public void Test_tonumber_int(String raw, int expd) {
LuaString actl_str = LuaString.valueOf(raw);
LuaInteger actl_int = (LuaInteger)actl_str.tonumber();
Assert.assertEquals(expd, actl_int.v);
}
public void Test_tonumber_nil(String raw) {
LuaString actl_str = LuaString.valueOf(raw);
Assert.assertEquals(LuaValue.NIL, actl_str.tonumber());
}
public void Test_gsub(String text, String regx, String repl, String expd) {
Varargs actl_args = StringLib.gsub_test(LuaValue.varargsOf(new LuaValue[] {LuaValue.valueOf(text), LuaValue.valueOf(regx), LuaValue.valueOf(repl)}));
Assert.assertEquals(expd, actl_args.checkstring(1).tojstring());
}
public void Test_format(String fmt, String val, String expd) {
Varargs actl_args = StringLib.format_test(LuaValue.varargsOf(new LuaValue[] {LuaValue.valueOf(fmt), LuaValue.valueOf(val)}));
Assert.assertEquals(expd, actl_args.checkstring(1).tojstring());
}
}
</pre>
== Scribunto related ==
None of these changes affect the luaj_xowa.jar. They are noted for comprehensiveness's sake.
=== getfenv/setfenv deprecated ===
* add lua-compat-env
: source: https://github.com/davidm/lua-compat-env
: target: $engines/LuaCommon/lualib/lua-compat-env .lua
* add alias to $engines/Luaj/mw_main.lua
: _G.getfenv = require 'compat_env'.getfenv
: _G.setfenv = require 'compat_env'.setfenv
* change xowa.jar to load debugLibrary
: Globals.load(new DebugLib());
=== loadString deprecated ===
* add alias to $engines/Luaj/mw_main.lua
: _G.loadstring = load
=== table.unpack deprecated ===
* add alias to $engines/Luaj/mw_main.lua
: _G.unpack = table.unpack

View File

@ -0,0 +1,230 @@
/*
XOWA TCP console: A TCP console example for XOWA
Copyright (C) 2013 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
public class Xowa_tcp_console {
public static void main(String[] args) {
Xowa_tcp_console console = new Xowa_tcp_console();
console.Run(args);
}
private int server_send_port;
private int server_recv_port;
private String wiki_domain;
private int max_length;
private Xowa_tcp_sender sender;
public void Run(String[] args) {
Print_message_line("XOWA TCP client v0.0.0.0");
// parse args
if (!Parse_args(args)) {
Print_message_line("XOWA console requires 4 args: server_send_port, server_recv_port, wiki_domain, max_length.");
Print_message_line("For example, use '55000 55001 simple.wikipedia.org 1000'");
return;
}
// start sender
sender = new Xowa_tcp_sender(server_send_port);
// start console
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
Print_message_line("Enter page name. For example 'Earth'. Press Ctrl+C to exit. Enter '|server_stop' to stop server or '|exit' to exit.");
Print_message("> ");
try {
while (true) {
String page = Read_string(input);
if (page == null)
break;
else if ("|exit".equals(page))
break;
else if ("|server_stop".equals(page)) {
Send_message_server_stop();
}
else
Send_message_fetch_page(page);
}
}
catch (Exception e) {
Print_error(e);
}
}
private void Send_message_fetch_page(String page) {
Print_message_line("Sending request for " + page);
// String xowa_msg = "0|0000000128|0000000257|xowa.cmd.exec|id_0|sender_0|recipient_0|2013-07-18 01:23:45.678|app.shell.fetch_page('simple.wikipedia.org/wiki/Earth', 'html');";
String command = String.format("app.shell.fetch_page('%s/wiki/%s', 'wiki');", wiki_domain, page);
Send_message(command);
}
private void Send_message_server_stop() {
Print_message_line("Sending request to stop server");
Send_message("app.server.stop;");
}
private void Send_message(String command) {
String id = "id_is_for_client_usage";
String time = "time_is_for_client_usage";
String body = String.format("xowa.cmd.exec|%s|xowa_tcp_console|xowa_server|%s|%s", id, time, command);
int body_len = body.length();
int cksum = (body_len * 2) + 1;
String msg = String.format("0|%s|%s|%s", String.format("%010d", body_len), String.format("%010d", cksum), body);
Xowa_tcp_receiver receiver = new Xowa_tcp_receiver(server_recv_port, max_length);
new Thread(receiver).start();
sender.Send_command(msg);
}
private boolean Parse_args(String[] args) {
if (args.length != 4) {
Print_message_line("4 arguments must be supplied: " + args.length);
return false;
}
server_send_port = Parse_int(args[0]); if (server_send_port == -1) return false;
server_recv_port = Parse_int(args[1]); if (server_recv_port == -1) return false;
wiki_domain = args[2];
max_length = Parse_int(args[3]); if (max_length == -1) return false;
return true;
}
private static int Parse_int(String raw) {
try {return Integer.parseInt(raw);}
catch (Exception e) {
Print_message_line("argument must be numeric: " + raw);
return -1;
}
}
private static String Read_string(BufferedReader input) {
try {return input.readLine();}
catch (IOException e) {return null;}
}
public static void Print_message_line(String msg) {
System.out.println(msg);
}
public static void Print_message(String msg) {
System.out.print(msg);
}
public static void Print_error(Exception e) {
System.err.println(e.getMessage());
}
public static void Sleep(long millis) {
try {Thread.sleep(millis);}
catch (InterruptedException e) {Print_error(e);}
}
}
class Xowa_tcp_sender {
private int port;
private Socket socket;
private OutputStream output_stream;
public Xowa_tcp_sender(int port) {this.port = port;}
public boolean Open_socket() {
try {
socket = new Socket("localhost", port);
// socket.setSoTimeout(10000);
output_stream = socket.getOutputStream();
return true;
}
catch (Exception e) {
Xowa_tcp_console.Print_error(e);
return false;
}
}
public void Send_command(String msg) {
try {
while (!Open_socket()) {
Xowa_tcp_console.Sleep(100);
}
byte[] buffer = msg.getBytes();
output_stream.write(buffer, 0, buffer.length);
Close_socket();
}
catch (Exception e) {
Xowa_tcp_console.Print_error(e);
}
}
public void Close_socket() {
try {
output_stream.close();
socket.close();
}
catch (Exception e) {
Xowa_tcp_console.Print_error(e);
}
}
}
class Xowa_tcp_receiver implements Runnable {
private int port;
private int max_length;
private ServerSocket server_socket;
private Socket client_socket;
private InputStream input_stream;
public Xowa_tcp_receiver(int port, int max_length) {
this.port = port;
this.max_length = max_length;
}
public void run() {
try {
// initialization
server_socket = new ServerSocket(port);
client_socket = server_socket.accept();
// client_socket.setSoTimeout(10000);
byte[] buffer = new byte[65536];
input_stream = client_socket.getInputStream();
// read incoming messages
int read = 0;
while (true) {
String msg = "";
// read header
int body_len_max = 0, body_len_cur = 0;
read = input_stream.read(buffer, 0, 24);
if (read == -1) break;
String body_len_max_str = new String(buffer, 2, 10);
body_len_max = Integer.parseInt(body_len_max_str);
buffer = new byte[body_len_max];
// read rest of body
while (body_len_cur < body_len_max) {
read = input_stream.read(buffer);
if (read == -1) break;
body_len_cur += read;
msg += new String(buffer, 0, read);
}
int msg_length = msg.length();
if (msg_length > max_length) msg_length = max_length;
Xowa_tcp_console.Print_message_line(msg.substring(0, msg_length));
Xowa_tcp_console.Print_message("\n\n> ");
}
this.Close_socket();
}
catch (Exception e) {
Xowa_tcp_console.Print_error(e);
}
}
public void Close_socket() {
try {
input_stream.close();
client_socket.close();
server_socket.close();
}
catch (Exception e) {
// Xowa_tcp_console.Print_error(e); // ignore, else error will print in console
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -0,0 +1,37 @@
# mwad - mediawiki api
This is a script for creating xml-dumps via the mediawiki api.
It is still in early development, feel free to a new [issue](https://github.com/Mattze96/mwad/issues).
Importing to @gnosygnu's offline wikipedia-reader [XOWA](https://github.com/gnosygnu/xowa) works fine..
## Installation
No additional packages are required at the moment :)
---
## Run
```
usage: mediawiki_api_dump.py [-h] [-v] [-n NAME] [-l LOG] [-c] [-x] url
Create a wiki xml-dump via api.php
positional arguments:
url download url
optional arguments:
-h, --help show this help message and exit
-v, --verbose verbose level... repeat up to three times
-n NAME, --name NAME name of the wiki for filename etc.
-l LOG, --log LOG specify log-file.
-c, --compress compress output file with bz2
-x, --xowa special XOWA mode: xml to stdout, progress to stderr
```
Example:
./mediawiki_api_dump.py http://wiki.archlinux.org

View File

@ -0,0 +1,297 @@
#!/usr/bin/env python3
#-*-coding:utf-8-*-
'''mediawiki_api_dump.py: Creates a xml dump of all pages from the given wiki-url'''
__author__ = 'https://github.com/Mattze96'
__copyright__ = 'Copyright 2016, Planet Earth'
__version__ = '0.0.2'
import argparse
import logging
import urllib.parse, urllib.request
import json
import re
import time
import sys
import bz2
parser = argparse.ArgumentParser(
description = 'Create a wiki xml-dump via api.php'
)
parser.add_argument('-v', '--verbose', action='count', default=0, help='verbose level... repeat up to three times\n')
parser.add_argument('-n', '--name', help='name of the wiki for filename etc.\n')
parser.add_argument('-l', '--log', help='specify log-file.\n')
parser.add_argument('-c', '--compress', action='store_true', help='compress output file with bz2\n')
parser.add_argument('-x', '--xowa', action='store_true', help='special XOWA mode: xml to stdout, progress to stderr')
parser.add_argument('wiki_url', metavar='url', help='download url\n') #nargs='+',
args = parser.parse_args()
logFormatter = logging.Formatter('%(asctime)s - %(message)s')
rootLogger = logging.getLogger()
rootLogger.setLevel(logging.INFO)
if args.log:
fileHandler = logging.FileHandler(args.log)
fileHandler.setFormatter(logFormatter)
rootLogger.addHandler(fileHandler)
if args.xowa:
args.verbose = 0
consoleHandler = logging.StreamHandler()
consoleHandler.setLevel(max(3 - args.verbose, 0) * 10)
consoleHandler.setFormatter(logFormatter)
rootLogger.addHandler(consoleHandler)
logging.info('Arguments: %s', str(vars(args)))
class ProgressBar(object):
def __init__(self, total, width=40, symbol='#', output=sys.stderr):
assert len(symbol) == 1
self.total = total
self.width = width
self.symbol = symbol
self.output = output
self.fmt = re.sub(r'(?P<name>%\(.+?\))d', r'\g<name>%dd' % len(str(total)),
'%(bar)s %(current)d/%(total)d (%(percent)3d%%)')
self.current = 0
def __call__(self):
percent = self.current / float(self.total)
size = int(self.width * percent)
remaining = self.total - self.current
bar = '[' + self.symbol * size + ' ' * (self.width - size) + ']'
args = {
'total': self.total,
'bar': bar,
'current': self.current,
'percent': percent * 100,
'remaining': remaining
}
print('\r' + self.fmt % args, file=self.output, end='')
def done(self):
self.current = self.total
self()
print('', file=self.output)
class Dumper():
def __init__(self, wiki, api, compress, enable_progress, xowa_mode):
self.wiki = wiki
self.api = api
self.compress = compress
self.enable_progress = enable_progress
self.writer = None
self.pages_per_request = 50
self.xowa = xowa_mode
self.xowa_counter = 0
self.xowa_max_counter = 0
def xowa_status(self, *args, **kwargs):
if not self.xowa:
return
print('[mwad]:', *args, file=sys.stderr, **kwargs)
def start(self):
self.xowa_status('getting statistics')
statistics = self.get_statistics()
self.xowa_status('got statistics')
if self.enable_progress:
print('Getting a list of all pages')
self.progress = ProgressBar(statistics['pages'])
self.xowa_status('getting namespaces')
nss = self.get_nsids()
self.xowa_status('got namespaces')
self.xowa_status('getting pageids')
self.xowa_counter = 0
self.xowa_max_counter = statistics['pages']
pageids = self.get_pageids(nss)
self.xowa_status('got pageids')
if self.enable_progress:
print('Downloading pages...')
self.progress = ProgressBar(len(pageids))
self.xowa_status('starting xml-stream')
self.xowa_counter = 0
self.xowa_max_counter = len(pageids)
self.merge_pages(pageids)
self.xowa_status('stopped xml-stream')
logging.info('Done')
def get_nsids(self):
nss = self.mw_siteinfo_namespaces()['query']['namespaces']
#Why not negative ??
return [x['id'] for x in nss.values() if x['id'] >= 0]
def get_statistics(self):
params = {
'action': 'query',
'meta': 'siteinfo',
'siprop': 'statistics',
'format': 'json',
}
return self.mw_api_json(params)['query']['statistics']
def xml_writer(self, filename):
if self.xowa:
try:
while True:
line = (yield)
#f.write(line.encode('utf-8'))
print(line, end='')
except GeneratorExit:
pass
logging.info('XML-Stream: %s done.', filename)
elif self.compress:
with bz2.open(filename+'.bz2', 'w') as f:
try:
while True:
line = (yield)
f.write(line.encode('utf-8'))
except GeneratorExit:
pass
logging.info('File: %s.bz2 done.', filename)
else:
with open(filename, 'w', encoding='utf-8') as f:
try:
while True:
line = (yield)
f.write(line)
except GeneratorExit:
pass
logging.info('File: %s done.', filename)
def merge_pages(self, pageids=[]):
if not pageids:
return
self.writer = self.xml_writer('{0}-{1}-pages-articles.xml'.format(self.wiki, time.strftime('%Y%m%d')))
next(self.writer)
page = self.mw_export_pageids()
self.writer.send(re.search('(<mediawiki.*>)', page).group(0))
self.writer.send(re.search('(\s*?<siteinfo>.*?<\/siteinfo>)', page, re.DOTALL).group(0))
for ids in self.__split_list(pageids, self.pages_per_request):
logging.info('Current ids: %s', str(ids))
page = self.mw_export_pageids(ids)
sub_pages = 0
for page in re.finditer('(\s*?<page>.*?<\/page>)', page, re.DOTALL):
self.writer.send(page.group(0))
sub_pages += 1
if self.enable_progress:
self.progress.current += sub_pages
self.progress()
self.xowa_counter += sub_pages
self.xowa_status('getting pageids', '{}/{}'.format(self.xowa_counter, self.xowa_max_counter))
self.writer.send('\n</mediawiki>\n')
self.writer.close()
if self.enable_progress:
self.progress.done()
self.progress = None
def mw_export_pageids(self, pageids=[]):
params = {
'action': 'query',
'pageids': '|'.join([str(x) for x in pageids]),
'continue': '',
'export': '',
'exportnowrap': ''
}
return self.mw_api_text(params)
def mw_api_text(self, params):
data = urllib.parse.urlencode(params)
response = urllib.request.urlopen('{}?{}'.format(self.api, data))
logging.info('API: %s', response.geturl())
return response.read().decode('utf-8')
def mw_api_json(self, params):
data = urllib.parse.urlencode(params)
response = urllib.request.urlopen('{}?{}'.format(self.api, data))
logging.info('API: %s', response.geturl())
return json.loads(response.read().decode('utf-8'))
def mw_list_allpages(self, apfrom=None, ns=0):
params = {
'action': 'query',
'list': 'allpages',
'aplimit': 500,
'continue': '',
'format': 'json',
'apnamespace': ns
}
if apfrom:
params.update({
'apfrom': apfrom
})
return self.mw_api_json(params)
def mw_siteinfo_namespaces(self):
params = {
'action': 'query',
'meta': 'siteinfo',
'siprop': 'namespaces',
'format': 'json',
}
return self.mw_api_json(params)
def get_pageids(self, nss=[0]):
pageids = []
for ns in nss:
apfrom = None
while True:
result = self.mw_list_allpages(apfrom, ns)
pageids.extend([x['pageid'] for x in result['query']['allpages']])
if self.enable_progress:
self.progress.current += len(result['query']['allpages'])
self.progress()
self.xowa_counter += len(result['query']['allpages'])
self.xowa_status('getting pageids', '{}/{}'.format(self.xowa_counter, self.xowa_max_counter))
if 'continue' not in result:
break
apfrom = result['continue']['apcontinue']
pageids.sort()
logging.info('PageIds: %s', str(pageids))
if self.enable_progress:
self.progress.done()
self.progress = None
return pageids
def __split_list(self, l, n):
arrs = []
while len(l) > n:
sl = l[:n]
arrs.append(sl)
l = l[n:]
arrs.append(l)
return arrs
if __name__ == '__main__':
API_URL = urllib.parse.urljoin(args.wiki_url, 'api.php')
WIKI_NAME = args.name or urllib.parse.urlparse(args.wiki_url).netloc
COMPRESS = (args.compress and not args.xowa)
ENABLE_PROGRESS = (args.verbose == 0 and not args.xowa)
XOWA_MODE = args.xowa
dumper = Dumper(WIKI_NAME, API_URL, COMPRESS, ENABLE_PROGRESS, XOWA_MODE)
dumper.start()

View File

@ -0,0 +1,218 @@
/***************************************************************************
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
****************************************************************************/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,679 @@
/***************************************************************************
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
****************************************************************************/
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -0,0 +1,15 @@
/***************************************************************************
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
****************************************************************************/
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
The terms of each license can be found in the following files:
GPLv3 License: LICENSE-GPLv3.txt
Apache License: LICENSE-APACHE2.txt

View File

@ -0,0 +1,203 @@
/*----------------------------------
user agent stylesheet overrides
----------------------------------*/
input, select, textarea {
/* remove 3d border; also, use softer color */
border: 1px solid #ddd;
}
input[type="text"] {
/* add a little padding else text will be too close to borders */
padding: 2px;
}
select{
/* better vertical alignment (see Gui- Shortcuts) */
box-sizing: content-box;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
}
/*----------------------------------
page-level
----------------------------------*/
#xocfg_body {
/* use entire width */
width:100%;
/* auto-center */
margin:0 auto;
/* reset line-height; mw-body-content sets line-height to 1.6 which throws off vertical centering */
line-height: initial;
}
#xocfg_err {
color:red;
/* add v-space to give space for nav_select */
margin: 10px 0px 10px;
}
#xocfg_nav_select {
/* 28px to offset for help.toggle_all */
width: calc(100% - 28px);
}
#xocfg_page_help {
/* use same margin-top as h2 to symmetrically align vertically between dropdown above and h2 below */
margin-top: 20px;
}
/*----------------------------------
help row: note that this overrides the xohelp.css
----------------------------------*/
.xohelp_div {
/*
remove all borders except bottom for aesthetic reasons
*/
border: 0px;
border-bottom: 1px solid #ddd;
}
.xohelp_msg {
/*
add bottom-spacer to center vertically
*/
margin-bottom: 10px;
}
/*----------------------------------
cfg row
----------------------------------*/
.xoimg_btn_x16 {
/*
remove margins which only exist because other pages do not correct "line-height:1.6" and use manual-pixel nudging
note that this overrides the xocss.css
*/
margin: initial;
}
.xocfg_row {
/* take up 100% */
width: 100%;
/* add some v-space between rows */
margin: 2px 0px 2px;
/* add bottom border */
border-bottom: 1px solid rgb(230,230,230);
/* add padding to give space for bottom border */
padding: 0px 0px 4px;
}
.xocfg_itm_help {}
.xocfg_itm_name {
/* set width; will be used by data below */
width: 120px; /* DRD.narrow */
/* add margins to separate from buttons on either side */
margin: 0px 8px 0px 8px;
/* make bold; align-right*/
font-weight: bold;
text-align: right;
}
.xocfg_itm_delete {
/* add right margin to give space from data */
margin: 0px 4px 0px 0px;
}
.xocfg_itm_hide {
/* marker class to hide delete button */
visibility: hidden;
}
.xocfg_itm_data {
/* set width to use rest of page; note +40 for two buttons */
width: calc(100% - 200px); /* DRD.narrow */
}
@media only screen and (min-width: 768px) {
.xocfg_itm_name {
/* set width; will be used by data below */
width: 220px; /* DRD.narrow */
}
.xocfg_itm_data {
/* set width to use rest of page; note +40 for two buttons */
width: calc(100% - 300px); /* DRD.narrow */
}
}
/*----------------------------------
data
----------------------------------*/
.xocfg_data__str {
width: 100%;
}
.xocfg_data__int {
width: 75px;
text-align: right;
}
.xocfg_data__list {
width: 200px;
}
.xocfg_data__memo {
width: 100%;
}
@media only screen and (min-width: 768px) {
.xocfg_data__str {
width: 40%;
}
.xocfg_data__memo {
width: 40%;
}
}
.xocfg_data__io_cmd__exe__txt {
width: 400px;
/* add space to bottom to separate from arg_box */
margin-bottom: 4px;
}
.xocfg_data__io_cmd__arg__txt {
width: 400px;
}
.xocfg_data__io_cmd__exe__btn {}
.xocfg_data__gui_binding__box {
width: 120px;
/* add padding to make it same size as nearby text box */
padding: 1px;
}
.xocfg_data__gui_binding__ipt {
width: 200px;
}
.xocfg_data__readonly {
background-color:#F9F9F9;
}
/*----------------------------------
xocfg_pulse effect for confirm icon
----------------------------------*/
.xocfg_pulse {
display: block;
border-radius: 50%;
box-shadow: 0 0 0 rgba(0, 128, 0, 0.8);
animation: xocfg_pulse 2s;
}
@-webkit-keyframes xocfg_pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(0, 128, 0, 0.8);
}
70% {
-webkit-box-shadow: 0 0 0 2px rgba(0, 128, 0, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(0, 128, 0, 0);
}
}
@keyframes xocfg_pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(0, 128, 0, 0.8);
box-shadow: 0 0 0 0 rgba(0, 128, 0, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 2px rgba(0, 128, 0, 0);
box-shadow: 0 0 0 2px rgba(0, 128, 0, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(0, 128, 0, 0);
box-shadow: 0 0 0 0 rgba(0, 128, 0, 0);
}
}

View File

@ -0,0 +1,26 @@
<div id='cfg_grps'>
<div>
<p id='page_help_para'>{{{page_help}}}</p>
</div>
{{#grps}}
<h2>{{{name}}}</h2>
{{#itms}}
<div class="xocfg_row flex_div">
<div class='xocfg_itm_help'>
<span class='xoimg_btn_x16 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.help.toggle("{{key}}")' title='view more info'>&nbsp;</span>
</div>
<div id='{{key}}__name' class='xocfg_itm_name'>{{{name}}}</div>
<div id='{{key}}__undo' data-xocfg-type='{{type}}' class='xocfg_itm_delete{{^edited}} xocfg_itm_hide{{/edited}}'>
<span class='xoimg_btn_x16 xoimg_list_undo' onclick='return xo.cfg_edit.delete__send("{{key}}")' title="reset to &quot;{{{dflt}}}&quot;">&nbsp;</span>
</div>
<div class='xocfg_itm_data'>{{{html}}}</div>
<input type='hidden' id='{{key}}__key_box' value='{{key}}'></input>
<input type='hidden' id='{{key}}__ctx_box' value='{{{ctx}}}'></input>
</div>
<div id='{{key}}_help_div' class='xohelp_div'>
<div id='{{key}}_help_msg' class='xohelp_msg'>{{{help}}}</div>
</div>
{{/itms}}
{{/grps}}
</div>

View File

@ -0,0 +1,277 @@
(function (xo) {
xo.cfg_edit = new function() {
this.debug = false;
//{ util.elem
this.elem__get = function(id) {
var elem = document.getElementById(id);
if (elem == null && xo.cfg_edit.debug) alert('elem__get failed: id=' + id);
return elem;
}
this.elem__val = function(id) {
var elem = document.getElementById(id);
return elem == null ? null : elem.value;
}
this.elem__val_ = function(id, val) {
var elem = document.getElementById(id);
if (elem == null && xo.cfg_edit.debug) alert('elem__val failed: id=' + id);
elem.value = val;
}
this.elems__get_by_atr = function(atr) {
var rv = [];
// get all elems
var elems = document.getElementsByTagName('*');
var len = elems.length;
// loop all elems and add found to rv
for (var i = 0; i < len; i++) {
if (elems[i].getAttribute(atr) !== null) // elem has atr
rv.push(elems[i]);
}
return rv;
}
//}
//{ util.xocfg
this.err__clear = function() {xo.cfg_edit.err__write('');}
this.err__write = function(s) {
var elem = xo.elem.get('xocfg_err');
if (elem)
elem.innerHTML = s;
}
this.cfg_val__set = function(type, key, val) {
if (type === 'bool') {
xo.cfg_edit.elem__get(key).checked = val == "y";
}
else if (type === 'io.cmd') {
var flds = val.split("|");
xo.cfg_edit.elem__val_(key + '-exe', flds[0]);
xo.cfg_edit.elem__val_(key + '-arg', flds.length <= 1 ? "" : flds[1]);
}
else if (type === 'gui.binding') {
var flds = val.split("|");
// xo.cfg_edit.elem__val_(key + '-box', flds[0]);
var box = xo.cfg_edit.elem__get(key + '-box');
var len = box.options.length;
for (var i = 0; i < len; i++) {
var opt = box.options[i];
if (opt.text === flds[0]) {
box.selectedIndex = i;
break;
}
}
xo.cfg_edit.elem__val_(key + '-ipt', flds.length <= 1 ? "" : flds[1]);
}
else {
xo.cfg_edit.elem__get(key).value = val;
}
}
this.cfg_val__bind_all = function() {
var elems = xo.cfg_edit.elems__get_by_atr('data-xocfg-key');
var len = elems.length;
for (var i = 0; i < len; i++) {
elems[i].addEventListener('change', xo.cfg_edit.update__send_by_event);
if (elems[i].tagName === 'BUTTON') {
elems[i].addEventListener('click', xo.cfg_edit.update__send_by_event);
}
}
}
this.io_cmd__select = function(io_type, elem_id, msg) {
// call xowa to launch file_dialog
var file_path = xowa_exec('scripts_exec', 'app.gui.kit.ask_file("' + msg + '");');
if (file_path == null || file_path == '') return; // nothing selected; exit
// update val
var elem = xo.cfg_edit.elem__get(elem_id);
elem.value = file_path;
xo.cfg_edit.update__send(elem);
}
this.gui_binding__remap_send = function change_binding(key, name, bnd) {
try {
xowa_exec('scripts_exec', "app.cfg.run('app', 'xowa.gui.shortcuts.show_remap_win', '" + key + "\n" + name + "\n" + xo.cfg_edit.elem__val(key + '-ipt') + "');");
} catch (err) {alert(err);}
}
this.gui_binding__remap_recv = function(msg_str) {
try {
// err.write
var msg = JSON.parse(msg_str);
// update
var ipt_elem = xo.cfg_edit.elem__get(msg.key + '-ipt');
ipt_elem.value = msg.bnd;
xo.cfg_edit.update__send(ipt_elem);
return true;
} catch (err) {alert(err);}
}
//}
//{ update
this.update__send_by_event = function(e) {xo.cfg_edit.update__send(e.target);}
this.update__send = function(elem) {
try {
// init vars
var key = elem.getAttribute("data-xocfg-key");
var type = elem.getAttribute("data-xocfg-type");
// read val from ui
var val = '';
if (type === 'bool') {val = elem.checked ? "y" : "n";}
else if (type === 'io.cmd-exe') {val = elem.value + '|' + xo.cfg_edit.elem__val(key + '-arg');}
else if (type === 'io.cmd-arg') {val = xo.cfg_edit.elem__val(key + '-exe') + '|' + elem.value;}
// else if (type === 'gui.binding-box') {val = elem.value + '|' + xo.cfg_edit.elem__val(key + '-ipt');}
else if (type === 'gui.binding-box') {var box = xo.cfg_edit.elem__get(key + '-box'); val = box_text = box.options[box.selectedIndex].text + '|' + xo.cfg_edit.elem__val(key + '-ipt');}
else if (type === 'gui.binding-ipt') {var box = xo.cfg_edit.elem__get(key + '-box'); val = box_text = box.options[box.selectedIndex].text + '|' + elem.value;}
else {val = elem.value;}
// send to server
xo.server.send_by_bridge('xo.cfg_edit', 'update',
{ ctx: xo.cfg_edit.elem__val(key + '__ctx_box')
, key: key
, val: val
, type: type
});
} catch (err) {alert(err);}
}
this.update__fail = function(msg_str) {
try {
// err.write
var msg = JSON.parse(msg_str);
var name = xo.cfg_edit.elem__get(msg.key + '__name');
xo.cfg_edit.err__write('<b>' + msg.new_val + '</b> is invalid for <b>' + name.textContent.trim() + '</b><br/>Error: ' + msg.err);
// revert val
xo.cfg_edit.elem__val_(msg.key, msg.old_val);
return true;
} catch (err) {alert(err);}
}
this.update__pass = function(msg_str) {
try {
// err.clear
var msg = JSON.parse(msg_str);
xo.cfg_edit.err__clear();
if (msg.type === 'btn') return true; // if button, exit
// show undo button
var undo_elem = xo.cfg_edit.elem__get(msg.key + '__undo');
undo_elem.classList.remove("xocfg_itm_hide");
// show confirm icon briefly
var img = undo_elem.children[0];
img.className = 'xoimg_btn_x16 xoimg_misc_ok xocfg_pulse';
setTimeout(function() {
img.className = 'xoimg_btn_x16 xoimg_list_undo';
}, 1200);
return true;
} catch (err) {alert(err);}
}
//}
//{ delete
this.delete__send = function(key) {
try {
xo.cfg_edit.err__clear();
// get type
var undo_elem = xo.cfg_edit.elem__get(key + '__undo');
var type = undo_elem.getAttribute("data-xocfg-type");
// send to server
xo.server.send_by_bridge('xo.cfg_edit', 'delete',
{ ctx: xo.cfg_edit.elem__val(key + '__ctx_box')
, key: key
, type: type
});
} catch (err) {alert(err);}
}
this.delete__recv = function(msg_str) {
try {
var msg = JSON.parse(msg_str);
// hide icon
var undo_elem = xo.cfg_edit.elem__get(msg.key + '__undo');
var undo_img = undo_elem.children[0];
undo_elem.classList.add("xocfg_itm_hide");
// set value
var type = undo_elem.getAttribute("data-xocfg-type");
xo.cfg_edit.cfg_val__set(type, msg.key, msg.val);
return true;
} catch (err) {alert(err);}
}
//}
//{ select
this.select__by_keypress = function(e, target) {
switch (e.keyCode) {
case 38: // up
case 40: // down;
if (!e.altKey) // do not fire for alt+down which drops down menu
this.select__send(target);
break;
case 33: // page_up
case 34: // page_down;
this.select__send(target);
break;
}
}
this.select__send = function(elem) {
try {
if (elem == null) // occurs when View HTML for SWT Browser
return;
xo.cfg_edit.err__clear();
var key = elem.options[elem.selectedIndex].value;
xo.server.send_by_bridge('xo.cfg_edit', 'select',
{ ctx: 'app' //xo.cfg_edit.elem__val(key + '__ctx_box')
, key: key
});
var options_elem = xo.elem.get('options_lnk');
if (options_elem) // null on DRD
options_elem.href = '/wiki/Special:XowaCfg?grp=' + key;
} catch (err) {alert(err);}
}
this.select__recv = function(msg_str) {
try {
// write grp via template
var msg = JSON.parse(msg_str);
var grp = xo.elem.get('cfg_grps');
xo.tmpl.fmt('xocfg.grps', grp, msg);
// bind update and popups
xo.cfg_edit.cfg_val__bind_all();
try {
xowa_popups_bind_to_owner(document);
} catch (err) {}
return true;
} catch (err) {alert(err);}
}
//}
//{ help
this.help__toggle_all = function() {
var elems = document.getElementsByClassName('xohelp_div');
var len = elems.length;
for (var i = 0; i < len; i++) {
var elem = elems[i] ;
var id = elem.id.replace('_help_div', '');
xo.help.toggle(id);
}
}
//}
}
}(window.xo = window.xo || {}));
//{ onpageload
xo.cfg_edit.cfg_val__bind_all();
xo.help.add_bottom_margin = false;
setTimeout(function() { // wait for mustache to load files async
var elem = xo.cfg_edit.elem__get('xocfg_nav_select');
// auto-load group; deactivated because first group comes preloaded to have HTML
xo.cfg_edit.select__send(elem);
elem.focus();
}, 0);
//}

View File

@ -0,0 +1,64 @@
<div id='xocfg_body'>
<!-- TEXT:err_msg -->
<div id='xocfg_err'></div>
{{#nav_exists}}
<div>
<!-- BTN:info -->
<span class='xoimg_btn_x16 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.cfg_edit.help__toggle_all()' title='toggle all help'>&nbsp;</span>
<!-- COMBO:cfg_grps -->
<select id='xocfg_nav_select' onchange='xo.cfg_edit.select__send(this);' onkeyup='xo.cfg_edit.select__by_keypress(event, this);' accesskey='l'>
{{#itms}}
<option value='{{key}}' {{#selected}} selected='selected'{{/selected}}>{{text}}</option>
{{/itms}}
</select>
<!-- LINK:cfg_link -->
{{^app_is_drd}}
<div style='float:right;margin:2px 7px;'>
<a id='options_lnk'>options link</a>
</div>
{{/app_is_drd}}
</div>
{{/nav_exists}}
<div id='cfg_grps'>
<!-- TEXT:page_help -->
<div>
<p id='page_help_para'>{{{page_help}}}</p>
</div>
{{#grps}}
<h2>{{{name}}}</h2>
{{#itms}}
<div class="xocfg_row flex_div">
<!-- BTN:help_item -->
<div class='xocfg_itm_help'>
<span class='xoimg_btn_x16 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.help.toggle("{{key}}")' title='view more info'>&nbsp;</span>
</div>
<!-- TEXT:key -->
<div id='{{key}}__name' class='xocfg_itm_name'>{{{name}}}</div>
<!-- BTN:undo -->
<div id='{{key}}__undo' data-xocfg-type='{{type}}' class='xocfg_itm_delete{{^edited}} xocfg_itm_hide{{/edited}}'>
<span class='xoimg_btn_x16 xoimg_list_undo' onclick='return xo.cfg_edit.delete__send("{{key}}")' title="reset to &quot;{{{dflt}}}&quot;">&nbsp;</span>
</div>
<!-- TEXT:val -->
<div class='xocfg_itm_data'>{{{html}}}</div>
<!-- HIDDEN:key,ctx -->
<input type='hidden' id='{{key}}__key_box' value='{{key}}'></input>
<input type='hidden' id='{{key}}__ctx_box' value='{{{ctx}}}'></input>
</div>
<!-- DIV:help -->
<div id='{{key}}_help_div' class='xohelp_div'>
<div id='{{key}}_help_msg' class='xohelp_msg'>{{{help}}}</div>
</div>
{{/itms}}
{{/grps}}
</div>
</div>

View File

@ -0,0 +1,20 @@
.cur_head_text {
width: calc(100% - 40px);
}
.cur_head_btns {
width: 40px;
}
.label {
display: inline-block;
padding: 0px 0px 0px 10px;
}
.data {
display: inline-block;
width: calc(100% - 94px);
padding: 0px 0px 0px 10px;
}
.button {
display: inline-block;
padding: 0px 10px 0px 10px;
}

View File

@ -0,0 +1,16 @@
(function (xo) {
xo.cfg_maint = new function() {
this.get_elem_val = function(id) {
var elem = document.getElementById(id);
return elem == null ? null : elem.value;
}
this.itm__save = function(e) {
var data = xo.cfg_maint.get_elem_val('data_box');
xo.server.send_by_bridge('xo.cfg_maint', 'upsert',
{ data: data
});
}
}
}(window.xo = window.xo || {}));
document.getElementById('data_box').focus();
document.getElementById('save_btn').addEventListener('click', xo.cfg_maint.itm__save);

View File

@ -0,0 +1,25 @@
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
Work in progress
</div>
</div>
<div class='main_body' id='main_body'>
<div class='list_tbl'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>Option Maintenance</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
<div class="xotbl_data_row flex_div">
<div class='label'>Data
</div>
<div class='data'>
<textarea id='data_box' rows='40' accesskey=','></textarea>
</div>
<div class='button'>
<button id='save_btn' accesskey='s'>Save</button>
</div>
</div>
</div>
</div>

Binary file not shown.

View File

@ -0,0 +1,53 @@
.cur_head_text {
display: flex; align-items: center;
width: calc(100% - 180px);
font-size: 1.1em;
height: 100%;
margin-left: 10px; /* match img_btn padding */
}
.cur_head_btns {
width: 180px;
}
.log_div {
width: 100%;
padding: 10px;
margin: 0px; border: 0px; /* turn off default pre styles*/
overflow: auto;
background-color: #f9f9f9;
}
.date_combo_div {
display: inline-block;
}
.date_combo_btn {
display: flex; align-items: center;
width: 100%;
padding: 4px 0px 4px 4px;
border: solid 1px #ddd;
background-color: white;
cursor: pointer;
}
.date_combo_btn:hover, .dropbtn:focus {
background-color: #f9f9f9;
}
.date_combo_content {
display: none;
padding: 4px 4px 4px 4px;
position: absolute;
background-color: #f9f9f9;
text-align: left;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.date_combo_content a {
display: block;
color: black;
}
.date_combo_content a:hover {
background-color: #f1f1f1
}
.date_combo_content_show {
display:block;
}

View File

@ -0,0 +1,19 @@
(function (xo) {
xo.xolog = new function() {
this.date_combo_show = function() {
document.getElementById("date_combo_id").classList.toggle("date_combo_content_show");
}
window.onclick = function(event) {
if (!event.target.matches('.date_combo_clicker')) {
var dropdowns = document.getElementsByClassName("date_combo_content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var dropdown = dropdowns[i];
if (dropdown.classList.contains('date_combo_content_show')) {
dropdown.classList.remove('date_combo_content_show');
}
}
}
}
}
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,44 @@
<div class='main_div'>
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_inet_email'>&nbsp;</span><span class='xohelp_row_text'>Email the current log to the XOWA developer</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_delete'>&nbsp;</span><span class='xohelp_row_text'>Delete the current log</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_fsys_trash'>&nbsp;</span><span class='xohelp_row_text'>Delete all logs</span></div>
</div>
</div>
</div>
<div class='xotbl_head_row'>
<div class='cur_head_text'>
<div class="date_combo_div">
<div class="date_combo_btn">
<div class="date_combo_clicker" onclick="xo.xolog.date_combo_show()">{{log_name}}&#9660;</div>
</div>
<div id="date_combo_id" class="date_combo_content">
{{#log_files}}
<a href="/wiki/Special:XowaLog?cmd=show&file={{file}}">{{name}}</a>
{{/log_files}}
</div>
</div>
</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_inet_email' title='email' href='/wiki/Special:XowaLog?cmd=email&file={{log_file}}'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_list_delete' title='delete current log' href='javascript:void(0)'
data_alertify_msg='Are you sure you want to delete this log: {{log_name}}?'
data_alertify_ok='Delete'
data_alertify_cancel='Cancel'
data_alertify_href='/wiki/Special:XowaLog?cmd=delete_one&file={{log_file}}'
onclick='return xo.alertify.confirm_href(this);'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_fsys_trash' title='delete all logs' href='javascript:void(0)'
data_alertify_msg='Are you sure you want to delete all logs?'
data_alertify_ok='Delete All'
data_alertify_cancel='Cancel'
data_alertify_href='/wiki/Special:XowaLog?cmd=delete_all'
onclick='return xo.alertify.confirm_href(this);'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
<div class="xotbl_data_row">
<pre class='log_div'>{{{log_data}}}</pre>
</div>
</div>

View File

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--
NOTE: this page loads local files
- Chrome is the easiest browser for local files; Use "chrome.exe --disable-web-security"
- Change C:/xowa/ to wherever it is on your system
-->
<!-- base -->
<base href="file:///C:/xowa/" target="_blank">
<!-- css -->
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.core.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.bootstrap.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xocss_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xoimg_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/app/help/log/bin/xolog.css">
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/alertify-0.3.11.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/xo-alertify-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/mustache/mustache-2.2.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/jquery/jquery-1.11.3.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/app/help/log/bin/xolog.js"></script>
<!-- mustache -->
<script type="text/html" id="templates"></script>
<script type="text/javascript">
window.view = {
log_files:
[
{name:'2016-03-06 01:02:03', file:'20160306_010203'},
{name:'2016-03-05 01:02:03', file:'20160305_010203'},
],
log_name:'2016-03-06 01:02:03',
log_file:'20160306_010203',
log_data:'test data',
};
</script>
<script type="text/javascript">
$("#templates").load("bin/any/xowa/addon/app/help/log/bin/xolog.mustache.html", function(response_txt, status_txt, xhr){
var template = response_txt;
var output = Mustache.render(template, window.view);
document.getElementById('main').innerHTML = output;
});
</script>
</head>
<body>
<div id="main"></div>
</body>
<script>
xo.alertify.log_by_str('{"msg":"test", "type":"success", "wait":3000}');
</script>
</html>

View File

@ -0,0 +1,28 @@
.cur_head_text {
width: calc(100% - 40px);
}
.cur_head_btns {
width: 40px;
}
/* Detail Tbl */
.cur_data_row {
padding: 4px 0px 4px;
}
.cur_data_row label {
display: inline-block;
width: 90px;
margin: 0px 4px 0px 10px;
vertical-align: top;
align-self: flex-start;
-webkit-align-self: flex-start;
font-weight: bold;
}
.cur_data_row label::after {
content: ":";
}
.cur_data_input {
display: inline-block;
width: calc(100% - 140px);
}

View File

@ -0,0 +1,36 @@
(function (xo) {
xo.sql_exec = new function() {
this.send = function(proc, args) {
try {xo.server.send_by_bridge('xowa.app.maint.sql_exec', proc, args);}
catch (err) {alert(err);}
}
this.run_sql = function() {
try {
xo.sql_exec.results__set('running');
var data =
{ domain: xo.elem.get_val_or_null('domain_box')
, db: xo.elem.get_val_or_null('db_box')
, sql: xo.elem.get_val_or_null('sql_box')
};
xo.sql_exec.send('exec', data);
} catch (err) {
alert(err);
}
}
this.results__set = function(msg) {
var elem = document.getElementById('results_div');
elem.innerHTML = msg;
}
this.results__recv = function(msg_str) {
try {
var msg = JSON.parse(msg_str);
this.results__set(msg.msg_text);
return true;
} catch (err) {
alert(err);
return false;
}
}
}
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,59 @@
<div id='xo_msg_box' style='width:100%; color:red'>
</div>
<!--
<table class="metadata plainlinks ambox ambox-delete" style="">
<tr>
<td class="mbox-empty-cell">
</td>
<td class="mbox-text" style="">
<span class="mbox-text-span">
WARNING: THIS PAGE IS ONLY FOR DEVELOPER USE.<br/>
</span>
</td>
</tr>
</table>
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<b>Info</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Domain</b>: Domain of the wiki. Also supports <code>[xowa.app]</code> and <code>[file]</code></span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Db</b>: Database. Currently, only <code>core</code> or <code>user</code>. Can use path if <code>[file]</code></span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>SQL</b>: SQL to run</span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Results</b>: Results of SQL</div>
For more info, see <a href='/site/home/wiki/App/Personal_wikis/New_wiki'>the new wiki help page</a>
</div>
<b>Buttons</b>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_save'>&nbsp;</span><span class='xohelp_row_text'>Creates the wiki</span></div>
</div>
</div>
</div>
-->
<div class='main_body' id='main_body'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>
Run SQL
</div>
<a class='xoimg_btn_x24 xoimg_media_play' title='save changes' href='javascript:void(0)' accesskey='r'
onclick='xo.sql_exec.run_sql();'>&nbsp;</a>
<!-- <a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a> -->
</div>
<div class="xotbl_data_row cur_data_row">
<label>Domain</label>
<input id='domain_box' type='text' value='{{domain}}' class='cur_data_input' placeholder='Enter a domain (For example: wiki.me.org)'></input>
</div>
<div class="xotbl_data_row cur_data_row">
<label>DB</label>
<input id='db_box' type='text' value='{{db}}' class='cur_data_input' placeholder='Enter a db (For example: core)'></input>
</div>
<div class="xotbl_data_row cur_data_row" >
<label>SQL</label>
<textarea id='sql_box' class='cur_data_input' accesskey='d' placeholder='Enter SQL (For example: SELECT * FROM xowa_cfg).'>SELECT * FROM xowa_cfg;</textarea>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Results</label>
<pre id='results_div' class='cur_data_input'>waiting
</pre>
</div>
</div>

View File

@ -0,0 +1,67 @@
.cur_head_text {
width: calc(100% - 40px);
}
.cur_head_btns {
width: 40px;
}
.cur_data_row {
padding: 4px 0px 4px;
}
.cur_data_cell0 {
display: inline-block;
width: 220px;
margin: 0px 4px 0px 10px;
vertical-align: top;
align-self: flex-start;
-webkit-align-self: flex-start;
font-weight: bold;
}
.cur_data_cell1 {
display: inline-block;
width: calc(100% - 240px);
}
.release_is_major {
color: red;
}
.update_status {
margin: 10px 0px 10px;
}
.update_status_anch {
font-weight: bold;
font-size: 125%;
}
/* buttons */
.buttons a, .buttons button{
display:block;
float:left;
margin:0 7px 0 0;
background-color:#f5f5f5;
border:1px solid #dedede;
border-top:1px solid #eee;
border-left:1px solid #eee; font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
font-size:100%;
line-height:130%;
text-decoration:none;
font-weight:bold;
color:#565656;
cursor:pointer;
padding:5px 10px 6px 7px; /* Links */
}
.buttons button{
width:auto;
overflow:visible;
padding:4px 10px 3px 7px; /* IE6 */
}
.buttons button[type]{
padding:5px 10px 5px 7px; /* Firefox */
line-height:17px; /* Safari */
}
*:first-child+html button[type]{
padding:4px 10px 3px 7px; /* IE7 */
}
.buttons button img, .buttons a img{
margin:-10px 0px;
}

View File

@ -0,0 +1,45 @@
(function (xo) {
xo.app_updater = new function() {
var progbar = new xo.gui.progbars.Progbar('pbar-row', 'pbar-txt', 'pbar-bar');
this.update = function(version_name) {
try {
xo.notify.elem_anchor = '#main_body';
progbar.show();
xo.server.send_by_bridge('app.updater', 'install', {version: version_name});
} catch (e) {
alert(e);
}
};
this.skip = function(version_name) {
try {
xo.server.send_by_bridge('app.updater', 'skip', {version: version_name});
} catch (e) {
alert(e);
}
};
this.download__prog = function(msg) {
try {
var args = JSON.parse(msg);
if (args.done) {
progbar.write('done', 100);
return true;
}
progbar.write_by_notify(args.task_type + ' app update', args.prog_data_cur, args.prog_data_end, args.prog_rate);
return true;
} catch (e) {
alert(e);
}
};
this.write_status = function(msg) {
try {
var args = JSON.parse(msg);
progbar.write_by_notify(args.msg);
} catch (e) {
alert(e);
}
return true;
};
}
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,82 @@
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_app_system' >&nbsp;</span><span class='xohelp_row_text'>Go to the options page</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_help_doc' >&nbsp;</span><span class='xohelp_row_text'>Go to the docs page</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_app_install' >&nbsp;</span><span class='xohelp_row_text'>Install latest XOWA update</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_misc_skip' >&nbsp;</span><span class='xohelp_row_text'>Skip reminders for this update</span></div>
</div>
</div>
<div class='main_body' id='main_body'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>XOWA Version: {{current_version}} ({{current_date}})</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_app_system' title='go to options' href='/wiki/Special:XowaCfg?grp=xowa.app.update'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_help_doc' title='go to docs' href='/wiki/App/Setup/Update/In-app'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
{{#web_access_enabled}}
{{#itms_exist}}
<div class="xotbl_data_row cur_data_row">
<span class='cur_data_cell0'>&nbsp;</span>
<div class='cur_data_cell1 update_status'>
<div class='buttons'>
<a class='update_status_anch' title='download latest update' href='javascript:void(0)'
data_alertify_msg='Please confirm that you want to update to the latest XOWA version:<br/>{{version}} ({{date}}): {{summary}}'
data_alertify_ok='Download and update'
data_alertify_cancel='Cancel'
data_alertify_func='xo.app_updater.update("{{version}}");'
accesskey='d'
onclick='return xo.alertify.confirm_func(this);'><img class='xoimg_btn_x16 xoimg_app_install' />&nbsp;Install latest
</a>
</div>
<div class='buttons'>
<a class='update_status_anch' title='skip current update' href='javascript:void(0)'
data_alertify_msg='Please confirm that you want to ignore this update.<br/><br/>You can always return to this page by going to Help -> Update XOWA or navigating to <code>Special:XowaAppUpdate</code>'
data_alertify_ok='Skip update'
data_alertify_cancel='Cancel'
data_alertify_func='xo.app_updater.skip("{{version}}");'
accesskey='d'
onclick='return xo.alertify.confirm_func(this);'><img class='xoimg_btn_x16 xoimg_misc_skip' />&nbsp;Skip this update
</a>
</div>
<div class='pbar_row' id='pbar-row' style='float:right'>
<div class='pbar_proc' id='pbar-txt'>downloading app update</div>
<div class='pbar_div'>
<div class="pbar_bar" id='pbar-bar'>
</div>
</div>
</div>
</div>
</div>
{{#itms}}
<div class="xotbl_data_row cur_data_row">
<span class='cur_data_cell0'>{{date}}: {{version}}</span>
<div class='cur_data_cell1'><span {{#priority_is_major}} class='release_is_major'{{/priority_is_major}}>({{priority}}) {{summary}}</span><br/>
{{{details}}}
</div>
</div>
{{/itms}}
{{/itms_exist}}
{{^itms_exist}}
<div class="xotbl_data_row cur_data_row">
<span class='cur_data_cell0'>&nbsp;</span>
<span class='cur_data_cell1 update_status'>No updates available as of {{check_date}}</span>
</div>
{{/itms_exist}}
{{/web_access_enabled}}
{{^web_access_enabled}}
<div class="xotbl_data_row cur_data_row">
<span class='cur_data_cell0'>&nbsp;</span>
<div class='cur_data_cell1'>
<span style='color:red'>Web access disabled.</span><br/>
In order to use this page, please do the following:
<ul>
<li>Enable web access at <a href='/site/home/wiki/Options/Security'>Options/Security</a></li>
<li>Reload this page</li>
</ul>
</div>
</div>
{{/web_access_enabled}}
</div>

Binary file not shown.

View File

@ -0,0 +1,73 @@
.cur_head_text {
width: calc(100% - 32px);
}
.cur_head_btns {
width: 32px;
}
.cur_head_text_2 {
width: calc(100% - 64px);
}
.cur_head_btns_2 {
width: 64px;
}
.cur_head_text__available__caption {
width: calc(100% - 32px);
}
.cur_head_text__available__combo {
width: calc(100% - 120px);
}
.task_tbl {
width: 100%;
margin: 0px 0px 8px; /* vertical-space inbetween tables */
font-size: .85em;/* needed for kit-kat else text will overflow */
}
.head_name {
display: inline-block;
width: calc(100% - 32px);
font-weight: bold;
}
.task_name {
display: inline-block;
width: calc(100% - 32px);
}
.work_row {
display:block !important;
height: 100%;
}
.work_btn_disabled {opacity: .2;}
/* pbar */
.pbar_row {
width: 100%;
height: 100%; /* depend on auto-size */
padding: 2px 0 2px;
}
.pbar_row_1 {
margin: -4px 0px 2px;
}
.pbar_step {
padding: 0px 0px 0px 44px;
}
.pbar_proc {
padding: 0px 0px 0px 44px;
font-variant: small-caps;
}
.pbar_div {
height: 2px;
margin: 2px 4px 2px 44px;
width: calc(100% - 50px);
background-color: #f5f5f5;
border-radius: 4px;
}
.pbar_bar {
width: 0%;
height: 100%;
background-color: #5cb85c;
border-radius: 4px;
}

View File

@ -0,0 +1,128 @@
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<b>Quick start</b>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_add'>&nbsp;</span><span class='xohelp_row_text'>Add <b>Simple Wikipedia - Articles</b> to the queue</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_media_play'>&nbsp;</span><span class='xohelp_row_text'>Download <b>Simple Wikipedia - Articles</b></span></div>
{{#app_is_drd}}
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Choose XOWA from the menu and open "simple.wikipedia.org"</span></div>
{{/app_is_drd}}
{{^app_is_drd}}
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Reload the page, open the wikis menu in the left-hand nav and click "simple.wikipedia.org"</span></div>
{{/app_is_drd}}
</div>
<br/>
<b>Notes</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Please make sure you are on Wi-Fi when downloading! Most wikis will be many MB or even GB.</span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Download Central supports pause and resume. Pause the task (or close the app) and resume later.</span></div>
</div>
<br/>
<b>Buttons</b>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_fsys_dir'>&nbsp;</span><span class='xohelp_row_text'>Select a folder location for the wikis</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_inet_download'>&nbsp;</span><span class='xohelp_row_text'>Download the latest list of wikis from archive.org</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_add'>&nbsp;</span>
<span class='xohelp_row_text'>Move a task to the queue</span>
</div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_remove'>&nbsp;</span>
<span class='xohelp_row_text'>(In the queue table) Remove a task from the queue. All work will be lost</span>
</div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_remove'>&nbsp;</span>
<span class='xohelp_row_text'>(In the imported table) Remove the task from imported and place it back in the available table</span>
</div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_media_play'>&nbsp;</span>
<span class='xohelp_row_text'>Start the queue</span>
</div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_media_pause'>&nbsp;</span>
<span class='xohelp_row_text'>Pause the queue</span>
</div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_refresh'>&nbsp;</span>
<span class='xohelp_row_text'>Restart a failed task from the last known step</span>
</div>
</div>
{{^app_is_drd}}
<br/>
<b>Links</b>
<div>
<div class='xohelp_row'><span class='xohelp_link'>&nbsp;</span><span class='xohelp_row_text'><b>Help</b>: <a href='{{link_help}}'>Information about Download Central</a></span></div>
</div>
{{/app_is_drd}}
</div>
</div>
<div class='main_body' id='main_body'>
<div class='task_tbl' data-name='work__tbl'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text_2'>Queue</div>
<div class='xotbl_head_btns cur_head_btns_2'>
<a class='xoimg_btn_x24 xoimg_fsys_dir' title='select xowa folder' href="/site/home/wiki/Special:XowaRootDir">&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
<div id='head__row'></div>
<div id="work__tbl"></div>
</div>
<div class='task_tbl' data-name='todo__tbl'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text__available__caption'>Available</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_inet_download' title='download database' href='javascript:void(0)'
data_alertify_msg='Please confirm that you want to download the latest list of wikis from archive.org.<br/><br/>Please note that updates are usually released on a weekly basis.'
data_alertify_ok='Download'
data_alertify_cancel='Cancel'
data_alertify_func='xo.bldr.todo.download_db__send();'
onclick='return xo.alertify.confirm_func(this);'>&nbsp;</a>
</div>
</div>
<div class='xotbl_head_row'>
<div class='xotbl_head_text'>Lang:
<select id='filter_langs' href='javascript:void(0)' onchange='xo.bldr.todo.filter__send();'>
<option value='*' selected='selected'>All</option>
<option value='en'>English</option>
<option value='de'>German</option>
<option value='fr'>French</option>
<option value='pl'>Polish</option>
<option value='ar'>Arabic</option>
<option value='cs'>Czech</option>
<option value='ht'>Haitian</option>
</select>
</div>
<div class='xotbl_head_text'>Type:
<select id='filter_types' href='javascript:void(0)' onchange='xo.bldr.todo.filter__send();'>
<option value='*' selected='selected'>All</option>
<option value='wikipedia'>Wikipedia</option>
<option value='wiktionary'>Wiktionary</option>
<option value='wikisource'>Wikisource</option>
<option value='wikivoyage'>Wikivoyage</option>
<option value='wikiquote'>Wikiquote</option>
<option value='wikibooks'>Wikibooks</option>
<option value='wikiversity'>Wikiversity</option>
<option value='wikinews'>Wikinews</option>
<option value='wikimisc'>Others</option>
</select>
</div>
</div>
<div id='todo__tbl'></div>
</div>
<div class='task_tbl' data-name='done__tbl'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>Imported</div>
</div>
<div id='done__tbl'></div>
</div>
<div style='display:none;' data-name='test panel'>
<div id='xowa_err_div'></div>
<div style='padding-bottom:5px;'>
<button class='admin_btn' accesskey='a' id='admin__add_work__btn'>add work</button>&nbsp;
</div>
<div>
<button class='admin_btn' accesskey='d' id='admin__del_work__btn'>del work</button>&nbsp;
</div>
<div>
<button class='admin_btn' accesskey='r' id='admin__run_next__btn'>run next</button>&nbsp;
</div>
<div>
<button class='admin_btn' accesskey='p' id='admin__stop_cur__btn'>stop all</button>&nbsp;
</div>
</div>
</div>

View File

@ -0,0 +1,45 @@
{{#row_is_work}}
<div class='xotbl_data_row work_row' id='{{row_type}}:{{task_id}}:row' data-sort='{{task_sort}}'>
<div class='flex_div'>
<a id='{{row_type}}:{{task_id}}:del_work' class='xoimg_btn_x24 xoimg_list_remove' href='javascript:void(0)' onclick='xo.bldr.work.del_work__send("{{task_id}}");'>&nbsp;</a>
<div class='task_name' id='{{row_type}}:{{task_id}}:name'>{{{task_name}}}</div>
</div>
<div class='pbar_row flex_div pbar_row_1' id='{{row_type}}:{{task_id}}:step-row'>
<span class='pbar_step' id='{{row_type}}:{{task_id}}:step-name'>{{{step.step_name}}}</span>
</div>
<div class='pbar_row' id='{{row_type}}:{{task_id}}:pbar-row'>
<div class='pbar_proc' id='{{row_type}}:{{task_id}}:pbar-txt'>{{{prog_msg}}}</div>
<div class='pbar_div'>
<div class="pbar_bar" id='{{row_type}}:{{task_id}}:pbar-bar'>
</div>
</div>
</div>
</div>
{{/row_is_work}}
{{^row_is_work}}
<div class='xotbl_data_row flex_div' id='{{row_type}}:{{task_id}}:row' data-sort='{{task_sort}}'>
{{#row_is_head}}
<a id='{{row_type}}:{{task_id}}:run_next' class='xoimg_btn_x24 xoimg_media_play work_btn_disabled' href='javascript:void(0)' onclick='xo.bldr.work.run_next__send("{{task_id}}");'>&nbsp;</a>
{{/row_is_head}}
{{#row_is_todo}}
<a id='{{row_type}}:{{task_id}}:add_work' class='xoimg_btn_x24 xoimg_list_add' href='javascript:void(0)' onclick='xo.bldr.todo.add_work__send("{{task_id}}");'>&nbsp;</a>
{{/row_is_todo}}
{{#row_is_done}}
<a id='{{row_type}}:{{task_id}}:del_done' class='xoimg_btn_x24 xoimg_list_remove' href='javascript:void(0)' onclick='xo.bldr.done.del_done__send("{{task_id}}");'>&nbsp;</a>
{{/row_is_done}}
{{#row_is_head}}
<div class="head_name">
<span id='{{row_type}}:{{task_id}}:name'>{{{task_name}}}</span>
<!--&nbsp;&middot;<span id='{{row_type}}:{{task_id}}:size'>{{prog_data_end_str}}</span>-->
<!--&middot;<span id='{{row_type}}:{{task_id}}:time'>{{prog_time_end_str}}</span>-->
</div>
{{/row_is_head}}
{{^row_is_head}}
<div class='task_name' id='{{row_type}}:{{task_id}}:name'>{{{task_name}}}</div>
{{#row_is_todo}}
<a id='{{row_type}}:{{task_id}}:add_work' class='xoimg_btn_x24 xoimg_list_remove' href='javascript:void(0)' onclick='xo.bldr.todo.del_todo__send("{{task_id}}");'>&nbsp;</a>
{{/row_is_todo}}
<a class='xoimg_btn_x24 xoimg_help_info' href='/site/home/wiki/Special:XowaDownloadCentralInfo?task_id={{task_id}}'>&nbsp;</a>
{{/row_is_head}}
</div>
{{/row_is_work}}

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>xo.elem</title>
<link rel="stylesheet" href="file:///C:/xowa/bin/any/xowa/html/res/lib/qunit/qunit-1.23.1.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="file:///C:/xowa/bin/any/xowa/html/res/lib/qunit/qunit-1.23.1.js"></script>
<script src='xo.elem.js'></script>
<script src='xo.elem.test.js'></script>
</body>
</html>

View File

@ -0,0 +1,33 @@
/*jslint node: true */
"use strict";
var QUnit = window.QUnit;
var xo = window.xo;
QUnit.module("elem", {
beforeEach: function (assert) {
xo.mode_is_debug = false;
}
// afterEach: function( assert ) {}
});
QUnit.test("get.null", function (assert) {
assert.notOk(xo.elem.get('missing'));
});
QUnit.test("make.body", function (assert) {
var rslt = xo.elem.make(null, 'div', 'make_body_1');
assert.equal(rslt.nodeName, 'DIV');
assert.equal(rslt.id, 'make_body_1');
assert.equal(rslt.parentElement, document.documentElement);
assert.equal(rslt, document.getElementById('make_body_1'));
});
QUnit.test("make.owner", function (assert) {
var make_owner_1 = xo.elem.make(null, 'div', 'make_owner_1'),
make_owner_2 = xo.elem.make('make_owner_1', 'div', 'make_owner_2');
assert.equal(make_owner_2.id, 'make_owner_2');
assert.equal(make_owner_2.parentElement, make_owner_1);
assert.equal(make_owner_2, document.getElementById('make_owner_2'));
});
QUnit.test("bind", function (assert) {
var elem_1 = xo.elem.make(null, 'span', 'bind_1');
xo.elem.bind_onclick(function () {return 'test'; }, 'bind_1');
var actl = elem_1.onclick();
assert.equal('test', actl);
});

View File

@ -0,0 +1,39 @@
(function (xo) {
"use strict";
xo.mode_is_debug = false;
xo.elem = new function () {
this.get = function (elem_id) {
var rv = document.getElementById(elem_id);
if (!rv && xo.mode_is_debug) {
alert('elem is null: ' + elem_id);
}
return rv;
};
this.make = function (owner_id, elem_type, elem_id) {
var rv = document.createElement(elem_type);
if (elem_id) {rv.id = elem_id; }
var owner_elem = owner_id ? this.get(owner_id) : document.documentElement;
if (!owner_elem && xo.mode_is_debug) {
alert('owner elem is null: ' + owner_id);
}
owner_elem.appendChild(rv);
return rv;
};
this.del = function (elem_id) {
xo.log.add(1, 'elem.del.bgn', 'elem_id', elem_id);
var elem = document.getElementById(elem_id);
elem.parentNode.removeChild(elem);
return true;
};
this.bind_onclick = function (func_obj, elem_id) {
this.bind(func_obj, 'onclick', elem_id);
}
this.bind = function (func_obj, func_name, elem_id) {
var elem = this.get(elem_id);
elem[func_name] = func_obj;
};
};
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,28 @@
(function (xo, $) {
xo.notify = new function() {
this.elem_anchor = '';
this.show = function(msg) {
$(this.elem_anchor).notify(msg, {className:'success', elementPosition:'top center', globalPosition:'top center', style:'xostyle'
, autoHideDelay: 3000
, showDuration: 500
, hideDuration: 500
});
}
this.init = function() {
$.notify.addStyle('xostyle', {
html: "<div><span data-notify-html/></div>",
classes: {
base: {
"margin-top":"40px",
"white-space": "nowrap",
"background-color": "#5cb85c",
"padding": "5px",
"color":"white",
"text-align": "center",
},
}
});
}
};
xo.notify.init();
}(window.xo = window.xo || {}, jQuery));

View File

@ -0,0 +1,33 @@
(function (xo) {
xo.tmpl = new function () {
this.fmt = function (tmpl_elem_id, elem, data) {
var tmpl_elem = document.getElementById(tmpl_elem_id);
var fmt = tmpl_elem.textContent;
var html = Mustache.render(fmt, data);
elem.insertAdjacentHTML('beforebegin', html);
elem.parentNode.removeChild(elem);
return html;
}
this.load_many = function () {
var len = arguments.length;
var dir = arguments[0];
for (var i = 1; i < len; ++i) {
this.load(dir, arguments[i]);
}
};
this.load = function (dir, fmt_name) {
var path = dir + fmt_name + ".mustache.html";
var req = new XMLHttpRequest();
req.onload = function (e) {
var template = req.responseText;
var elem = document.createElement('script');
elem.id = fmt_name;
elem.type = 'text/mustache';
elem.textContent = template;
document.head.appendChild(elem);
}
req.open("GET", path, true); // 'false': synchronous.
req.send(null);
};
}
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,536 @@
xo.log.add(1, 'bldr.central:init');
(function (xo) {
xo.bldr = xo.bldr || {};
xo.bldr.core = new function() {
// list of all top-tasks and sub-tasks
this.regy = {};
this.rates = {};
this.STATUS = {
INIT : 1,
WORK : 2,
DONE : 4,
SUSPENDED : 16,
}
this.EXEC = {
RUN : 1,
STOP : 2,
REDO : 3,
}
/*
this.rates =
{ 'gplx.xowa.core.security.verify' : 1000000
}
*/
// utility functions
this.get_uid = function(tbl, task_id, type) {return tbl + ':' + task_id + ':' + type;}
this.get_elem = function(tbl, task_id, type) {return xo.elem.get(this.get_uid(tbl, task_id, type));}
this.send = function(proc, args) {
xo.server.send(
{ cmd: 'builder_central.exec'
, data:
{ proc: proc
, args: args
}
}
);
}
// reload work, todo, done data
this.reload__send = function() {this.send('reload', {});};
this.reload__recv = function(msg) {this.reload(JSON.parse(msg)); return true;};
this.reload = function(msg) {
xo.log.add(1, 'xo.bldr.core.reload:bgn');
this.reload_list(msg, 'work');
this.reload_list(msg, 'todo');
this.reload_list(msg, 'done');
this.init_filter(msg);
xo.log.add(1, 'xo.bldr.core.reload:end');
};
this.reload_list__recv = function(msg) {
var msg_as_json = JSON.parse(msg);
this.reload_list(msg_as_json, msg_as_json.lists.list_name);
return true;
};
this.reload_list = function(msg, list_name) {
var list = msg.lists[list_name];
var list_wkr = xo.bldr[list_name];
if (!list) return;
list_wkr.clear_list();
this.delete_subs(list_name + '__tbl');
var len = list.length;
xo.log.add(1, 'xo.bldr.core.reload:list', list_name, len);
for (var i = 0; i < len; ++i) {
var task = list[i];
this.regy[task.task_id] = task;
list_wkr.add_task(task);
}
}
this.delete_subs = function(elem_id) {
var elem = xo.elem.get(elem_id);
while (elem.lastChild) {
elem.removeChild(elem.lastChild);
}
}
this.init_filter = function(msg) {
document.getElementById("filter_types").value = msg.filters.types.active;
var filter_select = document.getElementById("filter_langs");
this.clear_select(filter_select);
var len = msg.langs.length;
for (var i = 0; i < len; i++) {
var lang_nde = msg.langs[i];
var opt = document.createElement('option');
opt.value = lang_nde.key;
opt.text = lang_nde.name;
filter_select.appendChild(opt);
}
return true;
};
this.clear_select = function(cbo) {
var len = cbo.options.length;
for (i = 0; i < len; i++) {
cbo.options[0] = null;
}
}
// create a row based on type and nde
this.create_row = function(type, nde) {
var row;
if (type == 'work') {
row = xo.elem.make('work__tbl', 'div');
nde.row_type = 'work';
nde.row_is_head = false;
nde.row_is_work = true;
nde.row_is_todo = false;
nde.row_is_done = false;
}
else if (type == 'head') {
row = xo.elem.make('head__row', 'div');
nde.row_type = 'head';
nde.row_is_head = true;
nde.row_is_work = false;
nde.row_is_todo = false;
nde.row_is_done = false;
nde.task_id = '0';
}
else if (type == 'todo') {
row = xo.elem.make('todo__tbl', 'div');
nde.row_type = 'todo';
nde.row_is_head = false;
nde.row_is_work = false;
nde.row_is_todo = true;
nde.row_is_done = false;
}
else if (type == 'done') {
row = xo.elem.make('done__tbl', 'div');
nde.row_type = 'done';
nde.row_is_head = false;
nde.row_is_work = false;
nde.row_is_todo = false;
nde.row_is_done = true;
}
xo.tmpl.fmt('xobc.row', row, nde);
return row;
}
// transfer node
this.transfer__recv = function(msg_str) {
var msg = JSON.parse(msg_str);
this.transfer(msg.src, msg.trg, msg.task);
return true;
}
this.transfer = function(src, trg, task) {
var task_id = task.task_id;
xo.log.add(1, 'xo.bldr.core.transfer:bgn', src, trg, task_id);
// del src
delete(xo.bldr[src].regy[task_id]);
xo.elem.del(xo.bldr.core.get_uid(src, task_id, 'row'));
xo.bldr[src].del_task(task);
// add trg
xo.bldr[trg].add_task(task);
// add to correct sort-order
if (trg != 'work') {// do not reorder work table; work has a sort based on add-order
// get trg row, trg_tbl
var trg_row = xo.bldr.core.get_elem(trg, task_id, 'row');
var trg_sort = parseInt(trg_row.getAttribute('data-sort'));
var trg_tbl = xo.elem.get(trg + '__tbl');
var trg_subs = trg_tbl.children;
var trg_subs_len = trg_subs.length;
if (trg_subs_len > 1) { // do not reorder if only 1 item;
// loop rows until trg_seqn found
for (var i = 0; i < trg_subs_len; i++) {
var tmp_row = trg_subs[i];
var tmp_sort = parseInt(tmp_row.getAttribute('data-sort'));
if (tmp_sort >= trg_sort) {
try {trg_row.parentNode.insertBefore(trg_row, tmp_row);}
catch (e) {alert(e);}
break;
}
}
}
}
xo.bldr.work.head__update();
xo.log.add(1, 'xo.bldr.core.transfer:end');
}
// get next active sub nde; currently used by make function
this.get_next_nde = function(nde) {
for (var sub_key in nde.subs) {
var sub = nde.subs[sub_key];
if ( sub.task_status == xo.bldr.core.STATUS.INIT
|| sub.task_status == xo.bldr.core.STATUS.WORK
|| sub.task_status == xo.bldr.core.STATUS.SUSPENDED
) {
return sub;
}
}
return null;
}
this.get_elem_height_in_px = function(elem_id) {
var elem = xo.elem.get(elem_id);
if (elem.offsetHeight) {
return elem.offsetHeight;
} else if (elem.style.pixelHeight) {
return elem.style.pixelHeight;
}
return -1;
}
this.count = function(o) {
var rv = 0;
for (k in o) {
if (o.hasOwnProperty(k)) {
++rv;
}
}
return rv;
}
};
xo.bldr.todo = new function() {
this.regy = {};
this.clear_list = function() {for (var itm in this.regy) delete this.regy[itm];}
this.add_task = function(task) {
xo.bldr['todo'].regy[task.task_id] = task;
xo.bldr.core.create_row('todo', task);
}
this.del_task = function(task) {}
this.add_work__send = function(task_id) {
var task = xo.bldr['todo'].regy[task_id];
// if (xo.app.mode === 'drd') {
// xo.alertify.confirm_show('This task will download a lot of data!<br/><br/>Please make sure you are on Wi-Fi,<br/>or you will incur data charges.<br/><br/>Are you sure you want to continue?', 'Continue', 'Cancel'
// , function() {xo.bldr.todo.add_work__send__confirm_y(task_id);});
// }
// else {
xo.bldr.todo.add_work__send__confirm_y(task_id);
// }
}
this.add_work__send__confirm_y = function(task_id) {
xo.log.add(1, 'xo.bldr.todo.add_work', task_id);
xo.bldr.core.send('add_work', {task_id: task_id});
};
this.del_todo__send = function(task_id) {
var task = xo.bldr['todo'].regy[task_id];
xo.bldr.core.send('del_todo', {task_id: task_id});
}
this.download_db__send = function() {
xo.bldr.core.send('download_db', {});
};
this.filter__send = function() {
var lang_key = document.getElementById("filter_langs").value;
var type_key = document.getElementById("filter_types").value;
xo.log.add(1, 'xo.bldr.todo.filter', lang_key);
xo.bldr.core.send('filter_todo', {'lang_key': lang_key, 'type_key': type_key});
};
};
xo.bldr.done = new function() {
this.regy = {};
this.clear_list = function() {for (var itm in this.regy) delete this.regy[itm];}
this.add_task = function(task) {
xo.bldr['done'].regy[task.task_id] = task;
xo.bldr.core.create_row('done', task);
}
this.del_task = function(task) {}
this.del_done__send = function(task_id) {
// xo.alertify.confirm_show('Are you sure you want to move this task back into the available list?', 'Yes', 'No'
// , function() {xo.bldr.done.del_done__send__confirm_y(task_id);});
xo.log.add(1, 'xo.bldr.done.del_done', task_id);
xo.bldr.core.send('del_done', {task_id: task_id});
}
this.del_done__send__confirm_y = function(task_id) {
// xo.log.add(1, 'xo.bldr.done.del_done', task_id);
// xo.bldr.core.send('del_done', {task_id: task_id});
};
};
xo.bldr.work = new function() {
this.regy = {};
// called by transfer
this.clear_list = function() {for (var itm in this.regy) delete this.regy[itm];}
this.add_task = function(task) {
xo.bldr['work'].regy[task.task_id] = task;
// var nde_nxt = xo.bldr.core.get_next_nde(nde);
var step = task.step;
var cmd = step.cmd;
var pct = (cmd.prog_data_cur * 100) / cmd.prog_data_end;
task.prog_msg = xo.bldr.work.prog__msg_make(cmd.cmd_name, pct, xo.time.to_dhms(cmd.prog_time_end), cmd);
xo.bldr.core.create_row('work', task);
xo.bldr.core.get_elem('work', task.task_id, 'pbar-bar').style.width = pct + '%';
this.run_btn__update(true, xo.bldr.core.EXEC.RUN);
}
this.del_task = function(task) {
if (xo.bldr.core.count(this.regy) === 0) {
this.run_btn__update(false, xo.bldr.core.EXEC.RUN);
}
}
// called by server when item is first added
this.init__recv = function(msg_str) {
var msg = JSON.parse(msg);
var task_id = msg.task_id;
var nde = xo.bldr.core.regy[task_id];
nde.task_status = xo.bldr.core.STATUS.INIT;
nde.prog_data_cur = 0;
return true;
}
// called when "-" clicked
this.del_work__send = function(task_id) {
var task = xo.bldr.work.regy[task_id];
if (task.task_status != xo.bldr.core.STATUS.INIT) {
xo.alertify.confirm_show('Are you sure you want to remove the task and lose all work?', 'Yes', 'No'
, function() {xo.bldr.work.del_work__send__confirm_y(task, task_id);});
}
else {
this.del_work__send__confirm_y(task, task_id);
}
}
this.del_work__send__confirm_y = function(task, task_id) {
task.task_status = xo.bldr.core.STATUS.INIT;
xo.bldr.core.send('del_work', {task_id: task_id});
}
this.run_next__send = function() {xo.bldr.core.send('run_next', {});}
this.redo_cur__send = function() {
xo.bldr.core.send('redo_cur', {});
}
this.stop_cur__send = function() {xo.bldr.core.send('stop_cur', {});}
this.stop_cur__recv = function(msg) {xo.bldr.work.stop_cur(JSON.parse(msg)); return true;}
this.stop_cur = function(args) {
var task_id = args.task_id;
this.run_btn__update(true, xo.bldr.core.EXEC.RUN);
this.del_btn__update(task_id, true);
}
// called when task started
this.prog__start__recv = function(task_str) {
var task = JSON.parse(task_str);
xo.bldr.work.regy[task.task_id] = task; // overwrite task with new cmd
xo.bldr.core.get_elem('work', task.task_id, 'step-name').innerHTML = task.step.step_name;
var msg_elem = xo.bldr.core.get_elem('work', task.task_id, 'pbar-txt');
msg_elem.style.backgroundColor = 'initial';
this.run_btn__update(task.step.cmd.cmd_suspendable, xo.bldr.core.EXEC.STOP);
this.del_btn__update(task.task_id, false);
return true;
}
this.run_btn__update = function(enabled, exec_type) {
var btn = xo.bldr.core.get_elem('head', '0', 'run_next');
btn.style.opacity = enabled ? '1.0' : '0.2';
switch (exec_type) {
case xo.bldr.core.EXEC.RUN:
btn.className = 'xoimg_btn_x24 xoimg_media_play';
btn.onclick = function() {return xo.bldr.work.run_next__send();};
break;
case xo.bldr.core.EXEC.STOP:
btn.className = 'xoimg_btn_x24 xoimg_media_pause';
btn.onclick = function() {return xo.bldr.work.stop_cur__send();};
break;
case xo.bldr.core.EXEC.REDO:
btn.className = 'xoimg_btn_x24 xoimg_list_refresh';
btn.onclick = function() {return xo.bldr.work.redo_cur__send();};
break;
}
}
this.del_btn__update = function(task_id, enabled) {
var btn = xo.bldr.core.get_elem('work', task_id, 'del_work');
btn.disabled = !enabled;
btn.style.opacity = enabled ? '1.0' : '0.2';
}
// update head row
this.head__update = function() {
// calculate stats
var head_item_len = 0;
var head_data_end = 0;
var head_time_cur = 0;
var head_time_end = 0;
for (var nde_key in this.regy) {
var nde = this.regy[nde_key];
head_item_len += 1;
head_data_end += nde.prog_data_end;
head_time_cur += nde.prog_time_end - nde.prog_time_cur;
head_time_end += nde.prog_time_end;
}
// update ui
xo.elem.get('head:0:name').textContent = head_item_len + ' item(s)';
// xo.elem.get('head:0:size').textContent = xo.iosize.to_str(head_data_end);
// xo.elem.get('head:0:time').textContent = xo.time.to_dhms(head_time_cur);
}
this.prog__update__recv = function(msg) {xo.bldr.work.prog__update(JSON.parse(msg)); return true;}
this.prog__update = function(args) {
// calc time_til
var prog_data_cur = args.prog_data_cur;
var prog_data_end = args.prog_data_end;
var cur_rate = args.prog_rate;
var time_til = (prog_data_end - prog_data_cur) / cur_rate;
var time_til_str = xo.time.to_dhms(Math.ceil(time_til));
// update cmd
var task_id = args.task_id;
var task = xo.bldr.work.regy[task_id];
var cmd = task.step.cmd;
cmd.prog_data_cur = prog_data_cur;
cmd.prog_time_cur = prog_data_cur / cur_rate;
// update pbar
var pct = (prog_data_cur / prog_data_end);
var prog_msg = xo.bldr.work.prog__msg_make(cmd.cmd_name, (pct * 100), time_til_str, cmd);
xo.bldr.core.get_elem('work', task_id, 'pbar-txt').innerHTML = prog_msg;
xo.bldr.core.get_elem('work', task_id, 'pbar-bar').style.width = (pct * 100) + '%';
/*
// update top_nde time;
var top_subs = top_nde.subs;
var top_subs_len = top_subs.length;
var top_time_cur = 0, top_time_end = 0;
for (var i = 0; i < top_subs_len; ++i) {
var sub_nde = top_subs[i];
top_time_cur += sub_nde.prog_time_cur;
top_time_end += sub_nde.prog_time_end;
}
top_nde.prog_time_cur = top_time_cur;
top_nde.prog_time_end = top_time_end;
*/
xo.bldr.work.head__update();
}
this.prog__msg_make = function(name, percent, time_til_str, cmd) {
var prog_data_cur_str = xo.iosize.to_str(cmd.prog_data_cur);
var prog_data_end_str = xo.iosize.to_str(cmd.prog_data_end);
return name + ': ' + (percent | 0) + '% &middot; ' + time_til_str + ' &middot; ' + prog_data_cur_str + ' / ' + prog_data_end_str;
}
this.prog__done__recv = function(msg) {xo.bldr.work.prog__done(JSON.parse(msg)); return true;}
this.prog__done = function(args) {
xo.log.add(1, 'prog__done.bgn', args);
var task_id = args.task_id;
var task_is_done = args.task_is_done;
var task = xo.bldr.work.regy[task_id];
var cmd = task.step.cmd;
task.task_status = xo.bldr.core.STATUS.INIT;
xo.notify.show(cmd.cmd_name + ' done');
// if last, show extra notification
if (task_is_done) {
xo.notify.show(task.task_name + ' done');
// this.run_btn__update(false, true);
}
xo.log.add(1, 'prog__done.end', args);
}
this.prog__fail__recv = function(msg) {xo.bldr.work.prog__fail(JSON.parse(msg)); return true;}
this.prog__fail = function(args) {
var task_id = args.task_id;
var err = args.err;
var resume = args.resume;
var task = xo.bldr.work.regy[task_id];
// update msg
var msg_elem = xo.bldr.core.get_elem('work', task.task_id, 'pbar-txt');
msg_elem.innerHTML = task.step.cmd.cmd_name + ' failed: ' + err;
if (resume)
this.run_btn__update(true, xo.bldr.core.EXEC.RUN);
else
this.run_btn__update(true, xo.bldr.core.EXEC.REDO);
this.del_btn__update(task.task_id, true);
};
this.prog__stat__recv = function(msg) {xo.bldr.work.prog__stat(JSON.parse(msg)); return true;}
this.prog__stat = function(args) {
var task_id = args.task_id;
var msg = args.msg;
var task = xo.bldr.work.regy[task_id];
// update msg
var msg_elem = xo.bldr.core.get_elem('work', task.task_id, 'pbar-txt');
msg_elem.innerHTML = task.step.cmd.cmd_name + ' status: ' + msg;
};
this.rate__update__recv = function(msg) {xo.bldr.work.rate__update(JSON.parse(msg)); return true;}
this.rate__update = function(args) {
xo.bldr.core.rates[args.task_type] = args.task_rate;
xo.bldr.work.head__update();
}
}
xo.admin = new function() {
this.add_work = function() {
for (var nde_key in xo.bldr.todo.regy) {
xo.bldr.todo.add_work__send(nde_key);
break;
}
}
this.del_work = function() {
for (var task_id in xo.bldr.work.regy) {
xo.bldr.work.del_work__send(task_id);
break;
}
}
this.run_next = function() {
xo.bldr.work.run_next__send();
}
this.stop_cur = function() {
xo.bldr.work.stop_cur__send();
}
}
}(window.xo = window.xo || {}));
// general init
setTimeout(function() { // wait for mustache to load files async
// initialize buttons
xo.log.add(2, 'bldr.central:init buttons');
xo.elem.bind_onclick(xo.admin.add_work, 'admin__add_work__btn');
xo.elem.bind_onclick(xo.admin.del_work, 'admin__del_work__btn');
xo.elem.bind_onclick(xo.admin.run_next, 'admin__run_next__btn');
xo.elem.bind_onclick(xo.admin.stop_cur, 'admin__stop_cur__btn');
// load head; note: must go before reload b/c reload updates head elements
xo.log.add(2, 'bldr.central:init head');
xo.bldr.core.create_row('head', {});
// request initialization
xo.log.add(2, 'bldr.central:init reload');
xo.bldr.core.reload__send();
xo.bldr.work.head__update();
// initialize notify
xo.log.add(2, 'bldr.central:init notify');
xo.notify.elem_anchor = '#head__row';
}, 0); // was 400

View File

@ -0,0 +1,279 @@
(function (xo) {
xo.server.send = function(root) {
xo.log.add(1, 'xo.server', JSON.stringify(root));
var proc_name = root.data.proc;
if (proc_name == 'reload') {
xo.bldr.core.reload__recv(JSON.stringify(
{ lists:
{ todo:
[
{ task_type: 'gplx.xowa.bldr.wikis.copy_part'
, task_name: 'simple.wikipedia.org: file'
, task_id : 's.w-2016.03-file'
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
, subs:
[
{ task_type : 'xowa.core.http.download'
, task_name : 'download'
, task_id : 's.w-2016.03-file-download'
, task_top_uid : 's.w-2016.03-file'
, task_suspendable: true
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
}
, { task_type : 'gplx.xowa.core.security.verify'
, task_name : 'verify'
, task_id : 's.w-2016.03-file-verify'
, task_top_uid : 's.w-2016.03-file'
, task_suspendable: false
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
}
]
}
, { task_type: 'gplx.xowa.bldr.wikis.copy_part'
, task_name: 'simple.wikipedia.org: html'
, task_id : 's.w-2016.03-html'
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
, subs:
[
{ task_type : 'xowa.core.http.download'
, task_name : 'download'
, task_id : 's.w-2016.03-html-download'
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
}
, { task_type : 'gplx.xowa.core.security.verify'
, task_name : 'verify'
, task_id : 's.w-2016.03-html-unzip'
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
}
]
}
]
, done:
[
{ task_type: 'gplx.xowa.bldr.wikis.copy_part'
, task_name: 'simple.wikipedia.org: file'
, task_id : 's.w-2016.03-file'
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
, subs:
[
{ task_type : 'xowa.core.http.download'
, task_name : 'download'
, task_id : 's.w-2016.03-file-download'
, task_top_uid : 's.w-2016.03-file'
, task_suspendable: true
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
}
, { task_type : 'gplx.xowa.core.security.verify'
, task_name : 'verify'
, task_id : 's.w-2016.03-file-verify'
, task_top_uid : 's.w-2016.03-file'
, task_suspendable: false
, prog_status: 1
, prog_data_cur : 0
, prog_data_end : 1819264175
}
]
}
]
}
}
));
}
else if (proc_name == 'add_work') {
xo.bldr.core.transfer__recv(JSON.stringify(
{ src:'todo'
, trg:'work'
, task:
{ task_id:root.data.args.task_id
, task_name: 'test queue'
, step:
{
step_name: 'step name'
, cmd:
{ cmd_name: 'download'
, prog_data_cur: 0
, prog_data_end: 100
, prog_time_end: 0
}
}
}
}));
}
else if (proc_name == 'del_work') {
xo.server.wkr.remove();
xo.bldr.core.transfer__recv(JSON.stringify({src:'work',trg:'todo',uid:root.data.args.task_id}));
}
else if (proc_name == 'run_next') {
var task_id = root.data.args.task_id;
var nde = xo.bldr.work.regy['s.w-2016.03-file'];
if (nde.started) {
xo.server.wkr.resume();
}
else {
nde.started = true;
var sub_nde = nde.subs[0]; // TODO: get next active node
var msgs = [];
msgs = msgs.concat(
[
{ proc:'xo.bldr.work.pause__visibility'
, args:
{ task_id:'s.w-2016.03-file-download'
}
}
]
);
msgs = msgs.concat(xo.server.msgs.make
( 5
, { proc:'xo.bldr.work.prog__update'
, args:
{ task_id: sub_nde.task_id
, prog_data_cur: function(ctx, nde) {
return (((ctx.idx + 1) * nde.prog_data_end) / ctx.max) | 0;
}
, prog_data_end: sub_nde.prog_data_end
}
}
));
/*
msgs = msgs.concat(
[
{ proc:'xo.bldr.work.prog__error'
, args:
{ task_id: sub_nde.task_id
, err: 'hash failed: expd=ff3d064ddd8373d1bada6f1c666cd501 actl=ff3d064ddd8373d1bada6f1c666cd501z'
}
}
]
);
*/
msgs = msgs.concat(
[
{ proc:'xo.bldr.work.prog__finished'
, args:
{ task_id: sub_nde.task_id
, prog_data_cur: sub_nde.prog_data_end
, prog_data_end: sub_nde.prog_data_end
}
}
]
);
msgs = msgs.concat(
[
{ proc:'xo.bldr.work.pause__visibility'
, args:
{ task_id:'s.w-2016.03-file-verify'
}
}
]
);
sub_nde = nde.subs[1]; // TODO: get next active node
msgs = msgs.concat(
xo.server.msgs.make
( 10
, { proc:'xo.bldr.work.prog__update'
, args:
{ task_id: sub_nde.task_id
, prog_data_cur: function(ctx, nde) {
return (((ctx.idx + 1) * nde.prog_data_end) / ctx.max) ;
}
, prog_data_end: sub_nde.prog_data_end
}
}
)
);
/*
*/
xo.server.wkr.start(msgs)
}
xo.bldr.work.run_next__recv(JSON.stringify({task_id:task_id}));
}
else if (proc_name == 'work__pause__send') {
xo.server.wkr.pause();
xo.bldr.work.pause__recv(JSON.stringify({task_id:root.data.args.task_id}));
}
};
xo.server.wkr = new function() {
this.time_interval = 500;
this.msg_idx = 0;
this.msg_end = 0;
this.run_handle = null;
this.paused = false;
this.msgs = null;
this.on_run = function() {
var wkr = xo.server.wkr;
var msg = wkr.msgs[wkr.msg_idx];
xo.server.msgs.get_by_path(this, msg.proc)(msg.args);
++wkr.msg_idx;
if (wkr.paused || wkr.msg_idx >= wkr.msg_end) {
this.clearInterval(wkr.run_handle);
}
}
this.start = function(msgs) {
this.msg_idx = 0;
this.msgs = msgs;
this.msg_end = msgs.length;
this.resume();
}
this.resume = function() {
this.paused = false;
this.run_handle = window.setInterval(this.on_run, this.time_interval);
}
this.pause = function() {
this.paused = true;
}
this.remove = function() {
this.paused = true;
this.msg_idx = 0;
}
}
xo.server.msgs = new function() {
this.get_by_path = function(obj, path){
for (var i = 0, path = path.split('.'), len = path.length; i < len; ++i){
obj = obj[path[i]];
};
return obj;
};
this.make = function(max, proto) {
var rv = [];
for (var idx = 0; idx < max; ++idx) {
var clone = clone_deep({idx:idx,max:max}, proto, {});
rv.push(clone);
}
return rv;
}
function clone_deep(ctx, proto, clone) {
for (var proto_key in proto) {
var proto_val = proto[proto_key];
if (proto_val instanceof Function) {
clone[proto_key] = proto_val(ctx, proto);
}
else if (proto_val instanceof Object) {
clone[proto_key] = clone_deep(ctx, proto_val, {});
}
else {
clone[proto_key] = proto_val;
}
}
return clone;
}
}
}(window.xo = window.xo || {}))

View File

@ -0,0 +1,114 @@
(function (xo) {
xo.time = new function() {
this.to_dhms = function(val, opts) {
var show_units = (opts && opts.show_units) ? opts.show_units : true;
var max_places = (opts && opts.max_places) ? opts.max_places : 2;
var rv = '';
var suffix = '';
var count = 0;
for (var i = 0; i < 4; ++i) {
// get factor and unit
var factor = 0;
var unit = '';
switch(i) {
case 0: unit = 'd'; factor = 86400; break;
case 1: unit = 'h'; factor = 3600; break;
case 2: unit = 'm'; factor = 60; break;
case 3: unit = 's'; factor = 1; break;
}
// calc cur and update val; EX: 3690 -> cur:1,mod:90
var cur = (val / factor) | 0;
val %= factor;
if (count == 0) { // no str yet
if ( cur == 0 // cur is 0; EX: 3690 and factor = 86400 -> 0 days; don't write anything
&& i != 3) // unless it is the seconds place; need to handle "0 s" specifically
continue;
suffix = unit; // set suffix
rv += cur; // write cur; note that this is not zero-padded
}
else { // str exists
if (cur < 10) rv += '0';
rv += cur; // write cur; note that this zero-padded; also, note will write "00" if cur == 0
}
if (++count == max_places) break; // stop if max-places reached; EX: 86400 should write 1:00, not 1:00:00:00
if (i != 3) // do not add ":" if seconds
rv += ':'
}
if (show_units) // add units; EX: " s" for seconds
rv += ' ' + suffix;
return rv;
}
/*
console.log(to_dhms(1));
console.log(to_dhms(30));
console.log(to_dhms(60));
console.log(to_dhms(600));
console.log(to_dhms(3600));
console.log(to_dhms(5025));
console.log(to_dhms(86400));
*/
}
xo.iosize = new function() {
this.to_str = function(val, opts) {
if (!val) return '0 B'; // handle undefined
var decimal_places = (opts && opts.decimal_places) ? opts.decimal_places : 2;
// init
var unit_idx = 0;
var mult = 1024;
var cur_val = val;
var cur_exp = 1;
var nxt_exp = mult;
// get 1024 mult; EX: 1512 -> 1024
for (unit_idx = 0; unit_idx < 6; ++unit_idx) {
if (cur_val < nxt_exp) break;
cur_exp = nxt_exp;
nxt_exp *= mult;
}
// calc integer / decimal values
var int_val = (val / cur_exp) | 0;
var dec_val = (val % cur_exp) | 0;
if (decimal_places == 0) { // if 0 decimal places, round up
if (dec_val >= .5) ++int_val;
dec_val = 0;
}
else {// else, calculate decimal value as integer; EX: 549 -> .512 -> 512
var dec_factor = 0;
switch (decimal_places) {
case 1: dec_factor = 10; break;
case 2: dec_factor = 100; break;
default:
case 3: dec_factor = 1000; break;
}
dec_val = ((dec_val * dec_factor) / cur_exp) | 0;
}
// calc unit_str
var unit_str = "";
switch (unit_idx) {
case 0: unit_str = " b"; break;
case 1: unit_str = " kb"; break;
case 2: unit_str = " mb"; break;
case 3: unit_str = " gb"; break;
case 4: unit_str = " pb"; break;
case 5:
default: unit_str = " eb"; break;
}
// build string
var rv = int_val;
if (decimal_places > 0 && unit_idx != 0) {
rv += '.' + dec_val;
}
rv += unit_str;
return rv;
}
/*
console.log(to_str((1024 * 1024) + 536871, {decimal_places : 1}));
console.log(to_str((1024 * 1024) + 536871, {decimal_places : 2}));
console.log(to_str((1024 * 1024) + 536871, {decimal_places : 3}));
*/
}
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--
NOTE: this page loads local files
- Chrome is the easiest browser for local files; Use "chrome.exe --disable-web-security"
- Change C:/xowa/ to wherever it is on your system
-->
<!-- base -->
<base href="file:///C:/xowa/" target="_blank">
<!-- css -->
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.core.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.bootstrap.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xocss_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xoimg_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/bldr/central/js/xo.log.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/bldr/central/bin/xobc.css">
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/alertify-0.3.11.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/xo-alertify-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/mustache/mustache-2.2.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/jquery/jquery-1.11.3.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/notifyjs/notifyjs-0.3.1.js"></script>
</head>
<body>
<div id='bldr_body' class='bldr_body'></div>
</body>
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xo.log.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xo.app.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xo.app.swt.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xo.elem.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xo.tmpl.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xo.notify.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xo.server.js"></script>
<script>
xo.app.mode = 'swt';
</script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xobc.util.js"></script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xobc.localfile.js"></script>
<script>
xo.mode_is_debug = true;
xo.tmpl.load_many('bin/any/xowa/addon/bldr/central/bin/', 'xobc.main', 'xobc.row');
setTimeout(function() {
xo.tmpl.fmt('xobc.main', xo.elem.get('bldr_body'), {});
}, 0);
setTimeout(function() {
xo.bldr.core.reload__send();
// xo.bldr.todo.add_work__send('s.w-2016.03-file');
}, 600);
</script>
<script type="text/javascript" src="bin/any/xowa/addon/bldr/central/js/xobc.js"></script>
</html>

View File

@ -0,0 +1,44 @@
.cur_head_text {
width: calc(100% - 47px);
}
.cur_head_btns {
width: 36px;
}
/* Detail Tbl */
.cur_data_row {
padding: 4px 0px 4px;
}
.cur_data_row label {
display: inline-block;
width: 90px;
margin: 0px 4px 0px 10px;
vertical-align: top;
align-self: flex-start;
-webkit-align-self: flex-start;
font-weight: bold;
}
.cur_data_row label::after {
content: ":";
}
.cur_data_row span {
display: inline-block;
width: calc(100% - 110px);
}
.files_table th {
border-bottom: 1px solid #ddd;
}
.files_table_url, .files_table_size, .files_table_md5 {
border-bottom: 1px solid #ddd;
padding: 4px;
}
.files_table_url {
}
.files_table_size {
text-align:right;
padding:0px 25px 0px 25px; /* use padding to add space between left and right cols */
}
.files_table_md5 {
font-family:Courier New;
}

View File

@ -0,0 +1,54 @@
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<b>Info</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Wiki URL</b>: Internet URL of the wiki</span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Wiki folder</b>: Location where the .xowa files should be placed. For example: <code>C:\xowa\wiki\simple.wikipedia.org\simple.wikipedia.org-core.xowa</code></span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Total size</b>: Total size of all files on disk (not downloaded size)</span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Torrent</b>: Torrent link for use in your torrent program. Note that you will need to manually exclude files</span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Download URLs</b>: URLs for use in your download manager / accelerator</span></div>
</div>
</div>
</div>
<div class='main_body' id='main_body'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>Task info</div>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Wiki URL</label>
<span><a href='https://{{wiki_domain}}' class='external'>https://{{wiki_domain}}</a></span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Wiki folder</label>
<span>{{wiki_dir}}</span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Total size</label>
<span>{{task_size}}</span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Torrent</label>
<span><a href='{{torrent_fil}}'>{{torrent_fil}}</a></span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Files</label>
<span>
<table class='files_table' cellspacing='0' cellpadding='0'>
<tr>
<th>URL</th>
<th>Size</th>
<th>MD5</th>
</tr>
{{#urls}}
<tr>
<td class='files_table_url'><a href='{{url}}'>{{url}}</a></td>
<td class='files_table_size'>{{size}}</td>
<td class='files_table_md5'>{{md5}}</td>
</tr>
{{/urls}}
</table>
</span>
</div>
</div>

View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--
NOTE: this page loads local files
- Chrome is the easiest browser for local files; Use "chrome.exe --disable-web-security"
- Change C:/xowa/ to wherever it is on your system
-->
<!-- base -->
<base href="file:///C:/xowa/" target="_blank">
<!-- css -->
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.core.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.bootstrap.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xocss_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xoimg_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/bldr/info/bin/xobc_info.css">
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/alertify-0.3.11.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/xo-alertify-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/mustache/mustache-2.2.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/jquery/jquery-1.11.3.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.js"></script>
<script type="text/html" id="templates"></script>
<script type="text/javascript">
window.view = {
wiki_dir : 'wiki_dir'
, torrent : 'torrent_link'
, urls :
[
{ url : 'url1'
, size : '123 MB'
}
,
{ url : 'url2'
, size : '234 MB'
}
,
{ url : 'url3'
, size : '345 MB'
}
,
{ url : 'url4'
, size : '456 MB'
}
]
};
</script>
<script>
$("#templates").load("bin/any/xowa/addon/bldr/info/bin/xobc_info.mustache.html", function(response_txt, status_txt, xhr){
var template = response_txt;
var output = Mustache.render(template, window.view);
document.getElementById('main').innerHTML = output;
});
</script>
</head>
<body>
<div id='main' class='bldr_body'></div>
</body>
</html>

View File

@ -0,0 +1,71 @@
== Overview ==
This page describes how to set up {{language}} wikis on your machine.
The following two options are available:
=== Download pre-built wikis from archive.org ===
* '''Faster''': The build process is skipped completely. All you have to do is download the wikis
* '''Simpler''': The wikis are pre-compiled HTML, so you don't have to set-up Wikidata or other pre-requisites. Since the wiki is just being downloaded, not built, there are less things that can go wrong
* '''Less recent''': The wikis need to be manually generated and uploaded by me. If you find that the wikis below are out of date, you can create an issue at github.org or try building them yourself.
=== Build wikis using the database dumps at wikimedia.org ===
* '''Slower''': It takes an extra few hours to build the wiki
* '''Slightly harder''': These wikis work best with Wikidata on your machine. See [[App/Wiki types/Wikidata]]. In additon, the build process may not work on certain low-end machines like Raspberry Pi
* '''Always recent''': The wikis will be built using the latest dump from Wikimedia at https://dumps.wikimedia.org/backup-index.html
In addition, both options have an '''automatic''' and a '''manual''' route. More detail is provided below.
__TOC__
== Download pre-built wikis from archive.org ==
=== Automatic ===
* Go to [[Special:XowaDownloadCentral]]
* In the '''Available''' table, add any of the following task names
{{#wikis}}
{{#tasks}}
:: {{task_full_name}}
{{/tasks}}
{{/wikis}}
* In the '''Queue''' table, click the Play button
* Wait for the Queue to process. When it is done, enter the wiki URL in the bar. For example, <code>{{wikis__1st}}</code>
=== Manual ===
* Download the urls below. Note that they are listed in two formats:
** Urls by wiki / type: In case you want only one wiki (wiktionary) or one type (articles)
** All urls (for copying into a download manager)
* Unzip them and move the .xowa file to the proper wiki directory. For example, for {{wikis__1st}}, move the files to <code>C:\xowa\wiki\{{wikis__1st}}</code>
* Start XOWA and enter the wiki URL in the bar. For example, <code>{{wikis__1st}}</code>
== Build wikis using the database dumps at wikimedia.org ==
=== Automatic ===
* Go to [[Dashboard/Import/Online]]
* Find your wiki in the list
* Click the <code>download</code> link.
* Wait for the wiki to build. When it is done, it will automatically load the Main Page
=== Manual ===
* Download your dump from https://dumps.wikimedia.org/backup-index.html
* Go to [[Dashboard/Import/Offline]]
* Select the dump and import it
----
== URLS ==
{{#wikis}}
=== {{wiki_domain}} ===
{{#tasks}}
==== {{wiki_domain}} {{task_name}} ({{task_date}}) ====
<ul>
{{#files}}
* {{file_href}}
{{/files}}
</ul>
{{/tasks}}
{{/wikis}}
=== All links ===
<pre style='height: 10pc; overflow-y: scroll;'>
{{url_list}}
</pre>

View File

@ -0,0 +1,18 @@
.cur_head_text {
width: calc(100% - 47px);
}
.cur_head_btns {
width: 36px;
}
/* Detail Tbl */
.cur_data_row {
height: 44px;
width: 100%;
}
.xdir_link_btn {
display: flex;
align-items: center;
width: calc(100% - 36px);
height: 100%;
}

View File

@ -0,0 +1,48 @@
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<b>Info</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Select the default folder to save your Download Central wikis</span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Note that XOWA tries to default to your external SD card, but you may need to manually choose it</span></div>
</div>
<b>Buttons</b>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_fsys_dir'>&nbsp;</span><span class='xohelp_row_text'>Select a custom folder for XOWA</span></div>
<b>Debug info</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Current app root: {{app_root_dir}}</span></div>
</div>
</div>
</div>
<div class='main_body' id='main_body'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>Select XOWA Folder</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
{{#dirs}}
<div class='xotbl_data_row cur_data_row'>
<!--
<a
class="link_btn_y xdir_link_btn"
href="/site/home/wiki/Special:XowaRootDir?path={{path}}"
>
-->
<a
class="link_btn_y xdir_link_btn"
data_alertify_msg='Please confirm you wish to change the folder.<br/><b>Note that you must restart the app in order for the changes to take effect.</b>'
data_alertify_ok='Select'
data_alertify_cancel='Cancel'
data_alertify_href="/site/home/wiki/Special:XowaRootDir?path={{path}}"
onclick='return xo.alertify.confirm_href(this);'>
<span class='xoimg_btn_x24 {{#is_selected}}xoimg_misc_ok{{/is_selected}}' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</span>
<span class='dir_text'>{{path}}</span>
</a>
{{#is_custom}}
<a class='xoimg_btn_x24 xoimg_fsys_dir link_btn_y' title='select custom folder'
href="/site/home/wiki/Special:XowaFileBrowser?dir_cmd=xodir&path={{import_root}}"
>&nbsp;</a>
{{/is_custom}}
</div>
{{/dirs}}
</div>

View File

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--
NOTE: this page loads local files
- Chrome is the easiest browser for local files; Use "chrome.exe --disable-web-security"
- Change C:/xowa/ to wherever it is on your system
-->
<!-- base -->
<base href="file:///C:/xowa/" target="_blank">
<!-- css -->
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.core.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.bootstrap.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xocss_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xoimg_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/bldr/xodir/bin/xobc_xodir.css">
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/alertify-0.3.11.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/xo-alertify-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/mustache/mustache-2.2.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/jquery/jquery-1.11.3.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.js"></script>
<script type="text/html" id="templates"></script>
<script type="text/javascript">
window.view = {
dirs :
[
{ path : '/storage/Android/717F-03BD/data/org.xowa'
, is_internal : false
, is_custom : false
}
,
{ path : '/storage/emulated/0/Android/data/org.xowa'
, is_internal : true
, is_custom : false
}
,
{ path : '/storage/emulated/1/Android/data/org.xowa'
, is_internal : true
, is_custom : false
}
,
{ path : '(choose your own folder)'
, is_internal : false
, is_custom : true
}
]
};
</script>
<script>
$("#templates").load("bin/any/xowa/addon/bldr/xodir/bin/xobc_xodir.mustache.html", function(response_txt, status_txt, xhr){
var template = response_txt;
var output = Mustache.render(template, window.view);
document.getElementById('main').innerHTML = output;
});
</script>
</head>
<body>
<div id='main' class='bldr_body'></div>
</body>
</html>

View File

@ -0,0 +1,60 @@
.cur_head_text {
width: calc(100% - 108px);
}
.cur_head_btns {
width: 108px;
}
/* Detail Tbl */
.cur_data_row {
padding: 4px 0px 4px;
}
.cur_data_row label {
display: inline-block;
width: 90px;
margin: 0px 4px 0px 10px;
vertical-align: top;
align-self: flex-start;
-webkit-align-self: flex-start;
font-weight: bold;
}
.cur_data_row label::after {
content: ":";
}
.cur_data_input {
display: inline-block;
width: calc(100% - 140px);
}
.cur_data_icon {
margin-left: 7px;
}
.files_table th {
border-bottom: 1px solid #ddd;
}
.files_table_url, .files_table_size, .files_table_md5 {
border-bottom: 1px solid #ddd;
padding: 4px;
}
.files_table_url {
}
.files_table_size {
text-align:right;
padding:0px 25px 0px 25px; /* use padding to add space between left and right cols */
}
.files_table_md5 {
font-family:Courier New;
}
input[readonly]
{
background-color:#eff0f1;
border:1px solid #ddd;
}
.cur_actions_row {
display: inline-block;
margin: 0px 4px 0px 10px;
vertical-align: top;
align-self: flex-start;
-webkit-align-self: flex-start;
}

View File

@ -0,0 +1,66 @@
(function (xo) {
xo.wiki_directory = new function() {
this.item_send = function(proc, args) {
try {xo.server.send_by_bridge('wiki.directory.item', proc, args);}
catch (err) {alert(err);}
}
this.get_elem_val = function(id) {
var elem = document.getElementById(id);
return elem == null ? null : elem.value;
}
this.item__save = function() {
xo.wiki_directory.notify__clear();
var data =
{
id: this.get_elem_val('id_lbl')
, domain: this.get_elem_val('domain_box')
, name: this.get_elem_val('name_box')
, dir: this.get_elem_val('dir_box')
, mainpage: this.get_elem_val('mainpage_box')
};
xo.wiki_directory.item_send('save', data);
}
this.item__delete = function() {
var data =
{
id: this.get_elem_val('id_lbl')
, domain: this.get_elem_val('domain_box')
};
xo.wiki_directory.item_send('delete', data);
}
this.item__reindex_search = function() {
xo.notify.elem_anchor = '#cur_help_div'; // moved here b/c of report of crash when New personal wiki is opened
xo.wiki_directory.item_send('reindex_search', {domain:this.get_elem_val('domain_box')});
}
this.io_cmd__select = function() {
// call xowa to launch file_dialog
var file_path = xowa_exec('scripts_exec', 'app.gui.kit.ask_dir("Please select a folder");');
if (file_path == null || file_path == '') return; // nothing selected; exit
// update val
var elem = document.getElementById('dir_box');
elem.value = file_path;
}
this.notify__clear = function() {
var elem = document.getElementById('xo_msg_box');
elem.innerHTML = "";
}
this.notify__recv = function(msg_str) {
try {
var msg = JSON.parse(msg_str);
var elem_id = msg.elem_id;
if (!elem_id) elem_id = 'xo_msg_box';
var msg_text = msg.msg_text;
var elem = document.getElementById(elem_id);
elem.innerHTML = elem.textContent + msg_text;
return true;
} catch (err) {
alert(err);
return false;
}
}
}
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,82 @@
<div id='xo_msg_box' style='width:100%; color:red'>
</div>
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<b>Info</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Domain</b>: Domain of your wiki. Used for the URL bar. For example: <code>wiki.me.org</code>. Cannot be changed after wiki is created</span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Name</b>: Friendly name for the wiki. Shown in list of wikis. For example: <code>My wiki</code></span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Folder</b>: Folder for the wiki. A file with the domain name will be created in the folder: For example: <code>C:\personal\wiki.me.org</code>. Note that this will create a file called <code>C:\personal\wiki.me.org\wiki.me.org.xowa</code></span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Main Page</b>: The default start page for the wiki. For example, entering in <code>wiki.me.org</code> will navigate directly to <code>Main_Page</code>. Cannot be changed after wiki is created</span></div>
For more info, see <a href='/site/home/wiki/App/Personal_wikis/New_wiki'>the new wiki help page</a>
</div>
<b>Buttons</b>
<div>
{{#mode_is_new}}
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_save'>&nbsp;</span><span class='xohelp_row_text'>Creates the wiki</span></div>
{{/mode_is_new}}
{{^mode_is_new}}
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_save'>&nbsp;</span><span class='xohelp_row_text'>Saves the current settings</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_delete'>&nbsp;</span><span class='xohelp_row_text'>Deletes the wiki from the list. Note that the file itself will not be deleted.</span></div>
{{/mode_is_new}}
</div>
{{^mode_is_new}}
<b>Commands</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Reindex pages for search bar. See <a href='/site/home/wiki/App/Personal_wikis/Search'>the search help page</a></span></div>
</div>
{{/mode_is_new}}
</div>
</div>
<div class='main_body' id='main_body'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>
{{#mode_is_new}}Create a wiki{{/mode_is_new}}
{{^mode_is_new}}Edit the wiki{{/mode_is_new}}
</div>
<a class='xoimg_btn_x24 xoimg_list_save' title='save changes' href='javascript:void(0)' accesskey='s'
onclick='xo.wiki_directory.item__save();'>&nbsp;</a>
{{^mode_is_new}}
<a class='xoimg_btn_x24 xoimg_list_delete' title='remove wiki' href='javascript:void(0)'
data_alertify_msg='Please confirm that you wish to remove the wiki from your list<br/>Note that the file itself will not be deleted'
data_alertify_ok='Remove'
data_alertify_cancel='Cancel'
data_alertify_func='xo.wiki_directory.item__delete();'
onclick='return xo.alertify.confirm_func(this);'>&nbsp;</a>
{{/mode_is_new}}
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Domain</label>
<input id='domain_box' type='text' accesskey='d' value='{{domain}}' class='cur_data_input'{{#mode_is_new}} placeholder='Enter a domain (For example: wiki.me.org)'{{/mode_is_new}}{{^mode_is_new}} readonly{{/mode_is_new}}></input>
<input id='id_lbl' type='hidden' value='{{id}}'></span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Name</label>
<input id='name_box' type='text' value='{{name}}' class='cur_data_input'{{#mode_is_new}} placeholder='Enter a name (For example: My wiki)'{{/mode_is_new}}></input>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Folder</label>
<input id='dir_box' type='text' value='{{dir}}' class='cur_data_input'{{#mode_is_new}} placeholder='Enter a folder (For example: C:\personal\wiki.me.org). You can also click on the wrench at the far-right'{{/mode_is_new}}></input>
<span class="xoimg_btn_x16 xoimg_app_configure cur_data_icon" onclick='xo.wiki_directory.io_cmd__select();'>&nbsp;</span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Main Page</label>
<input id='mainpage_box' type='text' value='{{mainpage}}' class='cur_data_input'{{#mode_is_new}} placeholder='Enter the name for the Main Page. (For example: Main_Page)'{{/mode_is_new}}{{^mode_is_new}} readonly{{/mode_is_new}}></input>
</div>
</div>
<br/>
{{^mode_is_new}}
<div class='main_body' id='other_body'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>
Other actions
</div>
</div>
<div class="xotbl_data_row">
<div class='cur_actions_row'>
<a class='' title='reindex' href='javascript:void(0)' accesskey='f' onclick='return xo.wiki_directory.item__reindex_search();'>Reindex pages for search bar</a>
</div>
</div>
</div>
{{/mode_is_new}}

View File

@ -0,0 +1,476 @@
Welcome to your personal wiki!
Personal wikis are new and will be in continual development! If you encounter issues, please report them through the [[xowa.home:Help/Feedback|Feedback page]].
== Quick start ==
=== Editing this page ===
* Switch to edit mode by pressing <code>Edit</code> near the top-right of the page
* Edit the text by typing directly in the text box. For this example, enter <code>Hello, world!</code> at the top of the text box.
* Save the page by pressing the <code>Save page</code> button at the bottom of the text box
Congratulations! You should see <code>Hello, world!</code> at the top of the page
=== Creating a new page ===
* Navigate to a page by entering a page title in the url bar. For this example, enter <code>Test</code>.
* A blank page will open in edit mode. Enter in some text in the text box. For this example, enter <code>Some text for the page</code>
* Save the page.
Congratulations! You have just created a new page called <code>Test</code>
=== Linking to a page ===
* Switch to edit mode.
* Enter a link by entering text into the text box. For this example, use <code><nowiki>[[Test]]</nowiki></code>.
* Save the page. The word <code><nowiki>Test</nowiki></code> will show and be highlighted in blue.
* Click on the <code>Test</code> link. The <code>Test</code> page will open.
Congratulations! You have just linked to a page called <code>Test</code>
== Basic editing ==
The best place to start is Wikipedia's guide for editing: https://en.wikipedia.org/wiki/Help:Getting_started
The table below is provided for reference. Note the following columns:
* '''function''': the name of the function
* '''example''': an example of the function as shown in HTML
* '''wikitext''': the actual wikitext used to render the function
* '''html''': an alternative way of rendering the same wikitext, but only with html.
=== HTML tags ===
Most HTML tags are available.
* '''HTML tags can be used as an alternative to wikitext.''': For example, <i>italicized text</i> can also be shown with <code><nowiki>&lt;i>italicized text&lt;/i></nowiki>
* '''HTML tags are needed for other functions.''': For example, the following have no wikitext equivalent <code><nowiki>&lt;u>underline</u></nowiki></code>, <code><nowiki>&lt;s>strikethru</s></nowiki></code>, etc..
However, there are some notable exceptions:
* '''anchor tags are not allowed''': Any <code>&lt;a></code> will be rendered literally. Instead, use an internal / external link. For example, <code><nowiki>[[Test]]</nowiki></code>
* '''image tags are not allowed''': Any <code>&lt;img></code> will be rendered literally. Instead, use an internal link in the file namespace. For example, <code><nowiki>[[File:Image.png]]</nowiki></code>
* '''javascript / events are not allowed''': All javascript and "onevent" blocks are removed.
{|class=wikitable style="background:white"
|-
! function
! example
! wikitext
! html
|-
| italics
| ''italicized text''
| <code><nowiki>''italicized text''</nowiki></code>
| <code><nowiki>&lt;i>italicized text</&lt;i></nowiki></code>
|-
| bold
| '''bold text'''
| <code><nowiki>'''bold text'''</nowiki></code>
| <code><nowiki>&lt;b>bold text</&lt;b></nowiki></code>
|-
| bold and italics
| '''''bold and italicized text'''''
| <code><nowiki>'''''bold and italicized text'''''</nowiki></code>
| <code><nowiki>&lt;b>&lt;i>bold and italicized text&lt;/i>&lt;/b></nowiki></code>
|-
| underline
| <u>underlined text</u>
| <code><nowiki>N/A</nowiki></code>
| <code><nowiki>&lt;u>underlined text&lt;/u></nowiki></code>
|-
| strike-thru
| <s>strike-thru text</s>
| <code><nowiki>N/A</nowiki></code>
| <code><nowiki>&lt;s>strike-thru text&lt;/s></nowiki></code>
|-
| color
| <span style='color:green'>colored text</span>
| <code><nowiki>N/A</nowiki></code>
| <code><nowiki>&lt;span style='color:green'>colored text&lt;/span></nowiki></code>
|-
| external url: url only
| http://xowa.org
| <code><nowiki>http://xowa.org</nowiki></code>
| <code>N/A</code>
|-
| external url: url with name
| [http://xowa.org xowa web site]
| <code><nowiki>[http://xowa.org xowa web site]</nowiki></code>
| <code>N/A</code>
|-
| external url: numbered
| [http://xowa.org]
| <code><nowiki>[http://xowa.org]</nowiki></code>
| <code>N/A</code>
|-
| internal url: page only
| [[Test]]
| <code><nowiki>[[Test]]</nowiki></code>
| <code>N/A</code>
|-
| internal url: page with name
| [[Test|My test page]]
| <code><nowiki>[[Test|My test page]]</nowiki></code>
| <code>N/A</code>
|-
| paragraph<br/>
|
para 1
para 2
|
<pre>
para 1
para 2
</pre>
<ref group='basics'>enter a completely blank line between paragraphs</ref>
|
<pre>
<p>para 1</p>
<p>para 2</p>
</pre>
|-
| preformatted blocks
|
line 1
line 2
|
<pre>
line 1
line 2
</pre>
<ref group='basics'>start a line with a space</ref>
|
<pre>
&lt;pre>
line 1
para 2
&lt;/pre>
</pre>
|-
| list: bulleted
|
* a
** aa
*** aaa
* b
* c
** cc
|
<pre>
* a
** aa
*** aaa
* b
* c
** cc
</pre>
|
<pre>
<ul>
<li>a
<ul>
<li>aa
<ul>
<li>aaa</li>
</ul>
</li>
</ul>
</li>
<li>b</li>
<li>c
<ul>
<li>cc
</li>
</ul>
</li>
</ul>
</pre>
</pre>
|-
| list: numbered
|
# a
## aa
### aaa
# b
# c
## cc
|
<pre>
# a
## aa
### aaa
# b
# c
## cc
</pre>
|
<pre>
<ol>
<li>a
<ol>
<li>aa
<ol>
<li>aaa</li>
</ol>
</li>
</ol>
</li>
<li>b</li>
<li>c
<ol>
<li>cc
</li>
</ol>
</li>
</ol>
</pre>
|-
| header
|
=== Basic editing: Test Level a3 ===
==== Basic editing: Test Level a4 ====
===== Basic editing: Test Level a5 =====
=== Basic editing: Test Level b3 ===
=== Basic editing: Test Level c3 ===
==== Basic editing: Test Level c4 ====
|
<pre>
=== Basic editing: Test Level a3 ===
==== Basic editing: Test Level a4 ====
===== Basic editing: Test Level a5 =====
=== Basic editing: Test Level b3 ===
=== Basic editing: Test Level c3 ===
==== Basic editing: Test Level c4 ====
</pre>
|
<pre>
<h3> Basic editing: Test Level a3 </h3>
<h4> Basic editing: Test Level a4 </h4>
<h5> Basic editing: Test Level a5 </h5>
<h3> Basic editing: Test Level b3 </h3>
<h3> Basic editing: Test Level c3 </h3>
<h4> Basic editing: Test Level c4 </h4>
</pre>
|-
| table
|
{|class=wikitable
|+ caption
|-
! header a
! header b
|-
| cell 1a
| cell 1b
|-
| cell 2a
| cell 2b
|}
|
<pre>
{|class=wikitable
|+ caption
|-
! header a
! header b
|-
| cell 1a
| cell 1b
|-
| cell 2a
| cell 2b
|}
</pre>
|
<pre>
<table class="wikitable">
<caption>caption</caption>
<tr>
<th>header a</th>
<th>header b</th>
</tr>
<tr>
<td>cell 1a</td>
<td>cell 1b</td>
</tr>
<tr>
<td>cell 2a</td>
<td>cell 2b</td>
</tr>
</table>
</pre>
|}
=== Notes for Basics editing ===
<references group='basics'>
</references>
== Advanced editing ==
=== Category ===
Categories are supported. As a basic example, try the following:
* Edit this page
* Add the following text: <code><nowiki>[[Category:Test]]</nowiki></code>
* Scroll down to the bottom of the page. You will see a <code><nowiki>Categories</nowiki></code> section and <code><nowiki>Test</nowiki></code> listed
* Navigate to <code><nowiki>Category:Test</nowiki></code>. You will see the Main page listed
For more info, see https://en.wikipedia.org/wiki/Help:Category
=== Images ===
Images are supported, but the process is slightly complicated due to the set-up of third-party software.
Here is a broad overview:
* Set up imagemagick and inkscape on your machine. For more instructions, see http://xowa.org/home/wiki/App/Wiki_types/Wikia.com#Part_3c:_Setup_Imagemagick_and_Inkscape
* Place your images in your wiki directory. Assuming your wiki is set up in <code>C:\your_wiki</code>, then you need to copy an image to <code>C:\your_wiki\file\orig</code>. As an example, do the following:
** Download the image from <code><nowiki>https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg</nowiki></code>
** Move the image to <code>C:\your_wiki\file\orig\The_Earth_seen_from_Apollo_17.jpg</nowiki></code>
** Edit the page, and add the following text: <code><nowiki>[[File:The_Earth_seen_from_Apollo_17.jpg]]</nowiki></code>
* Preview the page. You should see the image.
For more info, see https://en.wikipedia.org/wiki/Wikipedia:Picture_tutorial
=== Table of contents ===
Table of contents (TOC) are automatically generated by XOWA if you have 4 headers (a header being something like <code><nowiki>== header ==</nowiki></code>)
If you have less than 4 headers, you can force a TOC by adding <code><nowiki>__TOC__</nowiki></code>
=== Math ===
LaT<sub>E</sub>X formatting is available. For example, the following is the formula for the Pythagorean theorem: <math>a^2 + b^2 = c^2</math>
=== References ===
Wikipedia-style references are supported. For example, this is a simple reference: <ref>Test footnote</ref>.
Note that you can hover over the reference number to get a tooltip preview
=== Sortable tables ===
Wikipedia-style sortable tables are supported.
{|class='wikitable sortable'
|-
! String
! Int
! Date - months
|-
| c
| 3
| Mar 1 2012
|-
| b
| 22
| Feb 2 2011
|-
| a
| 111
| Jan 3 2010
|}
=== Collapsible tables ===
Wikipedia-style collapsible tables are supported.
{| class="wikitable collapsible"
! Data
|-
| A
|-
| B
|-
| C
|}
=== More ===
Other features are supported, including Tabviews, Timelines, Graphs, Hieroglyphics and Musical scores. For examples, see [[xowa.home:Diagnostics]]
== Expert editing ==
=== Magic words ===
Most magic words are supported, such as <code><nowiki>{{CURRENTTIME}}</nowiki></code> and <code><nowiki>{{lc:string}}</nowiki></code>. For more info, see https://en.wikipedia.org/wiki/Help:Magic_words
=== Parser functions ===
Most parser functions are supported, such as <code><nowiki>{{#expr:2 + 2}}</nowiki></code>. For more info, see https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions
=== Templates ===
Templates are supported, such as <code><nowiki>{{my_template|arg_1|arg_2|etc...}}</nowiki></code>. For more info, see https://en.wikipedia.org/wiki/Help:A_quick_guide_to_templates
Here's a brief example:
* Create a page called <code>Template:Test</code> with the text <code><nowiki>Hello, from Template:Test -- {{{1|empty}}}</nowiki></code>
* Edit any other page (like the <code>Main_Page</code>) and enter <code><nowiki>{{Test|argument 1}}</nowiki></code> in the text box.
* Preview or Save the page. You will see <code>Hello, from Template:Test -- argument 1</code>
=== Modules ===
Modules are supported, such as <code><nowiki>{{#invoke:my_module|my_function|arg_1|arg_2|etc...}}</nowiki></code>. For more info, see https://en.wikipedia.org/wiki/Wikipedia:Lua
Here's a brief example:
* Create a page called <code>Module:Test</code> with the following text
<pre>
local p = {}
function p.test( frame )
return "Hello from Module:Test -- " .. frame.args[1];
end
return p
</pre>
* Edit any other page (like the <code>Main_Page</code>) and enter <code><nowiki>{{#invoke:Test|test|argument 1}}</nowiki></code> in the text box.
* Preview or Save the page. You will see <code>Hello from Module:Test -- argument 1</code>
== Developer editing ==
<table class="metadata plainlinks ambox ambox-delete" style="">
<tr>
<td class="mbox-empty-cell">
</td>
<td class="mbox-text" style="">
<span class="mbox-text-span">
NOTE: The techniques in this section may change in future versions.
If you use any of the editing techniques here, please check back occasionally to see if anything has changed.
</span>
</td>
</tr>
</table>
=== CSS ===
XOWA stores the CSS for each wiki in <code>/xowa/user/anonymous/wiki/your_wiki_name/html</code>. For example, if you're on Windows and your wiki is named <code>test</code>, then the CSS would be at <code>C:\xowa\user\anonymous\wiki\test\html\xowa_common.css</code>
Note that the upper-lefthand icon is also stored there as <code>logo.png</code>
You can change these files and XOWA will not overwrite them. However, as with any file, please make sure you always keep backups.
=== Page template ===
XOWA stores the page template in <code>/xowa/bin/any/xowa/cfg/app/xowa.gfs</code>. The actual template is marked in a section called <code>page_read</code>.
Please note the following about changing the page:
* The file is replaced on every application update. If you make updates to the file, they will be lost.
** If you find that you need to edit this file, please contact me, and I will add a feature to make it configurable in a future release. Really, these instructions are only provided for users who want to experiment.
* The file uses a custom language specific to XOWA called gfs. Always backup the file when making changes. If you make an invalid change, XOWA will not start
* The file is only loaded at application start. Any changes will require a restart of the app
=== Scripting ===
XOWA allows custom hooks through Javascript or Lua. For detailed instructions see [[xowa.home:App/Xtn/Scripting]]
== Keyboard shortcuts ==
For a full list, see [[xowa.home:Special:XowaCfg?grp=xowa.gui.shortcuts]]
{|class='wikitable'
|-
| <b>Alt + Shift + E</b> || Edit the page. Switches to edit mode
|-
| <b>Ctrl + S</b> || Quick save the page. Stays in edit mode
|-
| <b>Alt + Shift + P</b> || Preview the page. Stays in edit mode
|-
| <b>Alt + Shift + S</b> || Save the page. Switches to read mode
|-
| <b>Ctrl + F</b> || Find text in the page
|-
|
<b>Ctrl + L</b> or <br/>
<b>Alt + D</b> || Focus the URL bar
|-
| <b>Ctrl + T</b> || New tab
|-
| <b>Ctrl + Tab</b> || Switch to next tab
|-
| <b>Ctrl + Shift + Tab</b> || Switch to previous tab
|-
| <b>Ctrl + W</b> || Close tab
|}
== Useful links ==
* Wikipedia's guide for editing: https://en.wikipedia.org/wiki/Help:Getting_started
* XOWA page on personal wikis: [[xowa.home:App/Personal wikis]]
* XOWA help page: [[xowa.home:Help/Contents|Contents page]]
== Notes ==
<references/>

View File

@ -0,0 +1,12 @@
.cur_head_text {
width: calc(100% - 40px);
}
.cur_head_btns {
width: 40px;
}
.domain_name {
display: inline-block;
width: calc(100% - 64px);
padding: 0px 0px 0px 10px;
}

View File

@ -0,0 +1,24 @@
(function (xo) {
xo.wiki_directory = new function() {
this.send = function(proc, args) {
try {
xo.server.send_by_bridge('wiki.directory.list', proc, args);
} catch (err) {
alert(err);
}
}
this.import_wiki = function() {
try {
// call xowa to launch file_dialog
var url = xowa_exec('scripts_exec', 'app.gui.kit.ask_file("Please select an .xowa file", "*.xowa");');
if (url == null || url == '') return; // nothing selected; exit
xo.notify.elem_anchor = '#main_body';
xo.wiki_directory.send('import_wiki', {'url':url});
} catch (err) {
alert(err);
}
}
}
}(window.xo = window.xo || {}));

View File

@ -0,0 +1,34 @@
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<b>Buttons</b>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_add'>&nbsp;</span><span class='xohelp_row_text'>Create a new wiki</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_doc_import'>&nbsp;</span><span class='xohelp_row_text'>Import an existing wiki</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_doc_open'>&nbsp;</span><span class='xohelp_row_text'>Open the wiki</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_app_configure'>&nbsp;</span><span class='xohelp_row_text'>Configure wiki settings</span></div>
</div>
</div>
</div>
<div class='main_body' id='main_body'>
<div class='list_tbl'>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>List</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_list_add' title='add a new wiki' href='/site/home/wiki/Special:XowaWikiItem'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_doc_import' title='import an existing wiki' href='' onclick='return xo.wiki_directory.import_wiki()' accesskey='i'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
{{#itms}}
<div class="xotbl_data_row flex_div">
<a class='domain_name ' title='open' href='/site/{{domain}}/wiki/{{mainpage}}'>{{name}}</a>
<div>
<a class='xoimg_btn_x24 xoimg_doc_open' title='open' href='/site/{{domain}}/wiki/{{mainpage}}'>&nbsp;</a>
</div>
<div>
<a class='xoimg_btn_x24 xoimg_app_configure' title='configure' href='/site/home/wiki/Special:XowaWikiItem?domain={{domain}}'>&nbsp;</a>
</div>
</div>
{{/itms}}
</div>
</div>

View File

@ -0,0 +1,20 @@
.cur_data_row {
padding: 4px 0px 4px;
}
.cur_data_row label {
display: inline-block;
width: 120px;
margin: 0px 4px 0px 10px;
vertical-align: top !important; /* !important needed else label will default to bottom b/c of element.style */
align-self: flex-start;
-webkit-align-self: flex-start;
font-weight: bold;
}
.cur_data_row label::after {
content: ":";
}
.cur_data_input {
display: inline-block;
width: calc(100% - 170px);
}

View File

@ -0,0 +1,59 @@
(function (xo) {
xo.fulltext_indexer = new function() {
this.send = function(proc, args) {
try {xo.server.send_by_bridge('xowa.wiki.fulltext.indexer', proc, args);}
catch (err) {alert(err);}
}
this.index = function() {
try {
var data =
{ wikis: xo.elem.get_val_or_null('wikis_box')
, ns_ids: xo.elem.get_val_or_null('ns_ids_box')
, idx_opt: xo.elem.selectbox__selected_get("idx_opt")
};
xo.fulltext_indexer.send('index', data);
document.getElementById('index_btn').focus();
} catch (err) {
alert(err);
}
}
this.index_keydown = function(e) {
if(e.keyCode === 13){
e.preventDefault(); // Ensure it is only this code that runs
xo.fulltext_indexer.index();
}
}
this.status__note__recv = function(msg) {return xo.fulltext_indexer.status__note(JSON.parse(msg));}
this.status__note = function(msg) {
try {
var note = msg.note;
xowa.js.doc.elem_append_above('note_last_div'
, "<div style='width:100%'>"
+ " <div>"
+ note
+ " </div>"
+ "</div>"
);
} catch (err) {
alert(err);
}
return true;
}
this.status__prog__recv = function(msg) {return xo.fulltext_indexer.status__prog(JSON.parse(msg));}
this.status__prog = function(msg) {
try {
var prog = msg.prog;
var prog_div = document.getElementById('prog_div');
prog_div.textContent = prog;
} catch (err) {
alert(err);
}
return true;
}
}
}(window.xo = window.xo || {}));
xo.notify.elem_anchor = '#main_div';
document.getElementById("wikis_box").focus();
xo.elem.selectbox__selected_set('idx_opt');

View File

@ -0,0 +1,40 @@
<!-- message div -->
<div id='xo_msg_box' style='width:100%; color:red'>&nbsp;</div>
<!-- help div -->
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_media_play'>&nbsp;</span><span class='xohelp_row_text'>Run index</span></div>
</div>
</div>
</div>
<!-- main div -->
<div id='main_div' style='width:100%'>
<div class='cur_data_row' style='height:40px'>
<label style='vertical-align:middle'>Index</label>
<input id='wikis_box' type='text' value='{{wikis}}' style='width:80%' onkeydown='xo.fulltext_indexer.index_keydown(event)' accesskey="m" placeholder='Enter a wiki domain (For example: en.wikipedia.org)'></input>
<a class='xoimg_btn_x24 xoimg_media_play' title='index' href='javascript:void(0)' onclick='return xo.fulltext_indexer.index()' id='index_btn'>&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
<div class='cur_data_row'>
<label style='vertical-align:middle'>Namespaces</label>
<input id='ns_ids_box' type='text' value='{{ns_ids}}' style='width:80%' onkeydown='xo.fulltext_indexer.index_keydown(event)' placeholder='Enter a list of namespaces to index (For example: 0|4|14)'></input>
</div>
<div class='cur_data_row'>
<label style='vertical-align:middle'>Index options</label>
<select id='idx_opt' name='idx_opt' size='4' data-select-selected='{{idx_opt}}'>
<option value='d'>Documents</option>
<option value='df'>Documents / Frequencies</option>
<option value='dfp'>Documents / Frequencies / Positions</option>
<option value='dfpo'>Documents / Frequencies / Positions / Offsets</option>
</select>
</div>
<div id='status_div' style='width:100%'>
<div id='prog_div'></div>
<div id='note_div'>
<div id='note_last_div'>&nbsp;</div>
</div>
</div>
</div>

View File

@ -0,0 +1,191 @@
/*---------------------------------------------------------------------------*/
/* HELP */
/*---------------------------------------------------------------------------*/
.xo_help_div {
margin-left:6px
}
/*---------------------------------------------------------------------------*/
/* SEARCH */
/*---------------------------------------------------------------------------*/
.xo_search_box {
padding-right: 10px !important; /* DRD:else indicator will not be to far right */
}
/*---------------------------------------------------------------------------*/
/* OPTIONS */
/*---------------------------------------------------------------------------*/
.xo_options_div {
background-color:#f8f9fa; /* gray background */
border:1px solid #c8ccd1; /* border */
/* margin / padding */
margin-top:10px;
margin-bottom:-8px;
padding:4px;
}
.xo_options_divider {
/* taken from mediawiki stylesheet via inspect element */
clear: both;
border-bottom: 1px solid #eaecf0;
padding-top: 0.5em;
margin-bottom: 0.5em;
}
.xo_options_ul {
/* remove bullet and margins */
padding: 0;
margin: 0 !important;
list-style: none !important; /* DRD: !important to overide default element css */
}
.xo_options_ul > li > div > label {
margin-left: 10px;
width:120px;
}
.xo_options_ul .xo_options_ipt {
width:calc(100% - 140px);
}
.xo_options_ul input {
/* DRD:needed else will be gray */
background-color:white;
border:1px solid #ddd;
padding:2px;
}
.xo_options_toggle_div {
margin: 0px 4px 0px 4px;
}
/*---------------------------------------------------------------------------*/
/* RESULTS:WIKI */
/*---------------------------------------------------------------------------*/
.xo_results_wiki_div {
background-color:rgb(187,187,255);
padding:2px
}
.xo_results_wiki_toggle {
margin:0 6px 0 6px;
}
.xo_results_wiki_paging_div {
margin-left: 10px;
}
.xo_results_wiki_paging_btn {
margin:0px 10px 0px 10px
}
/*---------------------------------------------------------------------------*/
/* RESULTS:PAGE */
/*---------------------------------------------------------------------------*/
.xo_results_page_div {
background-color:#d5ffd5;
}
.xo_results_page_toggle {
margin:0 6px 0 8px;
}
.xo_results_page_ellipsis {
align-self: flex-end;
-webkit-align-self: flex-end;
display: inline-block;
width: 16px; height: 13px; min-width: 16px; min-height: 13px; background-size: 16px 13px;
background-repeat: no-repeat; background-position: center bottom;
cursor: pointer;
}
/*---------------------------------------------------------------------------*/
/* RESULTS:SNIP */
/*---------------------------------------------------------------------------*/
/* add border between snips */
.xo_results_snip_div:first-child {
border-top: 1px solid #ddd;
}
.xo_results_snip_div {
border-bottom: 1px solid #ddd;
}
.xo_results_line_num {
align-self: flex-start; /* vertically align at top */
-webkit-align-self: flex-start;
margin:1px 7px 1px 11px; /* top/bottom to give some space around border; */
/* standardize code across platforms (from Chrome / inspect) */
color: #000;
background-color: #f8f9fa;
border: 1px solid #eaecf0;
border-radius: 2px;
padding: 1px 4px;
}
.snip_highlight {
font-weight: bold; /* emulate Special:Search */
}
/*---------------------------------------------------------------------------*/
/* PULSE */
/*---------------------------------------------------------------------------*/
.search_cxl_pulse {
animation: search_cxl_pulse 2s linear infinite;
-ms-animation: search_cxl_pulse 2s linear infinite;
-moz-animation: search_cxl_pulse 2s linear infinite;
-webkit-animation: search_cxl_pulse 2s linear infinite;
/* make circle */
border-radius: 50%;
}
@keyframes "search_cxl_pulse" {
0% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
50% {
opacity: .1;
background-color:rgba(255,255,255,1.0);
}
100% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
}
@-moz-keyframes search_cxl_pulse {
0% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
50% {
opacity: .1;
background-color:rgba(255,255,255,1.0);
}
100% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
}
@-webkit-keyframes "search_cxl_pulse" {
0% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
50% {
opacity: .1;
background-color:rgba(255,255,255,1.0);
}
100% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
}
@-ms-keyframes "search_cxl_pulse" {
0% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
50% {
opacity: .1;
background-color:rgba(255,255,255,1.0);
}
100% {
opacity: 1;
background-color:rgba(0,255,0,1.0);
}
}

View File

@ -0,0 +1,453 @@
(function (xo) {
xo.fulltext_searcher = new function() {
//{ SECTION:util
this.send = function(proc, args) {
args.page_guid = xo_page_guid;
try {xo.server.send_by_bridge('xowa.wiki.fulltext.searcher', proc, args);}
catch (err) {alert(err);}
}
this.alerts_enabled = false;
this.handle_err = function(s) {
if (this.alerts_enabled) {
alert(s);
}
else {
console.log(s);
}
}
//}
//{ SECTION:document.onload
this.loaded = false;
this.onload = function(evt) {
// onload fires multiple times on drd; only run once
if (this.loaded) return;
this.loaded = true;
// init notify anchor; focus search_btn
xo.notify.elem_anchor = '#main_div';
xo.elem.get('search_txt').focus();
// run search
var query = xo.elem.get_val_or_null('search_txt');
if (query && query.length > 0) {
this.search_run();
}
}
//}
//{ SECTION:search_run
this.search_is_running = false;
this.search_run = function() {
/*
* runs search automatically when page is loaded
* uses data from doc_elems...
** visible; EX: search_txt
** hidden; EX: qarg_wikis
* Doc_elems are filled in when page is generated from...
** query args; EX: &wikis=a|b
** cfg; EX: xowa.addon.search.fulltext.special.show_all_snips
Note that code is involved b/c
* need to have each search generate its own url b/c...
** http_server
** moving bwd / fwd through history)
* want to minimize unnecessary qargs based on ...
** implied scope; EX: &wikis=en.wikipedia.org when current wiki is en.wikipedia.org
** cfg; EX: &show_all_snips=1
*/
try {
// get search_text
var search_text = xo.elem.get_val_or_null('search_txt');
search_text = search_text.replace(/ /g, "_"); // replace " " with "_"; this replacement is done automatically in drd.WebView, but is done manually here with swt.swtbrowser for consistency
// get data specified by user
var msg =
{ search: xo.elem.get_val_or_null('search_txt')
, cur_wiki: xo.elem.get_val_or_null('cur_wiki')
};
// get data specified by qargs
this.search_run__add_qarg_data(msg, this.qarg_keys);
// clear results; activate cancel; focus search box
this.results__clear();
this.search_cxl__show(true);
xo.elem.get('search_btn').focus();
// send msg
this.send('search_run', msg);
this.search_is_running = true;
} catch (err) {
this.handle_err(err);
}
}
this.search_run__add_qarg_data = function(msg, keys) {
// adds qarg data to search_run msg
var len = keys.length;
for (var i = 0; i < len; i++) {
var key = 'qarg_' + keys[i];
msg[key] = xo.elem.get_val_or_null(key); // relies on msg.key == elem.id
}
}
//}
//{ SECTION:search_redirect
this.qarg_keys = ['wikis', 'ns_ids', 'limits', 'offsets', 'expand_pages', 'expand_snips', 'show_all_snips'];
this.search_redirect = function() {
// redirects to new search page with new query args when search is pressed
try {
// get search_text
var search_text = xo.elem.get_val_or_null('search_txt');
// if search_text has changed, reset offsets; EX: on 21-40 of 'earth'; changing search to 'moon' should start from 1, not 21
if (search_text !== xo.elem.get_val_or_null('qarg_search')) {
xo.elem.get('qarg_offsets').value = '0';
}
// build url
var path_prefix = xowa.app.mode == 'http_server'
? '/'
: '/site/';
var url = path_prefix + xo.elem.get_val_or_null('cur_wiki') + '/wiki/Special:XowaSearch?search=' + search_text;
var len = this.qarg_keys.length;
for (var i = 0; i < len; i++) {
url = this.search_redirect__add_to_url(url, this.qarg_keys[i]);
}
// redirect
window.navigate_to(url);
} catch (err) {
this.handle_err(err);
}
}
this.search_redirect__add_to_url = function(url, key) {
// only add qarg to url if it's been specified by user
// get qarg / dflt values
var qarg_val = xo.elem.get_val_or_null('qarg_' + key);
var dflt_val = xo.elem.get_val_or_null('dflt_' + key);
// if qarg === dflt, return url
if (qarg_val === dflt_val) {
return url;
}
// else, qarg changed; append it to url
else {
return url + '&' + key + '=' + qarg_val;
}
}
this.search_keydown = function(e) {
if(e.keyCode === 13){
e.preventDefault(); // squash further notifications
this.search_redirect();
}
}
//}
//{ SECTION:search_cxl
this.search_cxl = function() {
if (this.search_is_running) {
this.send('search_cxl', {page_guid: xo.elem.get_val_or_null('page_guid')});
xo.elem.get('search_cxl_msg').style.display = 'block';
}
}
this.search_cxl__show = function(show) {
if (show) {
xo.elem.get('search_cxl_btn').classList.add('search_cxl_pulse');
}
else {
xo.elem.get('search_cxl_btn').classList.remove('search_cxl_pulse');
xo.elem.get('search_cxl_msg').style.display = 'none';
}
}
//}
//{ SECTION:paging
this.paging_fwd = function(wiki) {this.paging_dir(wiki, true);}
this.paging_bwd = function(wiki) {this.paging_dir(wiki, false);}
this.paging_dir = function(wiki, fwd) {
try {
// get wiki_idx for wiki from qarg_wikis; needed for offset / limit; EX: wikis=a|b offsets=0|20
var wiki_idx = -1;
var qarg_wikis_str = xo.elem.get_val_or_null('qarg_wikis');
var qarg_wikis_ary = qarg_wikis_str.split('|');
var qarg_wikis_len = qarg_wikis_ary.length;
for (var i = 0; i < qarg_wikis_len; i++) {
var qarg_wiki = qarg_wikis_ary[i];
if (wiki === qarg_wiki) {
wiki_idx = i;
break;
}
}
if (wiki_idx == -1) {
this.handle_err('could not find wiki_idx; wiki=' + wiki + ' qargs=' + qarg_wikis_str);
return;
}
// get offset / limit
var limit = this.paging_dir__get_val_or_0th(wiki_idx, 'qarg_limits');
var old_offset = this.paging_dir__get_val_or_0th(wiki_idx, 'qarg_offsets');
// calc new_offset
var new_offset = old_offset + limit * (fwd ? 1 : -1);
if (new_offset < 0) {
new_offset = 0; // handle negative offsets; EX: old_offset=20 -> limit changed to 30 -> new_offset=-10 -> new_offset=0
if (old_offset == 0) // ignore noops at BOS; EX: old_offset=0 -> limit changed to 30 -> new_offset = -30 -> new_offset=0 -> don't reload page since new_offset = old_offset
return;
}
// set it and redirect
this.paging_dir__set_val('qarg_offsets', wiki_idx, qarg_wikis_len, new_offset);
this.search_redirect();
} catch (err) {
this.handle_err(err);
}
}
this.paging_dir__get_val_or_0th = function(wiki_idx, key) {
// get ary; EX: offset=0|20
var ary = xo.elem.get_val_or_null(key).split('|');
var ary_len = ary.length;
// get nth val based on wiki_idx
var rv = wiki_idx < ary_len
? ary[wiki_idx] // nth exists; EX: wikis=a|b offsets=0 wiki=a -> wiki_idx=0 -> return i
: ary[ary_len - 1] // nth missing; EX: wikis=a|b offsets=0 wiki=b -> wiki_idx=1 -> return nth
;
return parseInt(rv);
}
this.paging_dir__set_val = function(key, wiki_idx, wikis_len, val) {
// get ary; EX: offset=0|20
var ary = xo.elem.get_val_or_null(key).split('|');
var ary_len = ary.length;
var s = '';
// concat new_val by iterating over old_val
for (var i = 0; i < wikis_len; i++) {
var item = '';
// item is cur_wiki; use it
if (i == wiki_idx) {
item = val.toString();
}
else {
// item is other_wiki; use nth if available, or else 0th
item = i < ary_len ? ary[i] : ary[0];
}
if (i != 0) s+= '|';
s += item;
}
// set new val
var elem = document.getElementById(key);
elem.value = s;
}
//}
//{ SECTION:results
//{ SECTION:results_misc
this.results__clear = function() {
var elem = xo.elem.get('results_wikis');
elem.innerHTML = "<div id='results_wikis_last'>&nbsp;</div>";
}
this.results__done__recv = function(msg) {return this.results__done(JSON.parse(msg));}
this.results__done = function(msg) {
this.search_cxl__show(false);
this.search_is_running = false;
return true;
}
//}
//{ SECTION:add procs
this.results__wiki__add__recv = function(msg) {return this.results__wiki__add(JSON.parse(msg));}
this.results__wiki__add = function(msg) {
try {
// set expand_pages vars
var expand_pages = msg.expand_pages;
msg.expand_pages_icon = expand_pages ? 'xoimg_toggle_hide' : 'xoimg_toggle_show';
msg.expand_pages_style = expand_pages ? 'block' : 'none';
// create wiki-grp elem
var div = xo.elem.make('results_wikis', 'div');
xo.tmpl.fmt('xofts.wiki', div, msg);
// hide '(searching ###)' if lucene (only show for wikitext searches)
if (msg.type_is_lucene) {
elem = document.getElementById("results_wiki_" + msg.wiki + "_searched_div");
elem.style.display = 'none';
}
} catch (err) {
this.handle_err(err + " proc=results__wiki__add; msg=" + JSON.stringify(msg));
}
return true;
}
this.results__page__add__recv = function(msg) {return this.results__page__add(JSON.parse(msg));}
this.results__page__add = function(msg) {
try {
// get vars
var wiki = msg.wiki;
// get vars for href.page
var page_ttl = msg.page_ttl;
msg.page_href = page_ttl.replace(/\'/g, '%27'); // escape apos, else will break "href=''"
msg.page_name = page_ttl.replace(/_/g, " "); // replace _ for display purposes
// set expand_snips vars
var expand_snips = msg.expand_snips;
msg.expand_snips_icon = expand_snips ? 'xoimg_toggle_hide' : 'xoimg_toggle_show';
msg.expand_snips_style = expand_snips ? 'block' : 'none';
// create wiki_div html
var wiki_div_key = "results_wiki_" + wiki + "_content";
// wiki_div sometimes doesn't exist when (a) XOWA-desktop is first starting; and (b) restoring a Search in 1st tab; if it doesn't exist, create it
if (!xo.elem.get(wiki_div_key)) {
this.results__wiki__add({wiki: wiki});
}
var div = xo.elem.make(wiki_div_key, 'div');
xo.tmpl.fmt('xofts.page', div, msg);
// publish elem_add event for popups
var page_elem_key = 'results_wiki_' + wiki + '_page_' + msg.page_id;
var page_elem = xo.elem.get(page_elem_key);
xo.elem.elem_add__pub(page_elem);
} catch (err) {
this.handle_err(err + " proc=results__page__add; msg=" + JSON.stringify(msg));
}
return true;
}
this.results__line__add__recv = function(msg) {return this.results__line__add(JSON.parse(msg));}
this.results__line__add = function(msg) {
try {
// make page_div key
var wiki = msg.wiki;
var page_id = msg.page_id;
var div_key = 'results_wiki_' + wiki + '_page_' + page_id + '_content';
// generate html
var div = xo.elem.make(div_key, 'div');
xo.tmpl.fmt('xofts.snip', div, msg);
} catch (err) {
this.handle_err(err + " msg=" + JSON.stringify(msg));
}
return true;
}
//}
//{ SECTION:update procs
this.results__wiki__update__recv = function(msg) {return this.results__wiki__update(JSON.parse(msg));}
this.results__wiki__update = function(msg) {
try {
elem = document.getElementById("results_wiki_" + msg.wiki + "_searched");
elem.textContent = msg.searched;
} catch (err) {
this.handle_err(err + " proc=results__wiki__update msg=" + JSON.stringify(msg));
}
return true;
}
this.results__page__update__recv = function(msg) {return this.results__page__update(JSON.parse(msg));}
this.results__page__update = function(msg) {
try {
var wiki = msg.wiki;
var page_id = msg.page_id;
var found = msg.found;
var show_all_snips = msg.show_all_snips;
var elem = document.getElementById("results_wiki_" + wiki + "_page_" + page_id + "_found");
elem.textContent = found;
if (found > 1 && !show_all_snips) {
var elem = document.getElementById('results_wiki_' + wiki + '_page_' + page_id + '_rest');
elem.style.display = 'initial';
}
} catch (err) {
this.handle_err(err + " msg=" + JSON.stringify(msg));
}
return true;
}
//}
//}
//{ SECTION:snips_show_all
this.snips_show_all = function(qry_id, wiki, page_id) {
try {
// hide snips_show_allbutton
var elem = document.getElementById('results_wiki_' + wiki + '_page_' + page_id + '_rest');
elem.style.display = 'none';
// always expand toggle_page indicator
this.show_div
( xo.elem.get('results_wiki_' + wiki + '_page_' + page_id + '_content')
, xo.elem.get('results_wiki_' + wiki + '_page_' + page_id + '_img')
, true
);
// remove focus to button
document.activeElement.blur();
// send message
var data =
{ qry_id: qry_id
, wiki: wiki
, page_id: page_id
};
this.send('snips_show_all', data);
} catch (err) {
this.handle_err(err);
}
}
//}
//{ SECTION:options_save
this.options_save = function() {
try {
this.send('options_save',
{ 'expand_options': xo.elem.get('xo_options_list_container').style.display === 'block'
});
} catch (err) {
this.handle_err(err);
}
}
//}
//{ SECTION:toggle_div
this.toggle_div = function(div_id, img_id) {
var div_elem = document.getElementById(div_id);
var img_elem = document.getElementById(img_id);
var show = div_elem.style.display === "block";
return this.show_div(div_elem, img_elem, !show);
}
this.show_div = function(div_elem, img_elem, show) {
if (show) {
div_elem.style.display = "block";
img_elem.classList.remove("xoimg_toggle_show");
img_elem.classList.add ("xoimg_toggle_hide");
}
else {
div_elem.style.display = "none";
img_elem.classList.remove("xoimg_toggle_hide");
img_elem.classList.add ("xoimg_toggle_show");
}
return true;
}
//}
}
}(window.xo = window.xo || {}));
/*
TOMBSTONE: onload does not work on droid where WM overrides onload
if(window.onload) {
var onload_old = window.onload;
var onload_new = function(evt) {
onload_old(evt);
xo.fulltext_searcher.onload(evt);
};
window.onload = onload_new;
} else {
window.onload = xo.fulltext_searcher.onload;
}
*/
window.onbeforeunload = function(event) {
xo.fulltext_searcher.search_cxl();
};
setTimeout(function() { // wait for mustache to load files async
xo.fulltext_searcher.onload({});
}, 0); // was 400

View File

@ -0,0 +1,236 @@
<!-- help div -->
{{#disabled}}
<div>
<p>Full-text search is not available</p>
<p>Please download a full-text search index for your wiki from Download Central</p>
<p>For more info, see <a href='http://xowa.org/home/wiki/App/Full-text_search/Lucene/Search_indexes/Getting'>http://xowa.org/home/wiki/App/Full-text_search/Lucene/Search_indexes/Getting</a></p>
</div>
{{/disabled}}
{{^disabled}}
<div class='xo_flex_div'>
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<b>Buttons</b>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_ellipsis' >&nbsp;</span><span class='xohelp_row_text'>Show all snips</b></span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_misc_cancel'>&nbsp;</span><span class='xohelp_row_text'>Cancel search</b></span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_toggle_show'>&nbsp;</span><span class='xohelp_row_text'>Expand section</b></span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_toggle_hide'>&nbsp;</span><span class='xohelp_row_text'>Collapse section</b></span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_paging_bwd' >&nbsp;</span><span class='xohelp_row_text'>Retrieve next page of results</b></span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_paging_fwd' >&nbsp;</span><span class='xohelp_row_text'>Retrieve previous page of results</b></span></div>
<b>Options</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Wikis</b>: List wikis to search using a pipe (|) character; EX: <code>en.wikipedia.org|simple.wikipedia.org</code></span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Namespaces</b>: List namespaces to search using a comma character; EX: <code>0,4</code> </span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Results per page</b>: List number of results per page; EX: <code>50</code> </span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Expand pages</b>: Expand pages sections when retrieving results. If 'n', pages will be collapsed; if 'y', pages will be expanded </span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Expand snips</b>: Expand snips sections when retrieving results. If 'n', snips will be collapsed; if 'y', snips will be expanded </span></div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'><b>Show all snips</b>: Show all snips when retrieving results. If 'n', only the first snip will show; if 'y', all snips will show</span></div>
</div>
<b>Advanced notes</b>
<div style='margin-left:15px'>
For multiple wikis, options can be specified per wiki using the pipe character.<br/>
For example:<br/>
* If <code>Wikis</code> is <code>en.wikipedia.org|simple.wikipedia.org</code><br/>
* And <code>Results per page</code> is <code>20|10</code><br/>
* Then <code>en.wikipedia.org</code> will retrieve <code>20</code> results per page and <code>simple.wikipedia.org</code> will retrieve <code>10</code> results per page
</div>
{{^app_is_drd}}
For more info, see <a href='/site/home/wiki/App/Full-text_search'>App/Full-text_search</a>
{{/app_is_drd}}
</div>
</div>
</div>
<!-- DIV:main -->
<div id='search_cxl_msg' style='display:none'>
Canceling. Please wait...
</div>
<div id='main_div'>
<div class="xo_flex_div oo-ui-fieldLayout-field">
<!-- DIV:search_text -->
<div
id="searchText"
class="xo_flex_div oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-iconElement oo-ui-textInputWidget oo-ui-textInputWidget-type-text oo-ui-indicatorElement mw-widget-titleWidget oo-ui-lookupElement mw-widget-titleInputWidget mw-widget-searchInputWidget oo-ui-textInputWidget-type-search"
data-ooui="" aria-disabled="false"
>
<input
id="search_txt"
placeholder="Enter search words (For example: earth)"
accesskey="m"
onkeydown="xo.fulltext_searcher.search_keydown(event)"
value="{{qarg_search}}"
class="oo-ui-inputWidget-input xo_search_box"
autocapitalize="off"
name="search"
type="search"
aria-disabled="false"
tabindex="0"
/>
<span class="oo-ui-iconElement-icon oo-ui-icon-search xoimg_search">&nbsp;</span>
<span class="oo-ui-indicatorElement-indicator oo-ui-indicator-clear">&nbsp;</span>
</div>
<!-- DIV:search_btn -->
<div
class="xo_flex_div oo-ui-widget oo-ui-widget-enabled oo-ui-flaggedElement-progressive oo-ui-flaggedElement-primary oo-ui-inputWidget oo-ui-buttonElement oo-ui-buttonElement-framed oo-ui-labelElement oo-ui-buttonInputWidget"
aria-disabled="false"
>
<button
id="search_btn"
onclick="return xo.fulltext_searcher.search_redirect()"
class="oo-ui-inputWidget-input oo-ui-buttonElement-button"
value="" aria-disabled="false" tabindex="0" type="submit"
>
<span class="oo-ui-iconElement-icon oo-ui-image-invert">&nbsp;</span>
<span class="oo-ui-labelElement-label">Search</span>
<span class="oo-ui-indicatorElement-indicator oo-ui-image-invert">&nbsp;</span>
</button>
</div>
<!-- DIV:search_cxl_btn -->
<div class='xo_flex_div'>
<div id="search_cxl_btn" style="opacity: 0.25;" class="xo_imgbtn_x24 xoimg_misc_cancel" title="cancel" onclick="xo.fulltext_searcher.search_cxl()"></div>
</div>
<!-- DIV:help_btn -->
<div class='xo_flex_div xo_help_div'>
<span onclick='return xo.help.toggle("cur")' title="view help" class="xo_imgbtn_x20 xoimg_help_tip">&nbsp;</span>
</div>
</div>
<!-- DIV:options_btn -->
<div class="xo_options_div mw-search-profile-tabs">
<!-- DIV:options header -->
<div class='xo_flex_div'>
<div
class='xo_options_toggle_div'
onclick='xo.fulltext_searcher.toggle_div("xo_options_list_container", "xo_options_img"); xo.fulltext_searcher.options_save();'
>
<span
id='xo_options_img'
class='xo_imgbtn_x20 {{#expand_options}}xoimg_toggle_hide{{/expand_options}}{{^expand_options}}xoimg_toggle_show{{/expand_options}}'
>&nbsp;</span>
</div>
<div class='xo_flex_text'>Options</div>
<div class='xo_flex_text'>
<a href='/wiki/Special:XowaCfg?grp=xowa.addon.fulltext_search' title='go to options page'>
<span
id='xo_options_cog'
class='xo_imgbtn_x20 xoimg_cog'
style='margin-left:10px'
>&nbsp;</span>
</a>
</div>
</div>
<!-- DIV:options list -->
<div id='xo_options_list_container' class='xo_options_list_container' style='display:{{#expand_options}}block{{/expand_options}}{{^expand_options}}none{{/expand_options}}'>
<div class='xo_options_divider'></div>
<ul class='xo_options_ul'>
<li>
<div class='xo_flex_div'>
<label>Wikis</label>
<input
type="text"
onkeydown="xo.fulltext_searcher.search_keydown(event)"
id="qarg_wikis"
value="{{qarg_wikis}}"
placeholder="Enter wikis separated by a pipe (For example: home|wiki.me.org)"
autocapitalize="off"
/>
</div>
</li>
<li>
<div class='xo_flex_div'>
<label>Namespaces</label>
<input
type="text"
onkeydown="xo.fulltext_searcher.search_keydown(event)"
id="qarg_ns_ids"
value="{{qarg_ns_ids}}"
placeholder="Enter namespaces separated by a pipe (For example: 0|4)"
/>
</div>
</li>
<li>
<div class='xo_flex_div'>
<label>Results per page</label>
<input
type="text"
onkeydown="xo.fulltext_searcher.search_keydown(event)"
id="qarg_limits"
value="{{qarg_limits}}"
placeholder="Enter number of pages to show per search (For example: 100)"
/>
</div>
</li>
<li>
<div class='xo_flex_div'>
<label>Expand pages</label>
<input
type="text"
onkeydown="xo.fulltext_searcher.search_keydown(event)"
id="qarg_expand_pages"
value="{{qarg_expand_pages}}"
placeholder="Enter y to expand; n to collapse"
autocapitalize="off"
/>
</div>
</li>
<li>
<div class='xo_flex_div'>
<label>Expand snips</label>
<input
type="text"
onkeydown="xo.fulltext_searcher.search_keydown(event)"
id="qarg_expand_snips"
value="{{qarg_expand_snips}}"
placeholder="Enter y to expand; n to collapse"
autocapitalize="off"
/>
</div>
</li>
<li>
<div class='xo_flex_div'>
<label>Show all snips</label>
<input
type="text"
onkeydown="xo.fulltext_searcher.search_keydown(event)"
id="qarg_show_all_snips"
value="{{qarg_show_all_snips}}"
placeholder="Enter y to show all snips; n to show first only"
autocapitalize="off"
/>
</div>
</li>
</ul>
</div>
</div>
<!-- DIV:wikis_list -->
<div id='results_wikis'></div>
</div>
<!-- DIV:hidden inputs -->
<div>
<input type='hidden' id='page_guid' value='{{page_guid}}'></input>
<input type='hidden' id='qarg_search' value='{{qarg_search}}'></input>
<input type='hidden' id='qarg_offsets' value='{{qarg_offsets}}'></input>
<input type='hidden' id='cur_wiki' value='{{cur_wiki}}'></input>
<input type='hidden' id='dflt_wikis' value='{{dflt_wikis}}'></input>
<input type='hidden' id='dflt_ns_ids' value='{{dflt_ns_ids}}'></input>
<input type='hidden' id='dflt_limits' value='{{dflt_limits}}'></input>
<input type='hidden' id='dflt_offsets' value='{{dflt_offsets}}'></input>
<input type='hidden' id='dflt_expand_pages' value='{{dflt_expand_pages}}'></input>
<input type='hidden' id='dflt_expand_snips' value='{{dflt_expand_snips}}'></input>
<input type='hidden' id='dflt_show_all_snips' value='{{dflt_show_all_snips}}'></input>
</div>
{{/disabled}}

View File

@ -0,0 +1,30 @@
<div
id='results_wiki_{{wiki}}_page_{{page_id}}'
class='xo_flex_div;'
>
<!-- DIV:page results -->
<div class='xo_flex_div xo_results_page_div'>
<!-- TOGGLE:page -->
<span
id="results_wiki_{{wiki}}_page_{{page_id}}_img"
class='xo_imgbtn_x20 {{expand_snips_icon}} xo_results_page_toggle'
onclick='xo.fulltext_searcher.toggle_div("results_wiki_{{wiki}}_page_{{page_id}}_content", "results_wiki_{{wiki}}_page_{{page_id}}_img"); return false;'
>&nbsp;</span>
<!-- HREF:page -->
<span class='xo_flex_div'><a href='/site/{{wiki}}/wiki/{{page_href}}'>{{page_name}}</a>&nbsp;(<span id='results_wiki_{{wiki}}_page_{{page_id}}_found'>{{found}}</span>&nbsp;found)</span>
<!-- BTN:get_snips -->
<span
id='results_wiki_{{wiki}}_page_{{page_id}}_rest'
class='xoimg_ellipsis xo_results_page_ellipsis'
onclick='xo.fulltext_searcher.snips_show_all("{{query_id}}", "{{wiki}}", "{{page_id}}");'
style='display:none;'
>&nbsp;
</span>
</div>
</div>
<!-- DIV:SNIPS -->
<div id='results_wiki_{{wiki}}_page_{{page_id}}_content' style='display:{{expand_snips_style}};'></div>

View File

@ -0,0 +1,12 @@
<div
id='results_wiki_{{wiki}}_page_{{page_id}}_line_{{line}}'
class='xo_flex_div xo_results_snip_div'
>
<!-- TEXT:line_num -->
<div class='xo_results_line_num'>
{{line}}
</div>
<!-- TEXT:line_html -->
<div>{{{html}}}</div>
</div>

View File

@ -0,0 +1,47 @@
<div id='results_wiki_{{wiki}}'>
<div class='xo_flex_div xo_results_wiki_div'>
<!-- TOGGLE:wiki -->
<span
id="results_wiki_{{wiki}}_img"
class='xo_imgbtn_x20 {{expand_pages_icon}} xo_results_wiki_toggle'
onclick='xo.fulltext_searcher.toggle_div("results_wiki_{{wiki}}_content", "results_wiki_{{wiki}}_img");'
>&nbsp;</span>
<!-- HREF:wiki -->
<div class='xo_flex_div'>
<a href='/site/{{wiki}}/wiki/'>{{wiki}}</a>&nbsp;
<div
id='results_wiki_{{wiki}}_searched_div'
class='xo_flex_text'
>(<span id='results_wiki_{{wiki}}_searched'>0</span>&nbsp;searched)
</div>
</div>
<!-- DIV:results -->
<div class='xo_flex_div xo_results_wiki_paging_div'>
<!-- BTN:paging_bwd -->
<span
id="results_wiki_{{wiki}}_bwd"
class='xo_imgbtn_x20 xoimg_paging_bwd xo_results_wiki_paging_btn'
onclick='xo.fulltext_searcher.paging_bwd("{{wiki}}")'
>&nbsp;</span>
<!-- TEXT:results; EX: "Results: 1 of 10" -->
<div class='xo_flex_div'>
Results: <div style='text-align:center;width:40px'>{{rng_bgn}}</div> - <div style='text-align:center;width:40px'>{{rng_end}}</div>
</div>
<!-- BTN:paging_fwd -->
<span
id="results_wiki_{{wiki}}_fwd"
class='xo_imgbtn_x20 xoimg_paging_fwd xo_results_wiki_paging_btn'
onclick='xo.fulltext_searcher.paging_fwd("{{wiki}}")'
>&nbsp;</span>
</div>
</div>
<!-- DIV:page list -->
<div id='results_wiki_{{wiki}}_content' style='display:{{expand_pages_style}};'></div>
</div>
<div style='clear:both;display:none;'></div>

View File

@ -0,0 +1,38 @@
.cur_head_text {
width: calc(100% - 72px);
/* handle long paths */
font-size: 1em !important;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.cur_head_btns {
width: 72px;
}
.fsys_go_up_offset {
margin-top: -4px; /* nudge icon up to align with help */
}
.cur_data_row {
height: 50px;
}
.cur_link_btn {
display: flex;
width: 100%;
height: 100%;
}
.fsys_dir_txt {
display: inline-block;
align-self: center;
}
.fsys_fil_txt {
display: inline-block;
align-self: center;
}
.fsys_meta_txt {
display: block;
color: #828282;
font-family: monospace;
font-size: .8em;
}

View File

@ -0,0 +1,68 @@
<div class='main_div'>
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<div>
<b>Quick start</b>
<div>
<div class='xohelp_row'><span class='xohelp_bullet'>&nbsp;</span><span class='xohelp_row_text'>Navigate to the directory containing the XOWA wiki. For example, choose 'storage' -> 'CARD-NAME' -> 'xowa' -> 'wiki' -> 'en.wikipedia.org'</span></div>
</div>
<b>Buttons</b>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_fsys_go_up'>&nbsp;</span><span class='xohelp_row_text'>Go up to the parent folder</span></div>
{{#dir_cmd_exists}}
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_misc_ok'>&nbsp;</span><span class='xohelp_row_text'>Select current folder</span></div>
{{/dir_cmd_exists}}
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_fsys_dir'>&nbsp;</span><span class='xohelp_row_text'>Open the folder</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_xowa'>&nbsp;</span><span class='xohelp_row_text'>Import the XOWA wiki</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_fsys_fil_blank'>&nbsp;</span><span class='xohelp_row_text'>Does nothing. Indicates the file is unselectable</span></div>
</div>
</div>
</div>
</div>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>{{path}}</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_fsys_go_up fsys_go_up_offset' href="/site/home/wiki/Special:XowaFileBrowser?path={{owner_dir_enc}}{{dir_cmd_arg}}">&nbsp;</a>
{{#dir_cmd_exists}}
<a class='xoimg_btn_x24 xoimg_misc_ok fsys_go_up_offset' href="/site/home/wiki/Special:XowaFileBrowser?path={{path_enc}}{{dir_cmd_arg}}&selected=1">&nbsp;</a>
{{/dir_cmd_exists}}
<a class='xoimg_btn_x24 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.help.toggle("cur")' title='view help'>&nbsp;</a>
</div>
</div>
{{#subs}}
<div class='xotbl_data_row cur_data_row'>
{{#is_dir}}
<a
class="link_btn_y cur_link_btn"
href="/site/home/wiki/Special:XowaFileBrowser?path={{path_enc}}{{dir_cmd_arg}}"
>
<span class='xoimg_btn_x24 xoimg_fsys_dir'>&nbsp;</span>
<span class='fsys_dir_txt'>{{name}}</span>
</a>
{{/is_dir}}
{{^is_dir}}
{{#is_core_xowa}}
<a
class="link_btn_y cur_link_btn"
href='/site/home/wiki/Special:XowaWikis?cmd=add&file={{path_enc}}'
>
<span class='xoimg_btn_x24 xoimg_xowa'>&nbsp;</span>
<span class='fsys_fil_txt'>
<span>{{name}}</span>
<span class='fsys_meta_txt'>{{date}}&nbsp;[{{size}}]</span>
</span>
</a>
{{/is_core_xowa}}
{{^is_core_xowa}}
<div class="link_btn_n cur_link_btn">
<span class='xoimg_btn_x24 xoimg_fsys_fil_blank'>&nbsp;</span>
<span class='fsys_fil_txt'>
<span>{{name}}</span>
<span class='fsys_meta_txt'>{{date}}&nbsp;[{{size}}]</span>
</span>
</div>
{{/is_core_xowa}}
{{/is_dir}}
</div>
{{/subs}}
</div>

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--
NOTE: this page loads local files
- Chrome is the easiest browser for local files; Use "chrome.exe --disable-web-security"
- Change C:/xowa/ to wherever it is on your system
-->
<!-- base -->
<base href="file:///C:/xowa/" target="_blank">
<!-- css -->
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.core.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.bootstrap.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xocss_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xoimg_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/wiki/import/bin/xow_import.css">
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/alertify-0.3.11.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/xo-alertify-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/mustache/mustache-2.2.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/jquery/jquery-1.11.3.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.js"></script>
<!-- mustache -->
<script type="text/html" id="templates"></script>
<script type="text/javascript">
window.view = {
path : '/storage/sdcard1/xowa/wiki/',
owner_dir_enc : 'owner',
subs:
[
{is_dir:true , is_core_xowa:false, path_enc: 'a', name:'en.wikipedia.org'},
{is_dir:true , is_core_xowa:false, path_enc: 'b', name:'simple.wikipedia.org'},
{is_dir:false, is_core_xowa:true , path_enc: 'c', name:'simple.wikipedia.org-file-user.xowa' , date:'2015-12-20', size:'56 KB'},
{is_dir:false, is_core_xowa:false, path_enc: 'd', name:'simple.wikipedia.org-file-user1.xowa', date:'2015-12-20', size:'56 KB'},
{is_dir:false, is_core_xowa:false, path_enc: 'd', name:'simple.wikipedia.org-file-user2.xowa', date:'2015-12-20', size:'56 KB'},
{is_dir:false, is_core_xowa:false, path_enc: 'd', name:'simple.wikipedia.org-file-user3.xowa', date:'2015-12-20', size:'56 KB'},
],
};
</script>
<script type="text/javascript">
$("#templates").load("bin/any/xowa/addon/wiki/import/bin/xow_import.mustache.html", function(response_txt, status_txt, xhr){
var template = response_txt;
var output = Mustache.render(template, window.view);
document.getElementById('main').innerHTML = output;
});
</script>
</head>
<body>
<div id="main"></div>
</body>
</html>

View File

@ -0,0 +1,28 @@
.cur_head_text {
width: calc(100% - 83px);
}
.cur_head_btns {
width: 72px;
}
/* Detail Tbl */
.cur_data_row {
padding: 4px 0px 4px;
}
.cur_data_row label {
display: inline-block;
width: 50px;
margin: 0px 4px 0px 10px;
vertical-align: top;
align-self: flex-start;
-webkit-align-self: flex-start;
font-weight: bold;
}
.cur_data_row label::after {
content: ":";
}
.cur_data_row span {
display: inline-block;
width: calc(100% - 70px);
}

View File

@ -0,0 +1,40 @@
<div class='main_div'>
{{#wiki_info}}
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_list_delete'>&nbsp;</span><span class='xohelp_row_text'>Delete the wiki and all its files</span></div>
</div>
</div>
</div>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>Details</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_list_delete' title='delete wiki' href='javascript:void(0)'
data_alertify_msg='Are you sure you want to delete {{wiki_domain}}?<br/>({{wiki_size}} will be deleted!)'
data_alertify_ok='Delete'
data_alertify_cancel='Cancel'
data_alertify_href='/site/home/wiki/Special:XowaWikiInfo?cmd=delete&wiki={{wiki_domain}}'
onclick='return xo.alertify.confirm_href(this);'>&nbsp;
</a>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Wiki</label>
<span>{{wiki_domain}}</span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Date</label>
<span>{{wiki_date}}</span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Path</label>
<span>{{wiki_dir}}</span>
</div>
<div class="xotbl_data_row cur_data_row">
<label>Size</label>
<span>{{wiki_size}}</span>
</div>
{{/wiki_info}}
</div>

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--
NOTE: this page loads local files
- Chrome is the easiest browser for local files; Use "chrome.exe --disable-web-security"
- Change C:/xowa/ to wherever it is on your system
-->
<!-- base -->
<base href="file:///C:/xowa/" target="_blank">
<!-- css -->
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.core.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.bootstrap.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xocss_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xoimg_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/wiki/registry/info/bin/xow_info.css">
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/alertify-0.3.11.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/xo-alertify-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/mustache/mustache-2.2.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/jquery/jquery-1.11.3.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.js"></script>
<!-- mustache -->
<script type="text/html" id="templates"></script>
<script type="text/javascript">
window.view = {
wiki_info :
{
wiki_domain : 'en.wikipedia.org'
, wiki_date : '2016-06-01'
, wiki_dir : 'C:\\xowa\\wiki\\en.wikipedia.org'
}
};
</script>
<script type="text/javascript">
$("#templates").load("bin/any/xowa/addon/wiki/registry/info/bin/xow_info.mustache.html", function(response_txt, status_txt, xhr){
var template = response_txt;
var output = Mustache.render(template, window.view);
document.getElementById('main').innerHTML = output;
});
</script>
</head>
<body>
<div id="main"></div>
</body>
</html>

View File

@ -0,0 +1,29 @@
/* head row */
.cur_head_text {
width: calc(100% - 113px);
}
.cur_head_btns {
width: 112px;
}
/* wiki row */
.cur_data_row {
height: 44px;
width: 100%;
}
.wiki_link_btn {
display: flex;
align-items: center;
width: calc(100% - 36px);
height: 100%;
}
.wiki_domain {
display: inline-block;
width: calc(100% - 136px);
}
.wiki_date {
display: inline-block;
width: 100px;
text-align: center;
}

View File

@ -0,0 +1,30 @@
<div class='main_div'>
<div id='cur_help_div' class='xohelp_div'>
<div id='cur_help_msg' class='xohelp_msg'>
<div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_fsys_dir'>&nbsp;</span><span class='xohelp_row_text'>Import wikis from your device or SD card using a file browser</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_inet_download'>&nbsp;</span><span class='xohelp_row_text'>Download wikis from archive.org</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_xowa'>&nbsp;</span><span class='xohelp_row_text'>Open the wiki and go to its Main Page</span></div>
<div class='xohelp_row'><span class='xoimg_help_x24 xoimg_help_info'>&nbsp;</span><span class='xohelp_row_text'>View more information about the wiki</span></div>
</div>
</div>
</div>
<div class='xotbl_head_row'>
<div class='xotbl_head_text cur_head_text'>Wikis</div>
<div class='xotbl_head_btns cur_head_btns'>
<a class='xoimg_btn_x24 xoimg_fsys_dir' title='add wiki' href="/wiki/Special:XowaFileBrowser?path={{import_root}}">&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_inet_download' title='download' href="/wiki/Special:XowaDownloadCentral">&nbsp;</a>
<a class='xoimg_btn_x24 xoimg_help_tip' title='view help' href='javascript:void(0)' onclick='return xo.help.toggle("cur")'>&nbsp;</a>
</div>
</div>
{{#subs}}
<div class="xotbl_data_row cur_data_row">
<a class="link_btn_y wiki_link_btn" href="/site/{{domain}}/wiki/">
<span class='xoimg_btn_x24 xoimg_xowa'>&nbsp;</span>
<span class='wiki_domain'>{{domain}}</span>
<span class='wiki_date'>{{date}}</span>
</a>
<a class='xoimg_btn_x24 xoimg_help_info' href="/wiki/Special:XowaWikiInfo?wiki={{domain}}" title="info">&nbsp;</a>
</div>
{{/subs}}
</div>

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!--
NOTE: this page loads local files
- Chrome is the easiest browser for local files; Use "chrome.exe --disable-web-security"
- Change C:/xowa/ to wherever it is on your system
-->
<!-- base -->
<base href="file:///C:/xowa/" target="_blank">
<!-- css -->
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.core.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/lib/alertify/themes/alertify.bootstrap.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xocss_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/core/xoimg_core-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.css">
<link type="text/css" rel="stylesheet" href="bin/any/xowa/addon/wiki/registry/list/bin/xow_list.css">
<!-- js -->
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/alertify-0.3.11.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/alertify/lib/xo-alertify-0.0.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/mustache/mustache-2.2.1.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/lib/jquery/jquery-1.11.3.js"></script>
<script type="text/javascript" src="bin/any/xowa/html/res/src/xowa/xocss/help/xohelp-0.0.1.js"></script>
<!-- mustache -->
<script type="text/html" id="templates"></script>
<script type="text/javascript">
window.view = {
import_root:'/wiki/A',
subs:
[
{date:'2016-03-06', domain:'en.wikipedia.org'},
{date:'2016-03-05', domain:'simple.wikipedia.org'},
],
};
</script>
<script type="text/javascript">
$("#templates").load("bin/any/xowa/addon/wiki/registry/list/bin/xow_list.mustache.html", function(response_txt, status_txt, xhr){
var template = response_txt;
var output = Mustache.render(template, window.view);
document.getElementById('main').innerHTML = output;
});
</script>
</head>
<body>
<div id="main"></div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,244 @@
this
.fallback_load('ru')
.ns_names
.load_text(
<:['
-2|Амедиа
-1|Цастәи
1|Ахцәажәара
2|Алахәыла
3|Алахәыла ахцәажәара
5|$1 ахцәажәара
6|Афаил
7|Афаил ахцәажәара
8|Амедиавики
9|Амедиавики ахцәажәара
10|Ашаблон
11|Ашаблон ахцәажәара
12|Ацхыраара
13|Ацхыраара ахцәажәара
14|Акатегориа
15|Акатегориа ахцәажәара
']:>
).lang
.ns_aliases
.load_text(
<:['
2|Иалахә
-2|Медиа
-1|Служебная
1|Обсуждение
2|Участник
3|Обсуждение участника
5|Обсуждение $1
6|Файл
7|Обсуждение файла
8|MediaWiki
9|Обсуждение MediaWiki
10|Шаблон
11|Обсуждение шаблона
12|Справка
13|Обсуждение справки
14|Категория
15|Обсуждение категории
']:>
).lang
.specials
.clear
.load_text(
<:['
Categories|Акатегориақәа
Mycontributions|Архиарақәа
Mypage|Садаҟьа
Mytalk|Сахцәажәара
Newimages|АфаилқәаҾыц
Newpages|АдаҟьақәаҾыц
Randompage|Машәырлатәи
Recentchanges|АрҽеираҾыцқәа
Search|Аҧшаара
Specialpages|ЦастәиАдаҟьақәа
Upload|Аҭагалара
']:>
).lang
.keywords
.load_text(
<:['
language|0|#АБЫЗШӘА~#ЯЗЫК~#LANGUAGE~
special|0|#цастәи~#служебная~#special~
tag|0|#tag~
index|1|__АИНДЕКС__~__ИНДЕКС__~__INDEX__~
formatdate|0|#formatdate~#dateformat~
expr|0|#expr~
if|0|#if~
ifeq|0|#ifeq~
ifexpr|0|#ifexpr~
iferror|0|#iferror~
switch|0|#switch~
default|0|#default~
ifexist|0|#ifexist~
time|0|#time~
timel|0|#timel~
rel2abs|0|#rel2abs~
titleparts|0|#titleparts~
lst|0|#section~#lst~
lstx|0|#section-x~#lstx~
invoke|0|#invoke~
property|0|#property~
noexternallanglinks|0|noexternallanglinks~
disambiguation|0|__DISAMBIG__~
']:>
).lang
.messages
.load_text(
<:['
sunday|амҽыш
monday|ашәахь
tuesday|аҩаш
wednesday|ахаш
thursday|аҧшьаш
friday|ахәуаш
saturday|асабш
january|ажьырныҳәа
february|жәабран
march|хәажәкыр
april|мшаҧы
may_long|лаҵара
june|рашәара
july|ҧхынгәы
august|нанҳәа
september|цәыббра
october|жьҭаара
november|абҵара
december|ҧхынҷкәын
january-gen|ажьырныҳәа
february-gen|жәабран
march-gen|хәажәкыра
april-gen|мшаҧы
may-gen|лаҵара
june-gen|рашәара
july-gen|ҧхынгәы
august-gen|нанҳәа
september-gen|цәыббра
october-gen|жьҭаара
november-gen|абҵара
december-gen|ҧхынҷкәын
jan|ажь
feb|жәа
mar|хәа
apr|мша
may|лаҵ
jun|раш
jul|ҧхг
aug|нан
sep|цәы
oct|жьҭ
nov|абҵ
dec|ҧхҷ
lastmodifiedat|Ацыхәтәантәи аҧсахрақәа абри адаҟьа аҟны: ~{1}, ~{0}.
otherlanguages|Абызшәақәа
pagecategories|{{PLURAL:~{0}\u007C1=Акатегориа\u007CАкатегориақәа}}
wikieditor-toolbar-characters-page-latin|Алаҭын
wikieditor-toolbar-characters-page-greek|Аберзентә
wikieditor-toolbar-characters-page-cyrillic|Акирилица
wikieditor-toolbar-characters-page-arabic|Араҧтә
wikieditor-toolbar-section-help|Ацхыраара
wikieditor-toolbar-help-page-file|Афаилқәа
wikieditor-toolbar-help-page-discussion|Ахцәажәара
wikieditor-toolbar-help-content-signature-result|<a href='#' title='Special:MyPage'> Алахәыла ахьʒ</a> (<a href='#' title='Special:MyTalk'> ахцәажәара </a>)
sitesupport|Ацхыраара зылшо
article|Адаҟьа
mytalk|Сахцәажәара
navigation|Анавигациа
qbfind|Аҧшаара
qbedit|Ариашара
qbpageoptions|Ари адаҟьа
help|Ацхыраара
search|Аҧшаара
searchbutton|Аҧшаара
searcharticle|Адаҟьа
history|Аҭоурых
history_short|Аҭоурых
printableversion|Акьыҧхьразы аверсиа
permalink|Еисымшатәи ахьарҧш
edit|Ариашамҭа
create|Арҿиара
create-this-page|Ариашара ари адаҟьа
newpage|Адаҟьа Ҿыц
talkpagelinktext|Ахцәажәара
specialpage|Цастәи адаҟьа
talk|Ахцәажәара
toolbox|Амаҵыругақәа
jumptonavigation|Анавигациа
jumptosearch|Аҧшаара
aboutsite|{{SITENAME}} иазкны
currentevents|Ииасуа ахҭысқәа
mainpage|Ихадоу Адаҟьа
mainpage-description|Ихадоу адаҟьа
privacy|Аконфиденциалтә аполитика
privacypage|Project: Аконфиденциалтә аполитика
youhavenewmessages|Уара ~{0} уауит (~{1}).
editsection|ариашамҭа
editold|ариашара
editlink|ариашара
nstab-main|Адаҟьа
nstab-user|Алахәыла
nstab-special|Цастәи адаҟьа
nstab-image|Афаил
nstab-template|Ашаблон
nstab-help|Ацхыраара
nstab-category|Акатегориа
viewsource|Ахәаҧшра
login|Урдырра
nav-login-createaccount|Урдырра / Арегистрациара
userlogin|Урдырра/Арегистрациара
logout|Асеанс дәылҵра
userlogout|Асеанс дәылҵра
loginlanguagelabel|Абызшәа: ~{0}
summary|Описание изменений:
savearticle|Адаҟьа ахьчара
editing|Ариашамҭа: ~{0}
searchresults-title|Аҧшаара «~{0}»
preferences|Архиарақәа
mypreferences|Архиарақәа
searchresultshead|Аҧшаара
yourlanguage|Абызшәа:
prefs-signature|Анапынҵамҭа
group-user|Алахәылацәа
group-user-member|{{GENDER:~{0}\u007Cалахәыла}}
grouppage-sysop|{{ns:project}}:Администраторцәа
recentchanges|Арҽеира ҿыцқәа
recentchanges-legend-newpage|~{0} — адаҟьа ҿыц
newpageletter|Ҿ
recentchangeslinked|Еимадоу ариашарақәа
recentchangeslinked-feed|Еимадоу ариашарақәа
recentchangeslinked-toolbox|Еимадоу ариашарақәа
upload|Афаил аҭагалара
filehist-user|Алахәыла
randompage|Машәырлатәи аҩымҭа
brokenredirects-edit|ариашамҭа
newpages-username|Алахәыла:
move|Ахьӡ аҧсахра
movethispage|Ахьӡ аҧсахра ари адаҟьа
specialloguserlabel|Алахәыла:
linksearch-ok|Аҧшаара
watchlist|Ашклаҧшра асна
mywatchlist|Ашклаҧшра асна
restriction-edit|Ариашамҭа
mycontris|Салагала
contribsub2|Алагала ~{0} (~{1})
sp-contributions-talk|ахцәажәара
sp-contributions-submit|Аҧшаара
whatlinkshere|Арахьтәи ахьарҧшқәа
whatlinkshere-page|Адаҟьа:
contribslink|алагала
movearticle|Ахьӡ аҧсахра:
allmessages-language|Абызшәа:
ilsubmit|Аҧшаара
namespacesall|зегьы
monthsall|зегьы
fileduplicatesearch-submit|Аҧшаара
specialpages|Цастәи адаҟьақәа
specialpages-group-login|Урдырра / Арегистрациара
']:>
).lang
;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
this
.messages
.load_text(
<:['
vector-action-addsection|1офтхьабз
vector-action-delete|ЛъэкӀ
vector-action-move|Хьы
vector-action-protect|Иухъумэ
vector-action-undelete|Умылъэк1
vector-action-unprotect|Умыухъумэ
vector-view-create|Игъэхъу
vector-view-edit|Гъэтэрэзыжь
vector-view-history|Тарихъым eплъ
vector-view-view|Едж
vector-view-viewsource|Еплъ лъапсэм
']:>
).lang
;

View File

@ -0,0 +1,975 @@
this
.fallback_load('ar')
.dir_rtl_('y')
.messages
.load_text(
<:['
sunday|Il-Eḩed
monday|Il-Iŧnîn
tuesday|Iŧ-Ŧlêŧ
wednesday|Il-Irbģe
thursday|Il-Xmîs
friday|Ij-Jimģe
saturday|Is-Sibt
sun|Il-Eḩed
mon|el ithnaine
tue|ethlath
wed|elirb3a
thu|el5mis
fri|ejjom3a
sat|essibt
january|Jânfi
february|Fîvrî
march|Mâris
april|Avrîl
may_long|Mêy
june|Jweñ
july|Jwîlye
august|Ût
september|Siptombir
october|Uktobir
november|Nuvombir
december|Disombir
january-gen|Janvi
february-gen|Fîvrî
march-gen|Mars
april-gen|Avril
may-gen|Mai
june-gen|Juin
july-gen|Juilia
august-gen|Août
september-gen|Septembre
october-gen|Octobre
november-gen|Novembre
december-gen|Décembre
jan|Jan.
feb|.Fiv
mar|Mâris
apr|Avr.
may|Mêy
jun|Jweñ
jul|Jwi.
aug|Ût
sep|Sep.
oct|Okt.
nov|.Nov
dec|Des.
toc|Contenu
redirectedfrom|(Tħawwelt men ~{0})
allpages|kol ess'afa7at
collapsible-collapse|Tʾabbes
collapsible-expand|Wassegħ
sort-descending|ترتيب تنازلي
sort-ascending|ترتيب تصاعدي
categories|تصنيفات
lastmodifiedat|Il-pâj hêđî tbadlit êxir merre nhâr ~{0}, mģa ~{1}.
thumbnail-more|Kabbir
otherlanguages|B-lûğât okhrîne
blanknamespace|(Ra'îsî)
pagecategories|{{PLURAL:Catégorie weħed\u007CZouz catégories\u007C~{0} catégories\u007C~{0} en catégorie}}
category_header|صفحات تصنيف "~{0}"
subcategories|التصنيفات الفرعية
category-media-header|الوسائط في التصنيف "~{0}"
category-empty|''هذا التصنيف لا يحتوي حاليا على صفحات أو وسائط.''
category-subcat-count|{{PLURAL:~{1}\u007Cلا تصانيف فرعية في هذا التصنيف\u007Cهذا التصنيف فيه التصنيف الفرعي التالي فقط.\u007Cهذا التصنيف فيه {{PLURAL:~{0}\u007C\u007Cهذا التصنيف الفرعي\u007Cهذين التصنيفين الفرعيين\u007Cهذه ال~{0} تصانيف الفرعية\u007Cهذه ال~{0} تصنيفا فرعيا\u007Cهذه ال~{0} تصنيف فرعي}}، من إجمالي ~{1}.}}
category-subcat-count-limited|هذا التصنيف فيه {{PLURAL:~{0}\u007C\u007Cالتصنيف الفرعي التالي\u007Cالتصنيفين الفرعيين التاليين\u007C~{0} تصانيف فرعية تالية\u007C~{0} تصنيفا فرعيا تاليا\u007C~{0} تصنيف فرعي تالي}}.
category-article-count|{{PLURAL:~{1}\u007Cلا يحتوي هذا التصنيف أي صفحات.\u007Cهذا التصنيف يحتوي على الصفحة التالية فقط.\u007C{{PLURAL:~{0}\u007C\u007Cالصفحة التالية\u007Cالصفحتان التاليتان\u007Cال~{0} صفحات التالية\u007Cال~{0} صفحة التالية\u007Cال~{0} صفحة التالية}} في هذا التصنيف، من إجمالي ~{1}.}}
category-article-count-limited|{{PLURAL:~{0}\u007C\u007Cالصفحة التالية\u007Cالصفحتان التاليتان\u007Cال~{0} صفحات التالية\u007Cال~{0} صفحة التالية\u007Cال~{0} صفحة التالية}} في التصنيف الحالي.
category-file-count|{{PLURAL:~{1}\u007Cلا يحتوي هذا التصنيف أي صفحات.\u007Cهذا التصنيف يحتوي على الصفحة التالية فقط.\u007C{{PLURAL:~{0}\u007C\u007Cالصفحة التالية\u007Cالصفحتان التاليتان\u007Cال~{0} صفحات التالية\u007Cال~{0} صفحة التالية\u007Cال~{0} صفحة التالية}} في هذا التصنيف، من إجمالي ~{1}.}}
category-file-count-limited|{{PLURAL:~{0}\u007Cالملف التالي\u007Cالملفان التاليان\u007Cال~{0} ملفات التالية\u007Cال~{0} ملفًا تاليًا\u007Cال~{0} ملف تالٍ}} في التصنيف الحالي.
nextn|{{PLURAL:~{0}\u007C~{0}}} التالية
prevn|{{PLURAL:~{0}\u007C~{0}}} السابقة
listingcontinuesabbrev|متابعة
bold_sample|نص غليظ
bold_tip|نص غليظ
italic_sample|نص مائل
italic_tip|نص مائل
link_sample|عنوان وصلة
link_tip|وصلة داخلية
headline_sample|نص عنوان رئيسي
headline_tip|عنوان من المستوى الثاني
hidden-category-category|تصنيفات مخفية
statistics|إحصاءات
indexpages|قائمة صفحات الفهرس
pageswithoutscans|صفحات من دون تفحص
proofreadpage_desc|يسمح بمقارنة سهلة للنص مع المسح الأصلي
proofreadpage_image|صورة
proofreadpage_index|فهرس
proofreadpage_index_expected|خطأ: فهرس تم توقعه
proofreadpage_nosuch_index|خطأ: لا فهرس كهذا
proofreadpage_nosuch_file|خطأ: لا ملف كهذا
proofreadpage_badpage|تنسيق خاطئ
proofreadpage_badpagetext|تنسيق الصفحة التي تحاول حفظها غير صحيح.
proofreadpage_indexdupe|رابط نظير
proofreadpage_indexdupetext|لا يمكن سرد الصفحة أكثر من في صفحة الفهرس.
proofreadpage_nologin|غير مسجل الدخول
proofreadpage_nologintext|يجب أن تكون [[Special:UserLogin\u007Cمُسجلًا الدخول]] لتعدّل حالة تدقيق الصفحات.
proofreadpage_notallowed|التغيير غير مسموح به
proofreadpage_notallowedtext|لا يسمح لك بتغيير حالة تدقيق هذه الصفحة.
proofreadpage_number_expected|خطأ: قيمة عددية تم توقعها
proofreadpage_interval_too_large|خطأ: الفترة كبيرة جدا
proofreadpage_invalid_interval|خطأ: فترة غير صحيحة
proofreadpage_nextpage|الصفحة التالية
proofreadpage_prevpage|الصفحة السابقة
proofreadpage_header|العنوان (غير مضمن):
proofreadpage_body|جسم الصفحة (للتضمين):
proofreadpage_footer|ذيل (غير مضمن):
proofreadpage_toggleheaders|تغيير رؤية أقسام noinclude
proofreadpage_quality0_category|بدون نص
proofreadpage_quality1_category|ليست مُدقّقة
proofreadpage_quality2_category|به مشاكل
proofreadpage_quality3_category|مُدقّقة
proofreadpage_quality4_category|مُصحّحة
proofreadpage_quality0_message|لا تحتاج هذه الصفحة إلى تدقيق
proofreadpage_quality1_message|لم تدقّق هذه الصفحة
proofreadpage_quality2_message|ثمة مشكلة عند تدقيق هذه الصفحة
proofreadpage_quality3_message|دُقّقت هذه الصفحة
proofreadpage_quality4_message|صُحّحت هذه الصفحة
proofreadpage_index_listofpages|قائمة الصفحات
proofreadpage_image_message|وصلة إلى صفحة الفهرس
proofreadpage_page_status|حالة الصفحة
proofreadpage_js_attributes|المؤلف العنوان السنة الناشر
proofreadpage_index_attributes|المؤلف\nالعنوان\nالسنة\u007Cسنة النشر\nالناشر\nالمصدر\nالصورة\u007Cصورة الغلاف\nالصفحات\u007C\u007C20\nالملاحظات\u007C\u007C10
proofreadpage_pages|~{1} {{PLURAL:~{0}\u007Css'af7a\u007Css'afa7at}}
proofreadpage_specialpage_legend|بحث صفحات الفهرس
proofreadpage_source|المصدر
proofreadpage_source_message|الإصدارة المفحوصة المستخدمة لإنشاء هذا النص
right-pagequality|عدل علامة جودة الصفحة
proofreadpage-section-tools|أدوات تدقيق
proofreadpage-group-zoom|kabber
proofreadpage-group-other|غير ذلك
proofreadpage-button-toggle-visibility-label|أظهر أو أخف ترويسة الصفحة وتذييلتها
proofreadpage-button-zoom-out-label|تصغير
proofreadpage-button-reset-zoom-label|رد التكبير
proofreadpage-button-zoom-in-label|تكبير
proofreadpage-button-toggle-layout-label|تخطيط أفقي أو رأسي
proofreadpage-preferences-showheaders-label|warri plaiss' el entête wel pied de page wa9t il edition fil faragh mte3 el page {{ns:page}}
proofreadpage-preferences-horizontal-layout-label|ista3mel i5raj ofo9i wa9t tekteb fil misse7a mte3 ess'af7a {{ns:page}}
tog-underline|Ħotʾ stʾar taħt errabtʾa:
tog-hideminor|Khabbi ettabdilàt essʾgħàr m ettabdilàt lekhrànìn
tog-hidepatrolled|Khabbi ettabdilàt elmagħsous għlihom m ettabdilàt lekhrànìn
tog-newpageshidepatrolled|Khabbi elpàjàt elmagħsous għlihom m ellista mtagħ elpàjàt ejjdida
tog-extendwatchlist|Wassegħ ellista mtagħ elgħassa bech twarri ettabdilàt elkoll, w mouch lekhrànìn kahaw
tog-usenewrc|)جمّع التعديلات حسب الصفحة في أحدث التغييرات وقائمة المراقبة (يتطلب جافاسكربت
tog-numberheadings|Nwàmer otomatik l ettitrouàt mtagħ esseksyon
tog-showtoolbar|أظهر شريط التحرير (يتطلب جافاسكربت)
tog-editondblclick|عدل الصفحات عند الضغط المزدوج (جافاسكربت)
tog-editsectiononrightclick|فعل تعديل الأقسام بواسطة كبسة الفأرة اليمين على عناوين الأقسام (جافاسكريبت)
tog-watchcreations|Zid elpàjàt elli għmalt'hom w elfichyéàt elli tʾallagħt'hom l ellista mtagħ elgħassa mtagħi
tog-watchdefault|Zid elpàjàt w elfichyéàt elli nbaddelhom l ellista mtagħ elgħassa mtagħi
tog-watchmoves|Zid elpàjàt w elfichyéàt elli nhezzhom, l ellista mtagħ elgħassa mtagħi
tog-watchdeletion|Zid elpàjàt w elfichyéàt elli nnaħħihom l ellista mtagħ elgħassa mtagħi
tog-minordefault|Marki ettabdilàt essʾghàr elkoll par défo
tog-previewontop|Warri tʾalla għla chsʾàr qbal ħokket ettabdil
tog-previewonfirst|Warri tʾalla għla chsʾàr f ettabdila lawlàniya
tog-enotifwatchlistpages|Abgħethli mail waqtelli pàj wella fichyé m ellista mtagħ elgħassa mtagħi tbaddel
tog-enotifusertalkpages|Abgħethli mail watelli elpàj mtagħ leħdith mtagħi tetbaddel
tog-enotifminoredits|Abgħethli mail zàda għattabdilàt essʾghàr mtagħ elpàjàt w elfichyéàt
tog-enotifrevealaddr|Warri ladrisa mail mtagħi f elmailàt mtagħ ennotifikasyon
tog-shownumberswatching|Warri għdad lutilizateuràt elgħassàsa
tog-oldsig|Ettosʾħàħa elmawjouda:
tog-fancysig|عامل التوقيع كنص ويكي (بدون وصلة أوتوماتيكية)
tog-uselivepreview|استخدم الاستعراض السريع (جافاسكريبت) (تجريبي)
tog-forceeditsummary|نبهني عند إدخال ملخص تعديل فارغ
tog-watchlisthideown|أخف تعديلاتي من قائمة المراقبة
tog-watchlisthidebots|أخف تعديلات البوت من قائمة المراقبة
tog-watchlisthideminor|أخف التعديلات الطفيفة من قائمة المراقبة
tog-watchlisthideliu|أخف تعديلات المستخدمين المسجلين من قائمة المراقبة
tog-watchlisthideanons|أخف تعديلات المستخدمين المجهولين من قائمة المراقبة
tog-watchlisthidepatrolled|أخف التعديلات المراجعة من قائمة المراقبة
tog-ccmeonemails|أرسل لي نسخا من رسائل البريد الإلكتروني التي أرسلها للمستخدمين الآخرين
tog-diffonly|لا تعرض محتوى الصفحة أسفل الفروقات
tog-showhiddencats|أظهر التصنيفات المخفية
tog-norollbackdiff|أزل الفرق بعد القيام باسترجاع
underline-always|Dima
underline-never|Jemla
underline-default|تبعا لإعدادات المتصفح
editfont-style|نمط خط منطقة التحرير:
editfont-default|تبعا لإعدادات المتصفح
editfont-monospace|خط ثابت العرض
editfont-sansserif|خط بلا زوائد
editfont-serif|خط بزوائد
hidden-categories|{{PLURAL:Catégorie mkhabia waħda\u007CZouz catégories mkhabbin\u007C~{0} catégories mkhabbin\u007C~{0} en catégorie mkhabia}}
index-category|صفحات مفهرسة
noindex-category|صفحات غير مفهرسة
broken-file-category|صفحات تحتوي وصلات ملفات معطوبة
about|عن
article|صفحة محتوى
newwindow|(تفتح في نافذة جديدة)
cancel|ifsa5
moredotdotdot|Akther...
mypage|صفحتي
mytalk|نقاشي
anontalk|Tħaddeth mgħa ladrisa IP hadhi
navigation|Ḩawwis
and| w
qbfind|Lawwej
qbbrowse|Navigi
qbedit|Baddel
qbpageoptions|Elpàj hadhi
qbmyoptions|Pàjàti
faq|FAQ
faqpage|Project:FAQ
actions|Aksyonàt
namespaces|Blâyiş il-asêmî
variants|Tanwîģât
navigation-heading|il-mënü mtêģ in-navigâsyioñ
errorpagetitle|Għaltʾa
returnto|Arjagħ l ~{0}.
tagline|Min {{SITENAME}}
help|Mģâwne
search|Lawwij
searchbutton|Lawwij
go|Emchi
searcharticle|Imcî
history|Listorik mtagħ elpàj
history_short|Il-istorîk
updatedmarker|tbaddlet melli jit àkher marra
printableversion|Kopî bêc tiţbaģhê
permalink|lieñ yoqģod dîme dîme
print|Atʾbagħ
view|Aqra
edit|Baddil
create|Agħmel
editthispage|Baddel f elpàj hadhi
create-this-page|Agħmel elpàj hadhi
delete|Afsakh
deletethispage|Afsakh elpàj hadhi
undelete_short|Rajjagħ{{PLURAL:~{0}\u007Ctabdila waħda\u007C~{0} tabdila}}
viewdeleted_short|Warri {{PLURAL:~{0}\u007Ctabdila waħda mafsoukha\u007C~{0} tabdila mafsoukha}}
protect|Ħàmi
protect_change|baddel
protectthispage|Ħàmi għal pàj hadhi
unprotect|Baddel elħimàya
unprotectthispage|Baddel elħimàya mtagħ elpàj hadhi
newpage|Pàj jdida
talkpage|Tħaddeth għal pàj hadhi
talkpagelinktext|Ḩdîŧ
specialpage|Sʾafħa spesyàl
personaltools|Mêģûnik
articlepage|Warri elpàj mtagħ elkontenu
talk|Ḩdiŧ
views|Manḑer
toolbox|Mêģûn
userpage|Chour elpàj mtagħ lutilizateur
projectpage|Chouf elpàj mtagħ leprojé
imagepage|Chouf elpàj mtagħ elfichyé
mediawikipage|Chouf elpàj mtagħ elmessàj
templatepage|Chouf elpàj mtagħ elmodàl
viewhelppage|Chouf elpàj mtagħ lemgħàwna
categorypage|Chouf elpàj mtagħ elkatégori
viewtalkpage|Chouf leħdith
redirectpagesub|Pàj mtagħ taħwil
viewcount|Elpàj hadhi dakhloulha {{PLURAL:~{0}\u007Cmarra waħda\u007C~{0} marra}}.
protectedpage|Pàj protéjé
jumpto|Imcî l-:
jumptonavigation|Ḩawwis
jumptosearch|Lawwij
view-pool-error|Pardon, esserveuràt tàgħba tawwa.\nBarcha għbàd yħebbou ychoufou nafs elpàj.\nYgħaychek estanna chway qbal ma tjarreb bech todkhel l elpàj hadhi marra okhra.\n\n\n~{0}
pool-timeout|Waqt esstennya wfa
pool-queuefull|Essʾaf mgħabbi
pool-errorunknown|Ghaltʾa ma nagħrfouhàch
aboutsite|Fîme yxoş {{SITENAME}}
aboutpage|Project:Fîme yxoş
copyright|المحتوى متوفر تحت ~{0}.
copyrightpage|{{ns:project}}:Copyrights
currentevents|Elli sʾàyer tawwa
currentevents-url|Project:Elli sʾàyer tawwa
disclaimers|Tambîhêt
disclaimerpage|Project:Tambîhêt ģâmme
edithelp|Mgħàwna f elktiba
mainpage|Il-pâj il-ewelêniye
mainpage-description|Il-Pâj il-ewelêniye
policy-url|Project:Elpolitik
portal|Daxlit il-mujtamaģ
portal-url|Project:Mujtamaģ
privacy|Is-siyêse mteģ il-konfîdonsyalîtê
privacypage|Project:Il-polîtîk mtêģ il-konfîdoñsyalîtê
badaccess|خطأ في السماح
badaccess-group0|ليس من المسموح لك تنفيذ الفعل الذي طلبته.
badaccess-groups|الفعل الذي طلبته مقصور على المستخدمين في {{PLURAL:~{1}\u007C\u007Cمجموعة\u007Cواحدة من مجموعتي\u007Cواحدة من مجموعات}}: ~{0}.
versionrequired|تلزم نسخة ~{0} من ميدياويكي
versionrequiredtext|تلزم النسخة ~{0} من ميدياويكي لاستعمال هذه الصفحة. انظر [[Special:Version\u007Cصفحة النسخة]]
ok|ok
retrievedfrom|Tixđêt min- "~{0}"
youhavenewmessages|توجد لديك ~{0} (~{1}).
youhavenewmessagesmulti|لديك رسائل جديدة على ~{0}
editsection|Baddil iş-şafḩa
editold|Baddil
viewsourceold|Warri essours
editlink|baddil
viewsourcelink|Warri is-sûrs
editsectionhint|Baddil is-sêksyioñ: ~{0}
showtoc|Warri
hidetoc|Khabbi
thisisdeleted|Warri wella rajjagħ ~{0}؟
viewdeleted|Warri ~{0}؟
restorelink|{{PLURAL:~{0}\u007C~{0} تعديل محذوف\u007Cتعديلا واحدا محذوفا\u007Cتعديلين محذوفين\u007C~{0} تعديلات محذوفة\u007C~{0} تعديلا محذوفا\u007C~{0} تعديلا محذوفا}}
feedlinks|التغذية:
feed-invalid|نوع اشتراك التلقيم غير صحيح.
feed-unavailable|التلقيمات غير متوفرة
site-rss-feed|~{0} تلقيم أر إس إس
site-atom-feed|Flü Atom mtêģ ~{0}
page-rss-feed|"~{0}" تلقيم أر إس إس
page-atom-feed|~{0} تلقيم أتوم
red-link-title|~{0} (Iş-Şafḩa mûc mawjûde)
nstab-main|Şafḩa
nstab-user|صفحة مستخدم
nstab-media|صفحة وسيط
nstab-special|Safḩa spêsyâl
nstab-project|صفحة مشروع
nstab-image|Fichier
nstab-mediawiki|Messàj
nstab-template|قالب
nstab-help|صفحة مساعدة
nstab-category|تصنيف
nosuchaction|لا يوجد فعل كهذا
nosuchactiontext|الفعل المحدد بواسطة المسار غير صحيح.\nربما تكون قد كتبت المسار بطريقة غير صحيحة، أو اتبعت وصلة غير صحيحة.\nهذا ربما يشير أيضا إلى علة في {{SITENAME}}.
nosuchspecialpage|لا توجد صفحة خاصة بهذا الاسم
nospecialpagetext|<strong>لقد طلبت صفحة خاصة غير صحيحة.</strong>\n\nقائمة بالصفحات الخاصة الصحيحة يمكن إيجادها في [[Special:SpecialPages\u007C{{int:specialpages}}]].
error|ghalath
databaseerror|خطأ في قاعدة البيانات
laggedslavemode|'''تحذير:''' الصفحة قد لا تحتوي على أحدث التحديثات.
readonly|قاعدة البيانات مغلقة
enterlockreason|أدخل سببا للغلق، متضمنا تقديرا لوقت رفع الغلق
readonlytext|قاعدة البيانات مغلقة حاليا أمام المدخلات الجديدة والتعديلات الأخرى، السبب غالبا ما يكون الصيانة، وستعود قاعدة البيانات للوضع الطبيعي قريبا.\n\nالإداري الذي أغلق قاعدة البيانات أعطى التفسير التالي: ~{0}
missing-article|Elbase de données malqatech ettexte mtaε essafħa elli supposée talqaha, welli esmha "~{0}" ~{1}.\n\nHedha elli ysir elεada waqtelli tħel farq qdim walla lien mtaε l'historique mtaε safħa tnaħħat.\n\nIdha ken mouch hedheka li sar, rak momken lqit mochkla fel programme.\nAman qoul elweħeb mel les [[Special:ListUsers/sysop\u007Cadministrateurs]], waεtih ellien elli ħabit temchilou.
missingarticle-rev|(رقم المراجعة: ~{0})
missingarticle-diff|(فرق: ~{0}، ~{1})
readonly_lag|تم إغلاق قاعدة البيانات تلقائيا حتى تستطيع الخواديم التابعة ملاحقة الخادوم الرئيسي
internalerror|خطأ داخلي
internalerror_info|خطأ داخلي: ~{0}
filecopyerror|لم يمكن نسخ الملف "~{0}" إلى "~{1}".
filerenameerror|لم يمكن إعادة تسمية الملف "~{0}" إلى "~{1}".
filedeleteerror|لم يمكن حذف الملف "~{0}".
directorycreateerror|لم يمكن إنشاء المجلد "~{0}".
filenotfound|لم يمكن إيجاد الملف "~{0}".
unexpected|قيمة غير متوقعة: "~{0}"="~{1}".
formerror|خطأ: لم يمكن تنفيذ الاستمارة
badarticleerror|لا يمكن إجراء هذا الفعل على هذه الصفحة.
cannotdelete|تعذر حذف الصفحة أو الملف "~{0}".\nربما حذفها شحص آخر.
cannotdelete-title|لا يمكن حذف الصفحة "~{0}"
delete-hook-aborted|faskhan wa9fou flash.\nmahouwech mobarrar
badtitle|عنوان سيء
badtitletext|عنوان الصفحة المطلوب إما غير صحيح أو فارغ، وربما الوصلة بين اللغات أو بين المشاريع خاطئة.\nومن الممكن وجود رموز لا تصلح للاستخدام في العناوين.
perfcached|البيانات التالية مختزنة وقد لا تكون محدثة. {{PLURAL:~{0}\u007C\u007Cنتيجة واحدة\u007Cنتيجتان\u007C~{0} نتائج\u007C~{0} نتيجة}} على الأكثر {{PLURAL:~{0}\u007C\u007Cمختزنة\u007Cمختزنتان\u007Cمختزنة}}.
perfcachedts|البيانات التالية مختزنة وكان آخر تحديث لها في ~{0}. {{PLURAL:~{3}\u007C\u007Cنتيجة واحدة\u007Cنتيجتان\u007C~{3} نتائج\u007C~{3} نتيجة}} على الأكثر {{PLURAL:~{3}\u007C\u007Cمختزنة\u007Cمختزنتان\u007Cمختزنة}}.
querypage-no-updates|التحديثات لهذه الصفحة معطلة حاليا.\nالبيانات هنا لن يتم تحديثها حاليا.
viewsource|اعرض المصدر
viewsource-title|إظهار مصدر ~{0}
actionthrottled|لا يمكن عمل المزيد من هذا الفعل
actionthrottledtext|كإجراء ضد السبام، أنت ممنوع من إجراء هذا الفعل عدد كبير من المرات في فترة زمنية قصيرة، ولقد تجاوزت هذا الحد.\nمن فضلك حاول مرة ثانية خلال عدة دقائق.
protectedpagetext|هذه الصفحة تمت حمايتها لمنع التعديل.
viewsourcetext|يمكنك رؤية ونسخ مصدر هذه الصفحة:
viewyourtext|يمكنك رؤية ونسخ مصدر ''' تعديلاتك ''' في هذه الصفحة:
protectedinterface|هذه الصفحة توفر نص الواجهة للبرنامج، وهي مقفلة لمنع التخريب.
editinginterface|'''تحذير:''' أنت تقوم بتحرير صفحة تستخدم في الواجهة النصية للبرنامج.\nسوف تؤثر التغييرات على هذه الصفحة على مظهر واجهة المستخدم للمستخدمين الآخرين.\nللترجمات، من فضلك استخدم مشروع ترجمة ميدياويكي [//translatewiki.net/wiki/Main_Page?setlang=ar translatewiki.net].
cascadeprotected|تمت حماية هذه الصفحة من التعديل لأنها مدمجة في {{PLURAL:~{0}\u007C\u007Cالصفحة التالية، والتي\u007Cالصفحتين التاليتين، واللتين\u007Cالصفحات التالية، والتي}} تم استعمال خاصية "حماية الصفحات المدمجة" {{PLURAL:~{0}\u007C\u007Cبها\u007Cبهما\u007Cبها}}:\n~{1}
namespaceprotected|لا تمتلك الصلاحية لتعديل الصفحات في نطاق '''~{0}'''.
customcssprotected|أنت لا تمتلك السماح لتعديل صفحة الCSS هذه، لأنها تحتوي على الإعدادات الشخصية لمستخدم آخر.
customjsprotected|أنت لا تمتلك السماح لتعديل صفحة الجافاسكريبت هذه، لأنها تحتوي على الإعدادات الشخصية لمستخدم آخر.
ns-specialprotected|الصفحات الخاصة لا يمكن تعديلها.
titleprotected|{{GENDER:~{0}\u007Cحمى\u007Cحمت}} [[User:~{0}\u007C~{0}]] هذا العنوان من الإنشاء.\nالسبب المعطى هو ''~{1}''.
filereadonlyerror|تعذر تعديل الملف "~{0}" لأن مستودع الملف "~{1}" في وضع القراءة فقط. \n\nالمدير الذي قام بغلقه قدم التفسير التالي: "~{2}".
invalidtitle-knownnamespace|عنوان غير صالح في النطاق «~{1}» مع نص «~{2}»
invalidtitle-unknownnamespace|عنوان غير صالح ذو نطاق غير معروف رقم ~{0} ونص «~{1}»
exception-nologin|غير مسجل الدخول
exception-nologin-text|hedhi ess'af7a wa 2ella el action te7tej mennek bech etloginni il hedha el wiki
virus-badscanner|ضبط سيء: ماسح فيروسات غير معروف: ''~{0}''
virus-scanfailed|فشل المسح (كود ~{0})
virus-unknownscanner|مضاد فيروسات غير معروف:
logouttext|'''أنت الآن غير مسجل الدخول.'''\n\nتستطيع المتابعة باستعمال {{SITENAME}} كمجهول، أو <span class='plainlinks'>[~{0} الدخول مرة أخرى]</span> بنفس الاسم أو باسم آخر.\nمن الممكن أن ترى بعض الصفحات كما لو أنك مسجل الدخول، وذلك حتى تقوم بإفراغ الصفحات المختزنة في المتصفح لديك.
yourname|اسم المستخدم:
yourpassword|كلمة السر:
yourpasswordagain|أعد كتابة كلمة السر:
remembermypassword|تذكر دخولي على هذا الحاسوب (إلى {{PLURAL:~{0}\u007C\u007Cيوم واحد\u007Cيومين\u007C~{0} أيام\u007C~{0} يومًا\u007C~{0} يوم}} كحد أقصى)
yourdomainname|نطاقك:
externaldberror|هناك إما خطأ في دخول قاعدة البيانات الخارجية أو أنه غير مسموح لك بتحديث حسابك الخارجي.
login|ادخل
nav-login-createaccount|Connecti / aεmel compte
userlogin|ادخل / أنشئ حسابا
userloginnocreate|دخول
logout|اخرج
userlogout|خروج
notloggedin|غير مسجل الدخول
nologin|ألا تمتلك حسابا؟ '''~{0}'''.
nologinlink|أنشئ حسابا
createaccount|أنشئ حسابا
gotaccount|تمتلك حسابا بالفعل؟ '''~{0}'''.
gotaccountlink|ادخل
userlogin-resetlink|أنسيت بيانات الولوج؟
createaccountmail|بواسطة البريد الإلكتروني
createaccountreason|السبب:
badretype|كلمات السر التي أدخلتها لا تتطابق.
userexists|اسم المستخدم الذي تم إدخاله مستعمل بالفعل.\nالرجاء اختيار اسم مختلف.
loginerror|خطأ في الدخول
createaccounterror|تعذر إنشاء حساب المستخدم: ~{0}
nocookiesnew|تم إنشاء حساب المستخدم، ولكنك لست مسجل الدخول بعد.\nيستخدم {{SITENAME}} كوكيز لتسجيل الدخول.\nلديك الكوكيز معطلة.\nمن فضلك فعلها، ثم سجل الدخول باسم المستخدم وكلمة السر الجديدين.
nocookieslogin|يستخدم {{SITENAME}} الكوكيز لتسجيل الدخول.\nالكوكيز معطلة لديك.\nمن فضلك فعلها ثم حاول مرة أخرى.
nocookiesfornew|لم يتم إنشاء حساب المستخدم، لأننا لم نستطع تأكيد مصدره. \nتأكد من أن ملفات تعريف الارتباط (الكوكيز) مفعلة عندك، ثم أعد تحميل الصفحة وحاول مرة أخرى.
noname|لم تحدد اسم مستخدم صحيح.
loginsuccesstitle|تم الدخول بشكل صحيح
loginsuccess|'''لقد قمت بتسجيل الدخول ل{{SITENAME}} باسم "~{0}".'''
nosuchuser|لا يوجد مستخدم بالاسم "~{0}".\nأسماء المستخدمين حساسة لحالة الحروف.\nتأكد من إملاء الاسم، أو [[Special:UserLogin/signup\u007Cقم بإنشاء حساب جديد]].
nosuchusershort|لا يوجد مستخدم باسم ~{0}".\nتأكد من إملاء الاسم.
nouserspecified|يجب عليك تحديد اسم مستخدم.
login-userblocked|هذا المستخدم ممنوع. لا يسمح بالولوج.
wrongpassword|كلمة السر التي أدخلتها غير صحيحة.\nمن فضلك حاول مرة أخرى.
wrongpasswordempty|كلمة السر المدخلة كانت فارغة.\nمن فضلك حاول مرة أخرى.
passwordtooshort|يجب أن تتكون كلمة السر على الأقل من {{PLURAL:~{0}\u007Cحرف واحد\u007Cحرفين\u007C~{0} حروف\u007C~{0} حرفا\u007C~{0} حرف}}.
password-name-match|يجب أن تكون كلمة المرور مختلفة عن اسم المستخدم.
password-login-forbidden|تم منع استخدام اسم المستخدم هذا وكلمة السر.
mailmypassword|أرسل لي كلمة سر جديدة
passwordremindertitle|كلمة سر مؤقتة جديدة ل{{SITENAME}}
passwordremindertext|لقد طلب شخص ما (غالبا أنت، من عنوان الآيبي ~{0}) كلمة سر جديدة ل{{SITENAME}} (~{3}).\nأنشئت كلمة سر مؤقتة للمستخدم "~{1}" وجعلت "~{2}".\nلو أن هذا ما تريده، فعليك أن تقوم بتسجيل الدخول واختيار كلمة سر جديدة الآن.\nسوف تنتهي مدة صلاحية كلمة سرك المؤقتة في غضون {{PLURAL:~{4}\u007Cأقل من يوم واحد\u007Cيوم واحد\u007Cيومين\u007C~{4} أيام\u007C~{4} يوما\u007C~{4} يوم}}.\n\nإذا كان الذي قام بهذا الطلب شخص آخر أو إذا تذكرت كلمة سرك ولا ترغب في تغييرها، فبإمكانك أن تتجاهل هذه الرسالة وأن تستمر في استخدام كلمة سرك القديمة.
noemail|لا يوجد عنوان بريد إلكتروني مسجل للمستخدم "~{0}".
noemailcreate|عليك تقديم عنوان بريد إلكتروني صالح
passwordsent|تم إرسال كلمة سر جديدة إلى عنوان البريد الإلكتروني المسجل للمستخدم "~{0}".\nمن فضلك حاول تسجيل الدخول مرة ثانية بعد استلامها.
blocked-mailpassword|تم منع عنوان الأيبي الخاص بك من التحرير، ولمنع التخريب لا يمكنك أن تستخدم خاصية استرجاع كلمة السر.
eauthentsent|تم إرسال رسالة تأكيد إلكترونية إلى العنوان المسمى.\nحتى ترسل أي رسالة أخرى لذلك الحساب عليك أن تتبع التعليمات الواردة في الرسالة لتأكيد أن هذا الحساب هو لك بالفعل.
throttled-mailpassword|تم بالفعل إرسال تذكير بكلمة السر، في ال{{PLURAL:~{0}\u007C\u007Cساعة الماضية\u007Cساعتين الماضيتين\u007C~{0} ساعات الماضية\u007C~{0} ساعة الماضية}}.\nلمنع التخريب، سيتم إرسال تذكير واحد كل {{PLURAL:~{0}\u007C\u007Cساعة\u007Cساعتين\u007C~{0} ساعات\u007C~{0} ساعة}}.
mailerror|خطأ أثناء إرسال البريد: ~{0}
acct_creation_throttle_hit|أنشأ زوار هذه الويكي باستخدام عنوان آيبيك {{PLURAL:~{0}\u007C\u007Cحسابا واحدا\u007Cحسابين\u007C~{0} حسابات\u007C~{0} حسابا\u007C~{0} حساب}} في اليوم الماضي، وهو الحد الأقصى المسموح به في هذه الفترة الزمنية.\nوكنتيجة لذلك، لن يتمكن الزوار الذين يستخدمون عنوان الأيبي هذا من إنشاء أي حسابات أخرى حاليا.
emailauthenticated|تم تأكيد بريدك الإلكتروني في ~{1} الساعة ~{2}.
emailnotauthenticated|لم يتم التحقق من بريدك الإلكتروني.\nلن يتم إرسال رسائل لأي من الميزات التالية.
noemailprefs|حدد عنوان بريد إلكتروني في تفضيلاتك لهذه الخصائص لتعمل.
emailconfirmlink|أكد عنوان بريدك الإلكتروني
invalidemailaddress|لا يمكن قبول عنوان البريد الإلكتروني حيث تبدو صيغته خاطئة.\nضع عنوانا مضبوطا أو أفرغ هذا الحقل.
cannotchangeemail|تغيير عنوان البريد الإلكتروني لهذا الحساب غير ممكن على هذا الويكي
emaildisabled|لا يمكن إرسال رسائل البريد الإلكتروني من هذا الموقع.
accountcreated|تم إنشاء الحساب
accountcreatedtext|تم إنشاء الحساب الخاص ب~{0}.
createaccount-title|إنشاء حساب في {{SITENAME}}
createaccount-text|شخص ما أنشأ حسابا لعنوان بريدك الإلكتروني في {{SITENAME}} (~{3}) بالاسم "~{1}"، كلمة السر "~{2}".\nينبغي عليك تسجيل الدخول وتغيير كلمة السر الخاصة بك الآن.\n\nيمكنك تجاهل هذه الرسالة، لو تم إنشاء هذا الحساب بالخطأ.
login-throttled|لقد قمت بمحاولات دخول كثيرة جدا مؤخرا.\nمن فضلك انتظر قبل المحاولة مرة أخرى.
login-abort-generic|لم ينجح ولوجك - إجهاض
loginlanguagelabel|اللغة: ~{0}
suspicious-userlogout|رفض طلب خروجك لأنه يبدو كأنه أرسل عن طريق متصفح معطوب أو وسيط تخزين.
pt-login|Odkul
pt-createaccount|Aģmil koñt
php-mail-error-unknown|خطأ غير معروف في وظيفة البريد PHP's mail()
user-mail-no-addy|لقد حاولت إرسال بريد إلكتروني دون عنوان بريد إلكتروني.
resetpass_announce|تم تسجيل دخولك بكلمة سر مؤقتة.\nللدخول بشكل نهائي، يجب عليك ضبط كلمة سر جديدة هنا:
resetpass_header|غير كلمة سر الحساب
oldpassword|كلمة السر القديمة:
newpassword|كلمة السر الجديدة:
retypenew|أعد كتابة كلمة السر الجديدة:
resetpass_submit|ضبط كلمة السر والدخول
changepassword-success|تم تغيير كلمة السر الخاصة بك بنجاح! يتم تسجيل دخولك الآن...
resetpass_forbidden|كلمات السر لا يمكن تغييرها
resetpass-no-info|يجب أن تكون مسجل الدخول للوصول إلى هذه الصفحة مباشرة.
resetpass-submit-loggedin|تغيير كلمة السر
resetpass-submit-cancel|ifsa5
resetpass-wrong-oldpass|كلمة سر حالية أو مؤقتة غير صحيحة.\nربما تكون غيرت كلمة السر الخاصة بك بنجاح أو طلبت كلمة سر مؤقتة جديدة.
resetpass-temp-password|كلمة سر مؤقتة:
passwordreset|إعادة ضبط كلمة السر
passwordreset-legend|إعادة تعيين كلمة السر
passwordreset-disabled|عُطّلت إعادة تعيين كلمة السر على هذه الويكي.
passwordreset-username|اسم المستخدم:
passwordreset-domain|النطاق:
passwordreset-capture|أأعرض البريد الإلكتروني الناتج؟
passwordreset-capture-help|إذا علّمت هذا الصندوق فسيعرض لك البريد الإلكتروني (الذي يحتوي كلمة سر مؤقتة) وسيرسل أيضا للمستخدم.
passwordreset-email|عنوان البريد الإلكتروني:
passwordreset-emailtitle|تفاصيل حساب {{SITENAME}}
passwordreset-emailtext-ip|احد ما (قد يكون انت~{0})طلب مذكرة تفاصيل الحساب ل{{SITENAME}} (~{3}).المستخدم الاتي {{PLURAL:~{2}\u007Cالحساب هو\u007Cالحسابات هي}} قد قرن بهذا العنوان :\n\n~{1}\n\n{{PLURAL:~{2}\u007Cكلمة المرور المؤقتة\u007Cكلمات المرور المؤقة}}سينتهي في {{PLURAL:~{4}\u007Cيوم\u007Cايام~{4} }}\nمن الافضل ان تسجل الدخول وتختار كلمة مرور جديدة الان .\nإذا قام شخص آخر بهذا الطلب، أو إذا تذكرت كلمة المرور الأصلية الخاصة بك،ولم تعد ترغب في تغييره، يمكنك تجاهل هذه الرسالة ومتابعة استخدام كلمة المرورالقديمة.
passwordreset-emailtext-user|احد ما (قد يكون انت~{0})طلب مذكرة تفاصيل الحساب ل{{SITENAME}} (~{3}).المستخدم الاتي {{PLURAL:~{2}\u007Cالحساب هو\u007Cالحسابات هي}} قد قرن بهذا العنوان :\n\n~{1}\n\n{{PLURAL:~{2}\u007Cكلمة المرور المؤقتة\u007Cكلمات المرور المؤقة}}سينتهي في {{PLURAL:~{4}\u007Cيوم\u007Cايام~{4} }}\nمن الافضل ان تسجل الدخول وتختار كلمة مرور جديدة الان .\nإذا قام شخص آخر بهذا الطلب، أو إذا تذكرت كلمة المرور الأصلية الخاصة بك،ولم تعد ترغب في تغييره، يمكنك تجاهل هذه الرسالة ومتابعة استخدام كلمة المرورالقديمة.
passwordreset-emailelement|اسم المستخدم: ~{0}\nكلمة السر المؤقتة: ~{1}
passwordreset-emailsent|أرسل بريد إلكتروني تذكيري
passwordreset-emailsent-capture|أرسل بريد إلكتروني تذكيري وهو معروض بالأسفل.
passwordreset-emailerror-capture|ولّد بريد إلكتروني تذكيري وهو معروض بالأسفل لكن فشل إرساله للمستخدم: ~{0}
changeemail|تغيير عنوان البريد الإلكتروني
changeemail-text|أكمل هذا النموذج لتغيير عنوان البريد الإلكتروني. سوف تحتاج إلى إدخال كلمة السر الخاصة بك لتأكيد هذا التغيير.
changeemail-no-info|يجب تسجيل الدخول للوصول إلى هذه الصفحة مباشرة.
changeemail-oldemail|عنوان البريد الإلكتروني الحالي:
changeemail-newemail|عنوان البريد الإلكتروني الجديد:
changeemail-none|(لا شيء)
changeemail-submit|غيّر البريد الإلكتروني
extlink_sample|http://www.example.com عنوان الوصلة
extlink_tip|وصلة خارجية (تذكر بادئة http://)
nowiki_sample|أدخل النص غير المنسق هنا
nowiki_tip|أهمل تهيئة الويكي
image_tip|ملف مدرج
media_tip|وصلة ملف
sig_tip|توقيعك مع الساعة والتاريخ
hr_tip|خط أفقي (تجنب الاستخدام بكثرة)
summary|ملخص:
subject|موضوع/عنوان:
minoredit|هذا تعديل طفيف
watchthis|راقب هذه الصفحة
savearticle|احفظ الصفحة
preview|معاينة
showpreview|أظهر معاينة
showdiff|أظهر التغييرات
anoneditwarning|'''تحذير:''' لم تقم بالدخول.\nسيسجل عنوان الآيبي خاصتك في تاريخ هذه الصفحة.
anonpreviewwarning|''أنت غير مسجل الدخول. الحفظ سيسجل عنوان الأيبي الخاص بك في تاريخ هذه الصفحة.''
missingsummary|'''تنبيه:''' لم تقم بكتابة ملخص للتعديل.\nإذا قمت بضغط حفظ الصفحة مرة أخرى، فيتم حفظ تعديلك بدون ملخص.
missingcommenttext|من فضلك أدخل تعليقا في الأسفل.
missingcommentheader|'''تنبيه:''' لم تقم بوضع موضوع/عنوان لهذا التعليق.\nإذا قمت بالضغط على "{{int:savearticle}}" مجددا، سيتم حفظ تعليقك بدون عنوان.
summary-preview|معاينة الملخص:
subject-preview|معاينة للموضوع/العنوان:
blockedtitle|المستخدم ممنوع
blockedtext|'''اسم المستخدم أو عنوان الأيبي الخاص بك تم منعه.'''\n\nقام بالمنع ~{0}.\nسبب المنع هو: ''~{1}''.\n\n* بداية المنع: ~{7}\n* انتهاء المنع: ~{5}\n* الممنوع المقصود: ~{6}\n\nيمكنك الاتصال ب~{0} أو مع أحد [[{{MediaWiki:Grouppage-sysop}}\u007Cالإداريين]] للنقاش حول المنع.\nلا يمكنك استخدام خاصية 'مراسلة هذا المستخدم' إلا إذا كنت قد وضعت عنوان بريدي صحيح في [[Special:Preferences\u007Cتفضيلات حسابك]] ولم يتم منعك من استخدامها.\nعنوان الأيبي الخاص بك حاليا هو ~{2}، ورقم المنع هو #~{4}.\nمن فضلك اذكر كل التفاصيل بالأعلى في أي استعلامات تقوم بها.
autoblockedtext|تم منع عنوان آيبيك تلقائيا لأن مستخدما آخرا ممنوعا بواسطة ~{0} استخدمه.\nالسبب الممنوح هو التالي:\n\n:''~{1}''\n\n* بداية المنع: ~{7}\n* انتهاء المنع: ~{5}\n* الممنوع المقصود: ~{6}\n\nيمكنك أن تتصل ب ~{0} أو أحد [[{{MediaWiki:Grouppage-sysop}}\u007Cالإداريين]] الآخرين لمناقشة المنع.\n\nلاحظ أنه لا يمكنك استخدام خاصية "إرسال رسالة لهذا المستخدم" إلا لو كان لديك عنوان بريد إلكتروني صحيح مسجل في [[Special:Preferences\u007Cتفضيلاتك]] ولم يتم منعك من استخدامه.\n\nعنوان آيبيك الحالي ~{2}، ورقم المنع #~{4}.\nمن فضلك اذكر كل التفاصيل بالأعلى في أي استعلامات تقوم بها.
blockednoreason|لا سبب معطى
whitelistedittext|يجب عليك ~{0} لتتمكن من تعديل الصفحات.
confirmedittext|يجب عليك تأكيد بريدك الإلكتروني قبل تعديل الصفحات.\nمن فضلك اكتب وأكد بريدك الإلكتروني من خلال [[Special:Preferences\u007Cتفضيلاتك]].
nosuchsectiontitle|تعذر إيجاد القسم
nosuchsectiontext|لقد حاولت تحرير قسم غير موجود.\nربما يكون قد تم نقله أو حذفه أثناء مشاهدتك للصفحة.
loginreqtitle|تسجيل الدخول مطلوب
loginreqlink|الولوج
loginreqpagetext|يجب عليك ~{0} لتشاهد صفحات أخرى.
accmailtitle|تم إرسال كلمة السر.
accmailtext|كلمة سر مولدة عشوائيا ل [[User talk:~{0}\u007C~{0}]] تم إرسالها إلى ~{1}.\n\nكلمة السر لهذا الحساب الجديد يمكن تغييرها في صفحة ''[[Special:ChangePassword\u007Cتغيير كلمة السر]]'' عند تسجيل الدخول.
newarticle|(جديد)
newarticletext|لقد تبعت وصلة لصفحة لم يتم إنشائها بعد.\nلإنشاء هذه الصفحة ابدأ الكتابة في الصندوق بالأسفل (انظر في [~{0} صفحة المساعدة] للمزيد من المعلومات).\nإذا كانت زيارتك لهذه الصفحة بالخطأ، اضغط على زر ''رجوع'' في متصفح الإنترنت لديك.
anontalkpagetext|----''هذه صفحة نقاش لمستخدم مجهول لم يقم بإنشاء حساب بعد أو لا يستعمل ذلك الحساب.\nلذا فيجب علينا استعمال رقم الأيبي للتعرف عليه/عليها.\nمثل هذا العنوان يمكن أن يشترك فيه عدة مستخدمين.\nلو كنت مستخدما مجهولا وتشعر بأن تعليقات لا تخصك تم توجيهها إليك، من فضلك [[Special:UserLogin/signup\u007Cأنشئ حسابا]] أو [[Special:UserLogin\u007Cسجل الدخول]] لتجنب الارتباك المستقبلي مع مستخدمين مجهولين آخرين.''
noarticletext|Mefamme ḩatte têkst tawwe fiş-şafḩa hêđi.\nTnijjim [[Special:Search/{{PAGENAME}}\u007Ctfarkis ģal-tîtr mtêģ iş-şafħa]] fi safḩat okhrîne, <span class="plainlinks">[{{fullurl:{{#Special:Log}}\u007Cpage={{FULLPAGENAMEE}}}} tfarkis fil-istorîk illi ģandhom ģalêqa], \nwallê [{{fullurl:{{FULLPAGENAME}}\u007Caction=edit}} tbaddil iş-şafħa hêđi]</span>
noarticletext-nopermission|لا يوجد حاليا أي نص في هذه الصفحة.يمكنك [[Special:Search/{{PAGENAME}}\u007Cالبحث عن عنوان هذه الصفحة]] في الصفحات الأخرى,أو <span class="plainlinks">[{{fullurl:{{#Special:Log}}\u007Cpage={{FULLPAGENAMEE}}}} بحث السجلات المتصلة]</span>.
userpage-userdoesnotexist|حساب المستخدم "<nowiki>~{0}</nowiki>" غير مسجل.\nمن فضلك تأكد أنك تريد إنشاء/تعديل هذه الصفحة.
userpage-userdoesnotexist-view|حساب المستخدم "~{0}" غير مسجل.
blocked-notice-logextract|هذا المستخدم ممنوع حاليا.\nآخر مدخلة في سجل المنع موفرة بالأسفل كمرجع:
clearyourcache|'''ملاحظة:''' بعد الحفظ, أنت ربما تحتاج إلى إفراغ كاش متصفحك لرؤية التغييرات.\n* '''فيرفكس / سفاري:''' اضغط ''Shift'' أثناء ضغط ''Reload'', أو اضغط أيا من ''Ctrl-F5'' أو ''Ctrl-R'' (''⌘-R'' على ماك)\n* '''جوجل كروم:''' اضغط ''Ctrl-Shift-R'' (''⌘-Shift-R'' على ماك)\n* '''إنترنت إكسبلورر:''' اضغط ''Ctrl'' أثناء ضغط ''Refresh''، أو اضغط ''Ctrl-F5''\n* '''كنكرر:''' اضغط ''Reload'' أو اضغط ''F5''\n* '''أوبرا:''' أفرغ الكاش في ''Tools → Preferences''
usercssyoucanpreview|'''ملاحظة:''' استعمل زر "{{int:showpreview}}" لتجربة CSS الجديد قبل حفظ الصفحة.
userjsyoucanpreview|'''ملاحظة:''' استعمل زر "{{int:showpreview}}" لتجربة جافاسكربت الجديدة قبل حفظ الصفحة.
usercsspreview|'''تذكر أنك تقوم بعرض الأنماط المتراصة (CSS) الخاصة بك فقط\nلم يتم حفظها بعد!'''
userjspreview|'''تذكر أنك فقط تجرب/تعاين جافاسكربت.'''\n'''لم يتم الحفظ بعد!'''
sitecsspreview|''' تذكر أنك فقط في وضع المعاينة لهذا CSS ''' \n''' ولم يتم حفظ الصفحة بعد! '''
sitejspreview|''' تذكر أنك فقط في وضع المعاينة لكود JavaScript هذا''' \n''' ولم يتم حفظه بعد! '''
userinvalidcssjstitle|'''تحذير:''' لا توجد واجهة "~{0}".\nتذكر أن ملفات ال.css و ال.js تستخدم حروف صغيرة في العنوان ، كمثال {{ns:user}}:Foo/vector.css و ليس {{ns:user}}:Foo/Vector.css.
updated|(محدثة)
note|'''ملاحظة:'''
previewnote|'''تذكر أن هذه مجرد معاينة أولية.'''\nلم تحفظ تغييراتك إلى الآن!
continue-editing|أكمل التحرير
previewconflict|هذا العرض يوضح النص الموجود في صندوق التحرير العلوي والذي سيظهر إذا اخترت الحفظ.
session_fail_preview|'''عذرا! لم نتمكن من حفظ التعديلات التي قمت بها نتيجة لضياع بيانات هذه الجلسة.\nمن فضلك حاول مرة أخرى.\nفي حال استمرار المشكلة حاول أن تقوم [[Special:UserLogout\u007Cبالخروج]] ومن ثم الولوج مرة أخرى.'''
session_fail_preview_html|'''عذرا! لم نستطع معالجة تعديلك بسبب فقدان بيانات الجلسة.'''\n\n''لأن {{SITENAME}} بها HTML الخام مفعلة، العرض المسبق مخفي كاحتياط ضد هجمات الجافا سكريبت.''\n\n'''إذا كانت هذه محاولة تعديل صادقة، من فضلك حاول مرة أخرى.\nإذا كانت مازالت لا تعمل، حاول [[Special:UserLogout\u007Cتسجيل الخروج]] ثم تسجيل الدخول مجددا.'''
token_suffix_mismatch|'''تعديلك تم رفضه لأن عميلك أخطأ في علامات الترقيم\nفي نص التعديل. تم رفض التعديل لمنع فساد نص المقالة.\nهذا يحدث أحيانا عندما تستخدم خدمة بروكسي مجهول معيبة مبنية على الوب.'''
edit_form_incomplete|'''بعض أجزاء من نموذج التعديل لم تصل إلى الخادم؛ تأكد من أن تعديلاتك لم تمس وحاول مجددا.'''
editing|تحرير ~{0}
creating|إنشاء «~{0}»
editingsection|تحرير ~{0} (قسم)
editingcomment|تعديل ~{0} (قسم جديد)
editconflict|تضارب في التحرير: ~{0}
explainconflict|لقد عدل شخص آخر هذه الصفحة بعد أن بدأت أنت بتحريرها.\nصندوق النصوص العلوي يحتوي على النص الموجود حاليا في الصفحة.\nوالتغييرات التي قمت أنت بها موجودة في الصندوق في أسفل الصفحة.\nيجب أن تقوم بدمج تغييراتك في النص الموجود حاليا.\n'''فقط''' ما هو موجود في الصندوق العلوي هو ما سيتم حفظه عند الضغط على زر "حفظ الصفحة".
yourtext|نصك
storedversion|النسخة المخزنة
nonunicodebrowser|'''تحذير: متصفحك لا يتوافق مع الترميز الموحد.\nتمت معالجة هذا لكي تتمكن من تحرير الصفحات بأمان: الحروف التي ليست ASCII سوف تظهر في صندوق التحرير كأكواد سداسي عشرية.'''
editingold|''' تحذير: أنت تقوم الآن بتحرير نسخة قديمة من هذه الصفحة.\nإذا قمت بحفظها، ستفقد كافة التغييرات التي حدثت بعد هذه النسخة. '''
yourdiff|الفروق
copyrightwarning|من فضلك لاحظ أن جميع المساهمات ل {{SITENAME}} خاضعة وصادرة تحت ترخيص ~{1} (انظر في ~{0} للمزيد من التفاصيل)\nإذا لم ترد أن تخضع كتابتك للتعديل والتوزيع الحر، لا تضعها هنا<br />.\nكما أنك تتعهد بأنك قمت بكتابة ما هو موجود بنفسك، أو قمت بنسخها من مصدر يخضع ضمن الملكية العامة، أو مصدر حر آخر.\n'''لا ترسل أي عمل ذي حقوق محفوظة بدون الإذن من صاحب الحق'''.
copyrightwarning2|من فضلك لاحظ أن جميع المساهمات في {{SITENAME}} يمكن أن تعدل أو تتغير أو تزال من قبل المساهمين الآخرين.\nإذا لم تكن ترغب أن تعدل مشاركاتك بهذا الشكل، لا تضعها هنا.<br />\nأنت تقر أيضا أنك كتبت هذا بنفسك، أو نسخته من مصدر يخضع للملكية العامة، أو مصدر حر آخر (انظر ~{0} للتفاصيل).\n'''لا تضف أي عمل ذي حقوق محفوظة بدون تصريح!'''
longpageerror|'''خطأ: النص الذي قمت بإدخاله {{PLURAL:~{0}\u007Cواحد كيلوبايت\u007C~{0} كيلوبيات}} أطول, وهو أطول من الحد الأقصى {{PLURAL:~{1}\u007Cواحد كيلوبايت\u007C~{1} كيلوبايت}}.'''\nو يتعذر حفظه.
readonlywarning|'''تحذير: لقد أغلقت قاعدة البيانات للصيانة، لذلك لن تتمكن من حفظ التعديلات التي قمت بها حاليا.\nإذا رغبت بإمكانك أن تنسخ النص الذي تعمل عليه وتحفظه في ملف نصي إلى وقت لاحق.'''\n\nالإداري الذي أغلقها أعطى هذا التفسير: ~{0}
protectedpagewarning|'''تحذير: تمت حماية هذه الصفحة حتى يمكن للمستخدمين ذوي الصلاحيات الإدارية فقط تعديلها.'''\nآخر مدخلة سجل موفرة بالأسفل كمرجع:
semiprotectedpagewarning|'''ملاحظة:''' تمت حماية هذه الصفحة بحيث يمكن للمستخدمين المسجلين فقط تعديلها.\nآخر مدخلة سجل موفرة بالأسفل كمرجع:
cascadeprotectedwarning|'''تحذير:''' تمت حماية هذه الصفحة بحيث يستطيع المستخدمون ذوو الصلاحيات الإدارية فقط تعديلها، وذلك لأنها مدمجة في {{PLURAL:~{0}\u007C\u007Cالصفحة التالية والتي تمت حمايتها\u007Cالصفحتين التاليتين واللتين تمت حمايتها\u007Cالصفحات التالية والتي تمت حمايتها}} بخاصية "حماية الصفحات المدمجة":
titleprotectedwarning|'''تحذير: هذه الصفحة تمت حمايتها بحيث أن [[Special:ListGroupRights\u007Cصلاحيات معينة]] مطلوبة لإنشائها.'''\nآخر مدخلة سجل موفرة بالأسفل كمرجع:
templatesused|{{PLURAL:~{0}\u007C\u007Cالقالب المستخدم\u007Cالقالبان المستخدمان\u007Cالقوالب المستخدمة}} في هذه الصفحة:
templatesusedpreview|{{PLURAL:~{0}\u007C\u007Cالقالب المستخدم\u007Cالقالبان المستخدمان\u007Cالقوالب المستخدمة}} في هذه المعاينة:
templatesusedsection|{{PLURAL:~{0}\u007C\u007Cالقالب المستخدم\u007Cالقالبان المستخدمان\u007Cالقوالب المستخدمة}} في هذا القسم:
template-protected|(protégé)
template-semiprotected|(حماية جزئية)
hiddencategories|{{PLURAL:~{0}\u007Cهذه الصفحة غير موجودة في أي تصنايف مخفية\u007Cهذه الصفحة موجودة في تصنيف مخفي واحد\u007Cهذه الصفحة موجودة في تصنيفين مخفيين\u007Cهذه الصفحة موجودة في ~{0} تصانيف مخفية\u007Cهذه الصفحة موجودة في ~{0} تصنيفا مخفيا\u007Cهذه الصفحة موجودة في ~{0} تصنيف مخفي}}:
nocreatetext|قام {{SITENAME}} بتحديد القدرة على إنشاء صفحات جديدة.\nيمكنك العودة وتحرير صفحة موجودة بالفعل، أو [[Special:UserLogin\u007Cالدخول أو تسجيل حساب]].
nocreate-loggedin|أنت لا تمتلك الصلاحية لإنشاء صفحات جديدة.
sectioneditnotsupported-title|تعديل الأقسام غير مدعوم
sectioneditnotsupported-text|تعديل الأقسام غير مدعوم في هذه الصفحة
permissionserrors|أخطاء السماحات
permissionserrorstext|لا تمتلك الصلاحية لفعل هذا، {{PLURAL:~{0}\u007C\u007Cللسبب التالي\u007Cللسببين التاليين\u007Cللأسباب التالية}}:
permissionserrorstext-withaction|لا تملك الصلاحيات ل~{1}، لل{{PLURAL:~{0}\u007C\u007Cسبب التالي\u007Cسببين التاليين\u007Cأسباب التالية}}:
recreate-moveddeleted-warn|'''تحذير: أنت تقوم بإعادة إنشاء صفحة سبق حذفها.'''\n\nيجب عليك التيقن من أن الاستمرار بتحرير هذه الصفحة ملائم.\nسجلا الحذف والنقل لهذه الصفحة معروضان هنا للتيسير:
moveddeleted-notice|هذه الصفحة تم حذفها.\nسجلا الحذف والنقل للصفحة معروضان بالأسفل كمرجع.
log-fulllog|أظهر السجل الكامل
edit-hook-aborted|التعديل تم تركه بواسطة الخطاف.\nلم يعط تفسيرا.
edit-gone-missing|لم يمكن تحديث الصفحة.\nيبدو أنه تم حذفها.
edit-conflict|تضارب تحريري.
edit-no-change|تعديلك تم تجاهله، لأنه لم يحدث أي تعديل للنص.
edit-already-exists|لم يمكن إنشاء صفحة جديدة.\nهي موجودة بالفعل.
defaultmessagetext|نص الرسالة الافتراضي
expensive-parserfunction-warning|'''تحذير:''' هذه الصفحة تحتوي على استدعاءات دالة محلل كثيرة مكلفة.\n\nينبغي أن تكون أقل من {{PLURAL:~{1}\u007C\u007Cاستدعاء واحد\u007Cاستدعاءين\u007C~{1} استدعاءات\u007C~{1} استدعاء}}، يوجد الآن {{PLURAL:~{0}\u007Cاستدعاء واحد\u007Cاستدعاءان\u007C~{1} استدعاءات\u007C~{1} استدعاء}}.
expensive-parserfunction-category|صفحات يوجد بها استدعاءات دوال محلل كثيرة ومكلفة
post-expand-template-inclusion-warning|'''تحذير:''' حجم تضمين القالب كبير جدا.\nبعض القوالب لن تضمن.
post-expand-template-inclusion-category|الصفحات حيث تم تجاوز حجم تضمين القالب
post-expand-template-argument-warning|'''تحذير:''' هذه الصفحة تحتوي على عامل قالب واحد على الأقل له حجم تمدد كبير جدا.\nهذه العوامل تم حذفها.
post-expand-template-argument-category|صفحات تحتوي مدخلات القالب المحذوفة
parser-template-loop-warning|تم كشف حلقة قالب: [[~{0}]]
parser-template-recursion-depth-warning|تم تجاوز حد عمق فرد القوالب (~{0})
language-converter-depth-warning|تم تخطي حد عمق محول اللغة (~{0})
node-count-exceeded-category|الصفحات التي حدث فيها تجاوز تعداد العقد
node-count-exceeded-warning|تجاوزت هذه الصفحة تعداد العقد
expansion-depth-exceeded-category|الصفحات التي حدث فيها تجاوز عمق التوسيع
expansion-depth-exceeded-warning|الصفحة تجاوزت عمق التوسيع
parser-unstrip-loop-warning|حلقة معراة تم الكشف عنها
parser-unstrip-recursion-limit|تعدى حد العودية Unstrip (~{0})
undo-success|يمكن استرجاع التعديل.\nمن فضلك تحقق من المقارنة بالأسفل للتأكد من أن هذا هو ما تريد أن تفعله، وبعد ذلك احفظ التغييرات بالأسفل للانتهاء من استرجاع التعديل.
undo-failure|لم يمكن استرجاع التعديل بسبب تعديلات متعارضة تمت على الصفحة.
undo-norev|فشل في الرجوع عن التعديل حيث أنه غير موجود أو تم حذفه.
undo-summary|الرجوع عن التعديل ~{0} بواسطة [[Special:Contributions/~{1}\u007C~{1}]] ([[User talk:~{1}\u007Cنقاش]])
cantcreateaccounttitle|لا يمكن إنشاء حساب
cantcreateaccount-text|إنشاء الحسابات من عنوان الأيبي هذا ('''~{0}''') تم منعه بواسطة [[User:~{2}\u007C~{2}]].\n\nالسبب المعطى بواسطة ~{2} هو ''~{1}''
viewpagelogs|اعرض سجلات هذه الصفحة
nohistory|لا يوجد تاريخ للتعديلات لهذه الصفحة.
currentrev|المراجعة الحالية
currentrev-asof|المراجعة الحالية بتاريخ ~{0}
revisionasof|Version mtaε ~{0}
revision-info|مراجعة ~{0} بواسطة ~{1}
previousrevision|→ مراجعة أقدم
nextrevision|مراجعة أحدث ←
currentrevisionlink|المراجعة الحالية
cur|الحالي
next|التالي
last|السابق
page_first|الأولى
page_last|الأخيرة
histlegend|اختيار الفرق: علم على صناديق النسخ للمقارنة واضغط قارن بين النسخ المختارة أو الزر بالأسفل.<br />\nمفتاح: (الحالي) = الفرق مع النسخة الحالية\n(السابق) = الفرق مع النسخة السابقة، ط = تغيير طفيف
history-fieldset-title|تصفح التاريخ
history-show-deleted|المحذوفة فقط
histfirst|أول
histlast|آخر
historysize|({{PLURAL:~{0}\u007C1 بايت\u007C~{0} بايت}})
historyempty|(فارغ)
history-feed-title|تاريخ المراجعة
history-feed-description|تاريخ التعديل لهذه الصفحة في الويكي
history-feed-item-nocomment|~{0} في ~{1}
history-feed-empty|الصفحة المطلوبة غير موجودة.\nمن المحتمل أن تكون هذه الصفحة قد حذفت من الويكي، أو نقلت.\nحاول [[Special:Search\u007Cالبحث في الويكي]] عن صفحات جديدة ذات صلة.
rev-deleted-comment|(أزيل ملخص التعديل)
rev-deleted-user|(اسم المستخدم تمت إزالته)
rev-deleted-event|(فعل السجل تمت إزالته)
rev-deleted-user-contribs|[اسم المستخدم أو عنوان الأيبي تمت إزالته - التعديل مخفي من المساهمات]
rev-deleted-text-permission|'''حُذِفت''' مراجعة هذه الصفحة.\nيمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/delete\u007Cpage={{FULLPAGENAMEE}}}} سجل الحذف].
rev-deleted-text-unhide|'''حُذِفت''' مراجعة الصفحة هذه.\nيمكن العثور على تفاصيل في [{{fullurl:{{#Special:Log}}/delete\u007Cpage={{FULLPAGENAMEE}}}} سجل الحذف].\nمازال بإمكانك [~{0} رؤية هذه المراجعة] إذا أردت المتابعة.
rev-suppressed-text-unhide|'''أُخفيت''' مراجعة الصفحة هذه.\nيمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/suppress\u007Cpage={{FULLPAGENAMEE}}}} سجل الإخفاء].\nبإمكانك [~{0} رؤية هذه المراجعة] إذا أردت المتابعة.
rev-deleted-text-view|'''حُذِفت''' مراجعة هذه الصفحة.\nيمكنك رؤيتها؛ ويمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/delete\u007Cpage={{FULLPAGENAMEE}}}} سجل الحذف].
rev-suppressed-text-view|'''أُخفيت''' مراجعة الصفحة هذه.\nيمكنك رؤيتها؛ ويمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/suppress\u007Cpage={{FULLPAGENAMEE}}}} سجل الإخفاء].
rev-deleted-no-diff|لا يمكنك رؤية هذا الفرق لأن إحدى المراجعات '''حُذِفت'''.\nيمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/delete\u007Cpage={{FULLPAGENAMEE}}}} سجل الحذف].
rev-suppressed-no-diff|ليس بإمكانك مشاهدة هذا الفرق لأن إحدى المراجعات '''حذفت'''.
rev-deleted-unhide-diff|'''حُذِفت''' إحدى مراجعتي هذا الفرق.\nيمكن العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/delete\u007Cpage={{FULLPAGENAMEE}}}} سجل الحذف].\nبإمكانك [~{0} رؤية هذا الفرق] إذا أردت المتابعة.
rev-suppressed-unhide-diff|'''أُخفيت''' إحدى مراجعتي هذا الفرق.\nيمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/suppress\u007Cpage={{FULLPAGENAMEE}}}} سجل الإخفاء].\nبإمكانك [~{0} رؤية هذا الفرق] إذا أردت المتابعة.
rev-deleted-diff-view|'''حُذِفت''' إحدى مراجعتي هذا الفرق.\nيمكنك رؤية الفرق؛ ويمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/delete\u007Cpage={{FULLPAGENAMEE}}}} سجل الحذف].
rev-suppressed-diff-view|'''أُخفيت''' إحدى مراجعتي هذا الفرق.\nيمكنك رؤية هذا الفرق؛ ويمكنك العثور على التفاصيل في [{{fullurl:{{#Special:Log}}/suppress\u007Cpage={{FULLPAGENAMEE}}}} سجل الإخفاء].
rev-delundel|أظهر/أخف
rev-showdeleted|أظهر
revisiondelete|حذف/استرجاع المراجعات
revdelete-nooldid-title|مراجعة هدف غير صحيحة
revdelete-nooldid-text|إما أنك لم تحدد مراجعة (أو مراجعات) معينة هدفا لهذه الوظيفة، أو أن المراجعة المحددة غير موجودة، أو أنك تحاول إخفاء المراجعة الحالية.
revdelete-no-file|الملف المحدد غير موجود.
revdelete-show-file-confirm|هل أنت متأكد أنك تريد رؤية مراجعة محذوفة للملف "<nowiki>~{0}</nowiki>" بتاريخ ~{1} الساعة ~{2}؟
revdelete-show-file-submit|نعم
logdelete-selected|{{PLURAL:~{0}\u007Cحدث السجل المختار\u007Cأحداث السجل المختارة}}:
revdelete-confirm|الإداريون الآخرون في {{SITENAME}} سيظل بإمكانهم رؤية المحتوى المخفي ويمكنهم استرجاعه مجددا من خلال هذه الواجهة نفسها، مالم يتم وضع قيود إضافية.\nمن فضلك أكد أنك تنوي فعل هذا، وأنك تفهم العواقب، وأنك تفعل هذا بالتوافق مع [[{{MediaWiki:Policy-url}}\u007Cالسياسة]].
revdelete-suppress-text|الإخفاء ينبغي أن يتم استخدامه '''فقط''' في الحالات التالية:\n* معلومات شخصية غير ملائمة\n*: ''عناوين المنازل وأرقام التليفونات، أرقام الضمان الاجتماعي، إلى آخره.''
revdelete-legend|وضع ضوابط رؤية
revdelete-hide-text|أخف نص المراجعة
revdelete-hide-image|أخف محتوى الملف
revdelete-hide-name|أخف الفعل والهدف
revdelete-hide-comment|أخف تعليق التعديل
revdelete-hide-user|أخف اسم/آيبي المستخدم
revdelete-hide-restricted|أخف البيانات عن الإداريين إضافة إلى الآخرين
revdelete-radio-same|(لا تغير)
revdelete-radio-set|نعم
revdelete-radio-unset|لا
revdelete-suppress|أخف البيانات عن مديري النظام والبقية
revdelete-unsuppress|إزالة الضوابط من المراجعات المسترجعة
revdelete-log|السبب:
revdelete-submit|طبق على {{PLURAL:~{0}\u007C\u007Cالمراجعة المختارة\u007Cالمراجعتين المختارتين\u007Cالمراجعات المختارة}}
revdelete-success|'''تم تحديث رؤية المراجعات بنجاح.'''
revdelete-failure|'''تعذر تحديث رؤية المراجعة:'''\n~{0}
logdelete-success|'''تم ضبط رؤية السجلات بنجاح.'''
logdelete-failure|'''تعذر ضبط رؤية السجل:'''\n~{0}
revdel-restore|تغيير الرؤية
pagehist|تاريخ صفحة
deletedhist|التاريخ المحذوف
revdelete-hide-current|خطأ عند إحفاء العنصر المؤرخ في ~{1} ~{0}: هذه هي المراجعة الحالية.\nلا يمكن إخفاؤها.
revdelete-show-no-access|خطأ في إظهار العنصر ذا التاريخ ~{1} ~{0}: هذا العنصر معلم ك"مقيد".\nليس لك صلاحية الوصول إليه.
revdelete-modify-no-access|خطأ في تعديل العنصر ذا التاريخ ~{1} ~{0}: هذا العنصر معلم ك"مقيد".\nليس لك صلاحية الوصول إليه.
revdelete-modify-missing|خطأ في تعديل العنصر ذا الهوية ~{0}: العنصر مفقود من قاعدة البيانات!
revdelete-no-change|'''تحذير:''' العنصر ذو التاريخ ~{1} ~{0} لديه أصلا إعدادات الظهور المطلوبة.
revdelete-concurrent-change|خطأ في تعديل العنصر ذي التاريخ ~{1} ~{0}: تظهر حالته أن شخصا آخر عدله أثناء محاولتك تعديله.\nمن فضلك راجع السجلات.
revdelete-only-restricted|خطأ إخفاء العنصر المؤرخ ~{1}, ~{0}: لا تستطيع تنحية العناصر من عرض الإداريين بدون أن تحدد أيضا إحدى خيارات التنحية الأخرى.
revdelete-reason-dropdown|* أسباب حذف عامة\n** خرق لحقوق النشر\n** معلومات شخصية غير ملائمة\n**معلومات تشهيرية محتملة
revdelete-otherreason|سبب آخر/إضافي:
revdelete-reasonotherlist|سبب آخر
revdelete-edit-reasonlist|عدل أسباب الحذف
revdelete-offender|مؤلف المراجعة:
suppressionlog|سجل الإخفاء
suppressionlogtext|بالأسفل قائمة بعمليات الحذف والمنع التي تتضمن محتوى مخفيا عن الإداريين.\nانظر [[Special:BlockList\u007Cقائمة منع الآيبي]] لترى عمليات المنع القائمة الآن.
mergehistory|دمج تواريخ الصفحة
mergehistory-header|هذه الصفحة تسمح لك بدمج نسخ تاريخ صفحة ما إلى صفحة أخرى.\nتأكد من أن هذا التغيير سيحافظ على استمرار تاريخ الصفحة.
mergehistory-box|دمج مراجعات صفحتين:
mergehistory-from|الصفحة المصدر:
mergehistory-into|الصفحة الهدف:
mergehistory-list|تاريخ التعديل القابل للدمج
mergehistory-merge|المراجعات التالية من [[:~{0}]] يمكن دمجها إلى [[:~{1}]].\nاستخدم عامود الصناديق لدمج المراجعات التي تم إنشاؤها في وقبل الوقت المحدد.\nلاحظ أن استخدام وصلات التصفح سيعيد ضبط هذا العامود.
mergehistory-go|عرض التعديلات القابلة للدمج
mergehistory-submit|دمج المراجعات
mergehistory-empty|لا مراجعات يمكن دمجها.
mergehistory-success|~{2} {{PLURAL:~{2}\u007Cمراجعة\u007Cمراجعة}} من [[:~{0}]] تم دمجها بنجاح في [[:~{1}]].
mergehistory-fail|غير قادر على عمل دمج التاريخ، من فضلك أعد التحقق من محددات الصفحة والزمن.
mergehistory-no-source|الصفحة المصدر ~{0} غير موجودة.
mergehistory-no-destination|الصفحة الهدف ~{0} غير موجودة.
mergehistory-invalid-source|الصفحة المصدر يجب أن تكون عنوانا صحيحا.
mergehistory-invalid-destination|الصفحة الهدف يجب أن تكون عنوانا صحيحا.
mergehistory-autocomment|دمج [[:~{0}]] في [[:~{1}]]
mergehistory-comment|دمج [[:~{0}]] في [[:~{1}]]: ~{2}
mergehistory-same-destination|صفحتا المصدر والهدف لا يمكن أن تكونا نفس الشيء
mergehistory-reason|السبب:
mergelog|سجل الدمج
revertmerge|إلغاء الدمج
mergelogpagetext|بالأسفل قائمة بأحدث عمليات الدمج لتاريخ صفحة ما إلى أخرى.
history-title| «~{0}»: تاريخ المراجعة
difference-title|«~{0}»: الفرق بين المراجعتين
difference-title-multipage|«~{0}» و«~{1}»: الفرق بين الصفحتين
difference-multipage|(الفرق بين الصفحتين)
lineno|Sţar ~{0}:
compareselectedversions|قارن بين النسختين المختارتين
showhideselectedversions|أظهر/أخف المراجعات المختارة
editundo|Rajjaģ
diff-multi-manyusers|({{PLURAL:~{0}\u007C\u007Cمراجعة واحدة متوسطة غير معروضة أجراها\u007Cمراجعتان متوسطتان غير معروضتان أجراهما\u007C~{0} مراجعات متوسطة غير معروضة أجراها\u007C~{0} مراجعة متوسطة غير معروضة أجراها}} أكثر من {{PLURAL:~{1}\u007C\u007Cمستخدم واحد\u007Cمستخدمين\u007C~{1} مستخدمين\u007C~{1} مستخدمًا\u007C~{1} مستخدم}}.)
searchresults|Ir-rêzultâ mtêģ it-talwîj
searchresults-title|Ir-rêzultâ mtêģ it-talwîj ģlâ "~{0}"
prevn-title|~{0} {{PLURAL:~{0}\u007Cنتيجة\u007Cنتيجة}} سابقة
nextn-title|~{0} {{PLURAL:~{0}\u007Cنتيجة\u007Cنتيجة}} سابقة
shown-title| Warri{{PLURAL:Résultat weħed\u007CZouz résultats\u007C~{0} résultats\u007C~{0} en résultat}} men kol safħa
viewprevnext|Chouf (~{0} {{int:pipe-separator}} ~{1}) (~{2})
searchmenu-exists|'''famma ss'af7a ismha "[[:~{0}]]" fi hedha el wiki.'''
searchmenu-new|'''أنشئ الصفحة "[[:~{0}]]" في هذا الويكي!'''
searchprofile-articles|Safħat mtaε contenu
searchprofile-images|Multimédia
searchprofile-everything|Kol chay
searchprofile-advanced|Avancé
searchprofile-articles-tooltip|Farkes fi ~{0}
searchprofile-images-tooltip|Farkes f'elfichiers
searchprofile-everything-tooltip|Farkes kol chay (ħatta safħat leħdith)
searchprofile-advanced-tooltip|Ekhtar les espaces de noms elli bech tfarkes εlihom
search-result-size|~{0} ({{PLURAL:Ħatta kelma\u007CKelma waħda\u007CKelmtin\u007C~{1} kelmat\u007C~{1} en kelma}})
search-result-category-size|{{PLURAL:~{0}\u007Cلا أعضاء\u007Cعضو واحد\u007Cعضوان\u007C~{0} أعضاء\u007C~{0} عضوًا\u007C~{0} عضو}} ({{PLURAL:~{1}\u007Cلا تصانيف فرعية\u007Cتصنيف فرعي واحد\u007Cتصنيفان فرعيان\u007C~{1} تصنيفات فرعية\u007C~{1} تصنيفًا فرعيًا\u007C~{1} تصنيف فرعي}} و{{PLURAL:~{2}\u007Cلا ملفات\u007Cملف واحد\u007Cملفان\u007C~{2} ملفات\u007C~{2} ملفًا\u007C~{2} ملف}})
search-redirect|(تحويلة ~{0})
search-section|(section ~{0})
search-suggest|هل كنت تقصد: ~{0}
searchrelated|مرتبطة
searchall|Elkol
search-nonefound|لا توجد نتائج تطابق الاستعلام.
mypreferences|تفضيلاتي
youremail|البريد:
yourrealname|الاسم الحقيقي:
prefs-help-email|عنوان البريد الإلكتروني هو أمر اختياري، ولكن ستحتاج لإعادة تعيين كلمة المرور، إن نسيت كلمة المرور الخاصة بك.
prefs-help-email-others|يمكنك أيضا اختيار للسماح للآخرين الاتصال بك عن طريق صفحة المستخدم أو نقاش المستخدم الخاص بك دون الحاجة إلى الكشف عن الهوية الخاصة بك.
newuserlogpage|سجل إنشاء المستخدمين
action-edit|modifi hal page
nchanges|{{PLURAL:~{0}\u007Cلا تغييرات\u007Cتغيير واحد\u007Cتغييران\u007C~{0} تغييرات\u007C~{0} تغييرا\u007C~{0} تغيير}}
recentchanges|Ajadd tabdîlêt
recentchanges-legend|خيارات أحدث التغييرات
recentchanges-summary|تابع أحدث التغييرات للويكي عبر هذه التلقيمة.
recentchanges-feed-description|تابع أحدث التغييرات للويكي عبر هذه التلقيمة.
recentchanges-label-newpage|أنشأ هذا التعديل صفحة جديدة
recentchanges-label-minor|هذا تعديل طفيف
recentchanges-label-bot|أجرى هذا التعديل بوت
recentchanges-label-unpatrolled|لم يراجع هذا التعديل إلى الآن
rcnotefrom|بالأسفل التغييرات منذ '''~{1}''' (إلى '''~{0}''' معروضة).
rclistfrom|أظهر التغييرات بدءا من ~{2} ~{1}
rcshowhideminor|~{0} التعديلات الطفيفة
rcshowhidebots|~{0} البوتات
rcshowhideliu|~{0} المستخدمين المسجلين
rcshowhideanons|~{0} المستخدمين المجهولين
rcshowhidepatr|~{0} التعديلات المراجعة
rcshowhidemine|~{0} تعديلاتي
rclinks|أظهر آخر ~{0} تعديل في آخر ~{1} يوم<br />~{2}
diff|Farq
hist|Hîst
hide|أخف
show|اعرض
minoreditletter|thafif
newpageletter|jadid
boteditletter|bot
rc-change-size-new|~{0} {{PLURAL:~{0}\u007Coktê}} baģd it-tabdîl
rc-enhanced-expand|عرض التفاصيل (يتطلب جافاسكريبت)
rc-enhanced-hide|أخفِ التفاصيل
recentchangeslinked|تغييرات ذات علاقة
recentchangeslinked-toolbox|Tabdilet them
recentchangeslinked-title|التغييرات المرتبطة ب "~{0}"
recentchangeslinked-summary|هذه قائمة بالتغييرات التي تمت حديثا للصفحات الموصولة من صفحة معينة (أو إلى الأعضاء ضمن تصنيف معين).\nالصفحات في [[Special:Watchlist\u007Cقائمة مراقبتك]] '''عريضة'''
recentchangeslinked-page|اسم الصفحة:
recentchangeslinked-to|أظهر التغييرات للصفحات الموصولة للصفحة المعطاة عوضا عن ذلك
upload|Abεeth des fichiers l'esserveur
uploadlogpage|سجل الرفع
filedesc|ملخص:
license|ترخيص:
license-header|licence
file-anchor-link|milaf (Fichier)
filehist|Têrîx il-mîlaf
filehist-help|اضغط على وقت/زمن لرؤية الملف كما بدا في هذا الزمن.
filehist-revert|استرجع
filehist-current|حالي
filehist-datetime|وقت/زمن
filehist-thumb|صورة مصغرة
filehist-thumbtext|تصغير للنسخة بتاريخ ~{0}
filehist-user|مستخدم
filehist-dimensions|الأبعاد
filehist-comment|ta3li9at
imagelinks|استخدام الملف
linkstoimage|{{PLURAL:~{0}\u007C\u007Cالصفحة التالية تصل\u007Cالصفحتان التاليتان تصلان\u007Cال~{0} صفحات التالية تصل\u007Cال~{0} صفحة التالية تصل}} إلى هذا الملف:
nolinkstoimage|لا توجد صفحات تصل لهذا الملف.
sharedupload-desc-here|هذا الملف من ~{0} ويمكن استخدامه بواسطة المشاريع الأخرى.\nالوصف على [~{1} صفحة وصف الملف] هناك معروض بالأسفل.
randompage|Şafħa kîmê tjî
nbytes|{{PLURAL:Octet weħed\u007CZouz octets\u007C~{0} octets\u007C~{0} en octet}}
nmembers|{{PLURAL:~{0}\u007Cلا أعضاء\u007Cعضو واحد\u007Cعضوان\u007C~{0} أعضاء\u007C~{0} عضوا\u007C~{0} عضو}}
prefixindex|كل الصفحات بالبادئة
usercreated|{{GENDER:~{2}\u007Cأنشأه\u007Cأنشأته}} في ~{0} الساعة ~{1}
newpages|Safħat jdod
move|انقل
pager-newer-n|{{PLURAL:~{0}\u007Cأقدم 1\u007Cأقدم ~{0}}}
pager-older-n|{{PLURAL:~{0}\u007Cأقدم 1\u007Cأقدم ~{0}}}
booksources|مصادر كتاب
booksources-search-legend|البحث عن مصادر الكتب
log|سجلات
allarticles|kol ess'afa7at
allpagessubmit|اذهب
linksearch-line|~{0} موصولة من ~{1}
listgrouprights-members|(قائمة الأعضاء)
emailuser|إرسال رسالة لهذا المستخدم
watchlist|قائمة مراقبتي
mywatchlist|قائمة مراقبتي
watchlistfor2|ل~{0} ~{1}
watch|راقب
unwatch|أوقف المراقبة
watchlist-details|{{PLURAL:~{0}\u007C\u007Cصفحة واحدة\u007Cصفحتان\u007C~{0} صفحات\u007C~{0} صفحة}} في قائمة مراقبتك، بدون عد صفحات النقاش.
wlshowlast|عرض آخر ~{0} ساعات ~{1} أيام
watchlist-options|خيارات قائمة المراقبة
actioncomplete|انتهاء العملية
actionfailed|الفعل فشل
dellogpage|سجل الحذف
rollbacklink|rajjaε
protectlogpage|سجل الحماية
protectedarticle|حمى "[[~{0}]]"
undeletelink|اعرض/استعد
undeleteviewlink|اعرض
namespace|النطاق
invert|اعكس الاختيار
contributions|مساهماتي
contributions-title|مساهمات المستخدم ~{0}
mycontris|مساهماتي
contribsub2|ل~{0} (~{1})
uctop|(top)
month|من سنة (وأقدم):
year|من سنة (وأقدم):
sp-contributions-newbies|اعرض مساهمات الحسابات الجديدة فقط
sp-contributions-blocklog|سجل المنع
sp-contributions-uploads|مرفوعات
sp-contributions-logs|سجلات
sp-contributions-talk|نقاش
sp-contributions-search|بحث عن مساهمات
sp-contributions-username|عنوان أيبي أو اسم مستخدم:
sp-contributions-toponly|أظهر أعلى المراجعات فقط
sp-contributions-submit|lawwej
whatlinkshere|Cnûwwe illi ywassil l-hûnî
whatlinkshere-title|الصفحات التي تصل إلى "~{0}"
whatlinkshere-page|ss'af7a:
linkshere|الصفحات التالية تصل إلى '''[[:~{0}]]''':
nolinkshere|لا توجد صفحات تصل إلى '''[[:~{0}]]'''.
isredirect|صفحة تحويل
istemplate|مضمن
isimage|وصلة ملف
whatlinkshere-prev|{{PLURAL:~{0}\u007Cprevious\u007Cprevious ~{0}}}
whatlinkshere-next|{{PLURAL:~{0}\u007Cالقادمة\u007Cال~{0} القادمة}}
whatlinkshere-links|← وصلات
whatlinkshere-hideredirs|~{0} التحويلات
whatlinkshere-hidetrans|~{0} التضمينات
whatlinkshere-hidelinks|~{0} الوصلات
whatlinkshere-hideimages|~{0} وصلة صورة
whatlinkshere-filters|مرشحات
ipboptions|ساعتين:2 hours,يوم واحد:1 day,3 أيام:3 days,أسبوع واحد:1 week,أسبوعين:2 weeks,شهر واحد:1 month,3 أشهر:3 months,6 أشهر:6 months,سنة واحدة:1 year,دائم:infinite
ipblocklist|المستخدمون الممنوعون
blocklink|Bloqui
unblocklink|ارفع المنع
change-blocklink|تغيير المنع
contribslink|Mûsêhmêt
blocklogpage|سجل المنع
blocklogentry|منع "[[~{0}]]" لفترة زمنية مدتها ~{1} ~{2}
block-log-flags-nocreate|إنشاء الحسابات ممنوع
movelogpage|سجل النقل
revertmove|استرجع
export|تصدير صفحات
allmessagesname|الاسم
allmessagesdefault|النص الافتراضي
thumbnail_error|خطأ في إنشاء صورة مصغرة: ~{0}
tooltip-pt-userpage|صفحة المستخدم الخاصة بك
tooltip-pt-mytalk|صفحة نقاشك
tooltip-pt-preferences|تفضيلاتي
tooltip-pt-watchlist|قائمة الصفحات التي تراقب التغييرات التي تحدث بها
tooltip-pt-mycontris|قائمة مساهماتك
tooltip-pt-login|Međebîne kên itkoññektî, eme mûc bis-sîf
tooltip-pt-logout|خروج
tooltip-pt-createaccount|Međebîne law kên taģmil koñt w todxul, Lêkin mêkc maţlûb bêc taģmil hêđê.
tooltip-ca-talk|Disküsyioñ ģal-koñtënü mtêģ il-pâj
tooltip-ca-edit|Tnejjem tbaddil iş-şafḩa hêđi. Amân inzil ģal-bûtoñ mtêģ il-vû il-msebqa qbal mê tsijjil.
tooltip-ca-addsection|ابدأ قسما جديدا
tooltip-ca-viewsource|Essʾafħa protéjé.\nTnajjem tchouf essours mtaħħa.
tooltip-ca-history|Copiet qdom mtaε essafħa hedhi
tooltip-ca-protect|احم هذه الصفحة
tooltip-ca-delete|احذف هذه الصفحة
tooltip-ca-move|علم هذه الصفحة
tooltip-ca-watch|أضف هذه الصفحة إلى قائمة مراقبتك
tooltip-ca-unwatch|أزل هذه الصفحة من قائمة مراقبتك
tooltip-search|Lawwij fî- {{SITENAME}}
tooltip-search-go|Imcî l-pâj b-nafs il-ism îđê lqîthê
tooltip-search-fulltext|Farkis fiş-şafḩât ģat-têkst hêđa
tooltip-p-logo|Emchi lil-pâj il-ewelêniye
tooltip-n-mainpage|Imchi lil-pâj il-ewelêniye
tooltip-n-mainpage-description|Imchi lil-pâj il-ewelêniye
tooltip-n-portal|Ģal-macrûģ, cnûwwe tnijjim taģmil, wîn tilqâ illi ḩajtik bîh
tooltip-n-currentevents| Alqa information εla aham laħdeth mtaε tawa
tooltip-n-recentchanges|Lîste mtêģ ajadd it-tabdîlêt fil-wiki
tooltip-n-randompage|Ḩil iş-şafḩe illî tjî
tooltip-n-help|Il-blâşa bêc tilqâ fîhe
tooltip-t-whatlinkshere|Lîste mtêģ iş-şafḩât il-wiki il-kul illi twassil l-hûni
tooltip-t-recentchangeslinked|Aham ettabldilet f'essafħat elli ywaslou l'essafħa hedhi
tooltip-feed-atom|تلقيم أتوم لهذه الصفحة
tooltip-t-contributions|رؤية قائمة مساهمات هذا المستخدم
tooltip-t-emailuser|أرسل رسالة لهذا المستخدم
tooltip-t-upload|Abεeth des fichiers l'esserveur
tooltip-t-specialpages|Lîste mtêģ iş-şafħât is-spêsyal il-kul
tooltip-t-print|Vêrsyoñ titiţbaģ min hal-pâj..
tooltip-t-permalink|Lien dayem l'elversion hedhi mtaε essafħa
tooltip-ca-nstab-main|Chouf elcontenu mtaε essafħa
tooltip-ca-nstab-user|اعرض صفحة المستخدم
tooltip-ca-nstab-special|هذه صفحة خاصة، لا تستطيع أن تعدل الصفحة نفسها
tooltip-ca-nstab-project|رؤية صفحة المحتوى
tooltip-ca-nstab-image|رؤية صفحة الملف
tooltip-ca-nstab-template|رؤية القالب
tooltip-ca-nstab-category|رؤية صفحة التصنيف
tooltip-minoredit|علم على هذا كتعديل طفيف
tooltip-save|احفظ تغييراتك
tooltip-preview|اعرض تغييراتك، من فضلك استخدم هذا قبل الحفظ!
tooltip-diff|اعرض التغييرات التي قمت بها للنص.
tooltip-compareselectedversions|شاهد الفروق بين النسختين المختارتين من هذه الصفحة.
tooltip-watch|أضف هذه الصفحة إلى قائمة مراقبتك
tooltip-rollback|"Rajjaģ" yrajjiģ it-tabdîlêt f'hassafħa el'ekher weħed baddel fi nazla waħda.
tooltip-undo|"رجوع" تسترجع هذا التعديل وتفتح نافذة التعديل في نمط العرض المسبق. تسمح بإضافة سبب في الملخص.\n"Annuler" trajjeε eltabdila lekhra w tħel fenêtre mtaε el tabdil mtaε elvue el msabqa. Tnajjem tqoul εlech f'ettalkhis.
tooltip-summary|أدخل ملخصا قصيرا
pageinfo-toolboxlink|Maģlûmêt ģalâ hal-pâj
previousdiff|→ التعديل السابق
nextdiff|التعديل اللاحق ←
file-info-size|~{0} × ~{1} بكسل حجم الملف: ~{2}، نوع MIME: ~{3}
file-nohires|لا توجد دقة أعلى متوفرة.
svg-long-desc|ملف SVG، أبعاده ~{0} × ~{1} بكسل، حجم الملف: ~{2}
show-big-image|il-fîcyê il-aşlî
bad_image_list|Elformat kima hakka:\nLes élements mtaε lista (lostra elli yabdew b' *) yetħesbou.\nEllien lowel fi star yelzmou ykoun lien el fichier khayeb.\nAy lien ekher fi nafs estar yetħseb exception, maħneha des pages win elfichier ynajem ykoun fi star.
metadata|بيانات ميتا
metadata-help|هذا الملف يحتوي على معلومات إضافية، غالبا ما تكون أضيفت من قبل الكاميرا الرقمية أو الماسح الضوئي المستخدم في إنشاء الملف.\nإذا كان الملف قد عدل عن حالته الأصلية، فبعض التفاصيل قد لا تعبر عن الملف المعدل.
metadata-fields|حقول معطيات الميتا الموجودة في هذه الرسالة سوف تعرض في صفحة الصورة عندما يكون جدول معطيات الميتا مضغوطا.\nالحقول الأخرى ستكون مخفية افتراضيا.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude
namespacesall|الكل
monthsall|الكل
watchlistedit-clear-explain|Elɛanawin lkol bech yetnaħaw mel'lista mteɛek
watchlistedit-clear-titles|Elɛanawin
watchlistedit-too-many|Famma barcha pajet w'manajmouch nħotouhom lkol lahné
watchlisttools-view|اعرض التغييرات المرتبطة
watchlisttools-edit|اعرض قائمة المراقبة وعدلها
watchlisttools-raw|عدل قائمة المراقبة الخام
duplicate-defaultsort|'''تحذير:''' مفتاح الترتيب الافتراضي "~{1}" يتجاوز مفتاح الترتيب الافتراضي السابق "~{0}".
specialpages|Safḩât spêsyâl
external_image_whitelist| #<pre>اترك هذا السطر تماما كما هو\n#ضع منثورات التعبيرات المنتظمة (فقط الجزء الذي يذهب بين //) بالأسفل\n#هذه ستتم مطابقتها مع مسارات الصور الخرجية (الموصولة بشكل مباشر)\n#هذه التي تطابق سيتم عرضها كصور، غير ذلك فقط وصلة إلى الصورة سيتم عرضها\n#السطور التي تبدأ ب# تتم معاملتها كتعليقات\n#هذا لا يتأثر بحالة الحروف\n\n#ضع كل منثورات التعبيرات المنتظمة فوق هذا السطر. اترك هذا السطر تماما كما هو</pre>
tag-filter|مرشح [[Special:Tags\u007Cالوسوم]]:
searchsuggest-search|Lawwij
']:>
).lang
;

Some files were not shown because too many files have changed in this diff Show More