Found 895 repositories(showing 30)
kreuzberg-dev
A polyglot document intelligence framework with a Rust core. Extract text, metadata, images, and structured information from PDFs, Office documents, images, and 91+ formats. Available for Rust, Python, Ruby, Java, Go, PHP, Elixir, C#, R, C, TypeScript (Node/Bun/Wasm/Deno)- or use via CLI, REST API, or MCP server.
jonmagic
Tool for extracting pages from pdf as images and text as strings.
soulisalmed
Extract text and images from highlighted pdf generated with reMarkable tablet.
mehmet-kozan
Pure TypeScript, cross-platform module for extracting text, images, and tabular data from PDFs. Run 🤗 directly in your browser or in Node.js
NanoNets
OCR library to extract text & tables from PDF files and images. Convert any image or PDF to CSV / TXT / JSON / Searchable PDF.
JuniverseCoder
This tool converts PDF files and images into editable PowerPoint presentations (`.pptx`) by leveraging structured data from the MinerU PDF Extractor. It accurately reconstructs text, images, and layout, providing a high-fidelity, editable version of the original document.
t0mer
ocr-docker is small, Flask powerd web app, helps us to extract text from images and pdf document using OCR
MariyaSha
a Tkinter GUI application that extracts text and images from a given PDF file
Micka33
Extract meaningful content from pdf and psd file, such as texts and images both linked into a common JSON string
The system was developed with USSD or SMS technology to be used without limits on all modern or outdated mobile devices. The main objective is to reach the entire population by offering the most comfort possible without complications in technologies in terms of use and their monetary movements. More about this source text. The main operation is to buy your balance at any shipping point and use it at any time sending to anyone and keep your balance without moving so much. Because the thing goes like this: We have to have a main number that answers all the requests of the final client, consulting everything in a database and saving. The main task in the foreground is to get an automated server to receive messages from the subscribers to the system, their requests, and this server simultaneously processes the request for the message by responding to the requester, the requester at the same time confirms his transaction with a pin code According to the transaction, the commissions are charged in your wallet, in the same way there will be users as affiliates where they carry out their operations with their balances and the commissions are distributed between the same and the company according to the established percentage, this event must be registered in a database that will store the customer's information, then this, when made possible, must be a part of the Administration panel, to be able to see all the requests processed, the balances of the clients, their operations, a part to enable or create new clients and users by roles. A confirmation PIN must be sent from the end user, for security reasons, an encrypted PIN. Integrate payment gateway for international clients and they will use VISA to recharge their wallet. -> The user will use their VISA card to recharge their balance if it is what they have and we will have to use a gateway, NOW, nationwide, the use of cards is almost 0%, the second option for natives is: We have to add the option to create ticket and printed or small printed cards to scratch that will contain a code, for example: 1286565XXX, then once scratch and enter it, a balance is recharged, then they will have to be GENERATED with the same More about this source text. system, maintaining referential integrity and printing them. -> Okay, will you buy me scratch cards and give me cash? YES. -> Perfect, in some kiosks installed for example in the streets and commercial places. A well-organized project makes maintenance easy. Error correction. Remember business logic well. There must be a part to configure or parameterize the commissions according to the amounts to be sent. Each user must have their balance account and commissions account, these commissions must be withdrawn at any time and be transferred to their account of movements. If the user asks for a history of their transactions, it is sent to them at the same time as an Excel or PDF file. BUSINESS LOGIC: • Prices of cards to print: 10,000, 25,000, 60,000, 90,000, 125,000, 300,000. • Make the shipment the interest commission is 20% • Receive by saving in the wallet the commission is 20% interest, it is entered into your account • Receive by taking cash the commission of 20% is transferred to the effective payer. • Make payment of a bill for a service with your wallet the standard spending commission is 1,000 • Receive payment of an invoice for a paid service the standard expense commission is 1,000 • Make payment of an article or product the expense commission is 5%. • Receive payment for an item or product, the expense commission is 5%. • Buy GETESA or MUNI balance, the expense commission is 50XAF. CASES: CASE 0: REGISTER: TYPES OF USERS: SUPER_ADMIN, ADMIN, FRANCHISE_CLIETE, NORMAL_CLIENT • Send word: HELLO, respond with an image incorporated wallet + Template; CORPORATED WALLET Greetings. Your shipments, purchases earnings and wallet "You win and I win" Send: R -> Register S -> If you are already registered IF -> More information (Yes, it is the first time). FAMILY (if already registered) A. Reload. • Receive menu descriptions of services: A. Register, B. Send, C. Receive, D. Join to win, E. My balance, F. Extract, G. About us. More about CASES. • Register ok: Credit card code (mandatory), ^ Telephone number (obviously already obtained with the sms), Full name, City, PIN code, Recharge code • Verify account. CASE 1: PERFORM OPERATION: • Send word: FAMILY • Receive menu descriptions of services: AB. Recharge. B. Send, B1. Send payment for a service, C. Receive, C1. Receive service payment. D. Join to win, E. My balance, FA. Pay bills, FB. Pagar luz, F. Extract, G. About us. • Reload: Put scratch card code (purchased at any kiosk or agency) • Receive sms balance. • REFILL WITH VISA CARD: link from stripe or any payment website with OTP • Synchronize the balance of the currency or reloaded currency CASE 2: SEND: • Amount to send • Recipient phone • Balance ok? • Ask for confirmation PIN • Debit sender customer account: amount sent, amount on commission (percentage setting) • Distribute or distribute commissions: company percentage to company commissions account, sender percentage to commissions account. • Complete operation message: Sender, amount, commission, remaining balance, date CASE 3: RECEIVE: Code shipping • Sender • Amount • PIN confirmation • Operation message CASE 4: JOIN TO WIN • Send word: WIN • Request card or recharge code (credit account with higher balance) • Transform to account (FRANQUICIA_CLIETE) • Automatically establish commission percentage for sending or receiving. (SUPER ADMIN PANEL } • Ok: account info message. CASE 5: ACCOUNT INFORMATION • Send word: BALANCE or INFO • Info message: Name, balance, commissions CASE 6: WITHDRAWAL COMMISSIONS • Send keyword: DAME • Amount to withdraw • PIN confirmation • Debit commissions account • Top up main customer account. • Regularize account of commissions. • Status information. CASE 7: CHANGE PIN • Send PIN word • Change? • old PIN • New PIN • new PIN confirmation • PIN message changed successfully CASE 8 FB: PAY LIGHT • SEGESA phone • Counter code • Amount payable • PIN confirmation • Invoice in PDF • Successful payment • Debit 1000 • Automatic collection of the amount of 1000 SEGESA account • Income of the amount paid to the SEGESA account • Ge CASE 9 F: REQUEST EXTRACT • Write word: EX • Dates: Start date, End date, ALL • Excel file with transaction information. CASE 10 G: ABOUT US • Send word: CONTACT • Detailed information on the company's services and contacts. CASE 11: ADMINISTRATIVE PANEL • Statistics of operations and statuses of Chart.js accounts • Admin users • Manage clients • Receive • Send • Operations • Returns • Payments • Links • Accounts • Setting • Generate balances or scratch cards WALLET OPERATIONS. CASE 0-OB: RECEIVE PAYMENT OF A SERVICE. • Keyword: PS C1 • Ask to put amount • Ask to put a pay phone • Ask to put a description • Receive descriptive sms and send payment code automatically • Receive authorized payer code • Confirm transaction code • Apply expense commission CASE 1-OB: Make payment for a service • Receive payment code from provider • Keyword: B1 • Enter code • See payment info. • Q-> Confirm • PIN confirmation • Debit the payer account the amount • Debt account the payer commission expenses • Change transaction status. Beforehand in the future I want to consume a transaction by its code in another application and verify its effectiveness in the future with another application that I have in my fan of projects. It will be a big platform, MY VISION.
robert-mcdermott
A utility that extracts text from images or PDFs using a local or remote OpenAI-compatible LLM API endpoint with vision-capable multimodal models. For PDFs, each page is rendered to an image and processed sequentially; outputs are concatenated into a single Markdown document.
alexandre-garrec
Remote Zip File Extractor is a Node.js tool that allows you to stream and display the contents of various file types from a remote ZIP archive directly in your terminal. With support for images, audio files, text, PDFs, and more, it offers a modular, extensible system where custom handlers can be added for new file types. It's perfect for developer
N30nHaCkZ
Linux kernel release 3.x <http://kernel.org/> These are the release notes for Linux version 3. Read them carefully, as they tell you what this is all about, explain how to install the kernel, and what to do if something goes wrong. WHAT IS LINUX? Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance. It has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy-on-write executables, proper memory management, and multistack networking including IPv4 and IPv6. It is distributed under the GNU General Public License - see the accompanying COPYING file for more details. ON WHAT HARDWARE DOES IT RUN? Although originally developed first for 32-bit x86-based PCs (386 or higher), today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell, IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS, Xtensa, Tilera TILE, AVR32 and Renesas M32R architectures. Linux is easily portable to most general-purpose 32- or 64-bit architectures as long as they have a paged memory management unit (PMMU) and a port of the GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has also been ported to a number of architectures without a PMMU, although functionality is then obviously somewhat limited. Linux has also been ported to itself. You can now run the kernel as a userspace application - this is called UserMode Linux (UML). DOCUMENTATION: - There is a lot of documentation available both in electronic form on the Internet and in books, both Linux-specific and pertaining to general UNIX questions. I'd recommend looking into the documentation subdirectories on any Linux FTP site for the LDP (Linux Documentation Project) books. This README is not meant to be documentation on the system: there are much better sources available. - There are various README files in the Documentation/ subdirectory: these typically contain kernel-specific installation notes for some drivers for example. See Documentation/00-INDEX for a list of what is contained in each file. Please read the Changes file, as it contains information about the problems, which may result by upgrading your kernel. - The Documentation/DocBook/ subdirectory contains several guides for kernel developers and users. These guides can be rendered in a number of formats: PostScript (.ps), PDF, HTML, & man-pages, among others. After installation, "make psdocs", "make pdfdocs", "make htmldocs", or "make mandocs" will render the documentation in the requested format. INSTALLING the kernel source: - If you install the full sources, put the kernel tarball in a directory where you have permissions (eg. your home directory) and unpack it: gzip -cd linux-3.X.tar.gz | tar xvf - or bzip2 -dc linux-3.X.tar.bz2 | tar xvf - Replace "X" with the version number of the latest kernel. Do NOT use the /usr/src/linux area! This area has a (usually incomplete) set of kernel headers that are used by the library header files. They should match the library, and not get messed up by whatever the kernel-du-jour happens to be. - You can also upgrade between 3.x releases by patching. Patches are distributed in the traditional gzip and the newer bzip2 format. To install by patching, get all the newer patch files, enter the top level directory of the kernel source (linux-3.X) and execute: gzip -cd ../patch-3.x.gz | patch -p1 or bzip2 -dc ../patch-3.x.bz2 | patch -p1 Replace "x" for all versions bigger than the version "X" of your current source tree, _in_order_, and you should be ok. You may want to remove the backup files (some-file-name~ or some-file-name.orig), and make sure that there are no failed patches (some-file-name# or some-file-name.rej). If there are, either you or I have made a mistake. Unlike patches for the 3.x kernels, patches for the 3.x.y kernels (also known as the -stable kernels) are not incremental but instead apply directly to the base 3.x kernel. For example, if your base kernel is 3.0 and you want to apply the 3.0.3 patch, you must not first apply the 3.0.1 and 3.0.2 patches. Similarly, if you are running kernel version 3.0.2 and want to jump to 3.0.3, you must first reverse the 3.0.2 patch (that is, patch -R) _before_ applying the 3.0.3 patch. You can read more on this in Documentation/applying-patches.txt Alternatively, the script patch-kernel can be used to automate this process. It determines the current kernel version and applies any patches found. linux/scripts/patch-kernel linux The first argument in the command above is the location of the kernel source. Patches are applied from the current directory, but an alternative directory can be specified as the second argument. - Make sure you have no stale .o files and dependencies lying around: cd linux make mrproper You should now have the sources correctly installed. SOFTWARE REQUIREMENTS Compiling and running the 3.x kernels requires up-to-date versions of various software packages. Consult Documentation/Changes for the minimum version numbers required and how to get updates for these packages. Beware that using excessively old versions of these packages can cause indirect errors that are very difficult to track down, so don't assume that you can just update packages when obvious problems arise during build or operation. BUILD directory for the kernel: When compiling the kernel, all output files will per default be stored together with the kernel source code. Using the option "make O=output/dir" allow you to specify an alternate place for the output files (including .config). Example: kernel source code: /usr/src/linux-3.X build directory: /home/name/build/kernel To configure and build the kernel, use: cd /usr/src/linux-3.X make O=/home/name/build/kernel menuconfig make O=/home/name/build/kernel sudo make O=/home/name/build/kernel modules_install install Please note: If the 'O=output/dir' option is used, then it must be used for all invocations of make. CONFIGURING the kernel: Do not skip this step even if you are only upgrading one minor version. New configuration options are added in each release, and odd problems will turn up if the configuration files are not set up as expected. If you want to carry your existing configuration to a new version with minimal work, use "make oldconfig", which will only ask you for the answers to new questions. - Alternative configuration commands are: "make config" Plain text interface. "make menuconfig" Text based color menus, radiolists & dialogs. "make nconfig" Enhanced text based color menus. "make xconfig" X windows (Qt) based configuration tool. "make gconfig" X windows (Gtk) based configuration tool. "make oldconfig" Default all questions based on the contents of your existing ./.config file and asking about new config symbols. "make silentoldconfig" Like above, but avoids cluttering the screen with questions already answered. Additionally updates the dependencies. "make olddefconfig" Like above, but sets new symbols to their default values without prompting. "make defconfig" Create a ./.config file by using the default symbol values from either arch/$ARCH/defconfig or arch/$ARCH/configs/${PLATFORM}_defconfig, depending on the architecture. "make ${PLATFORM}_defconfig" Create a ./.config file by using the default symbol values from arch/$ARCH/configs/${PLATFORM}_defconfig. Use "make help" to get a list of all available platforms of your architecture. "make allyesconfig" Create a ./.config file by setting symbol values to 'y' as much as possible. "make allmodconfig" Create a ./.config file by setting symbol values to 'm' as much as possible. "make allnoconfig" Create a ./.config file by setting symbol values to 'n' as much as possible. "make randconfig" Create a ./.config file by setting symbol values to random values. "make localmodconfig" Create a config based on current config and loaded modules (lsmod). Disables any module option that is not needed for the loaded modules. To create a localmodconfig for another machine, store the lsmod of that machine into a file and pass it in as a LSMOD parameter. target$ lsmod > /tmp/mylsmod target$ scp /tmp/mylsmod host:/tmp host$ make LSMOD=/tmp/mylsmod localmodconfig The above also works when cross compiling. "make localyesconfig" Similar to localmodconfig, except it will convert all module options to built in (=y) options. You can find more information on using the Linux kernel config tools in Documentation/kbuild/kconfig.txt. - NOTES on "make config": - Having unnecessary drivers will make the kernel bigger, and can under some circumstances lead to problems: probing for a nonexistent controller card may confuse your other controllers - Compiling the kernel with "Processor type" set higher than 386 will result in a kernel that does NOT work on a 386. The kernel will detect this on bootup, and give up. - A kernel with math-emulation compiled in will still use the coprocessor if one is present: the math emulation will just never get used in that case. The kernel will be slightly larger, but will work on different machines regardless of whether they have a math coprocessor or not. - The "kernel hacking" configuration details usually result in a bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer 'n' to the questions for "development", "experimental", or "debugging" features. COMPILING the kernel: - Make sure you have at least gcc 3.2 available. For more information, refer to Documentation/Changes. Please note that you can still run a.out user programs with this kernel. - Do a "make" to create a compressed kernel image. It is also possible to do "make install" if you have lilo installed to suit the kernel makefiles, but you may want to check your particular lilo setup first. To do the actual install, you have to be root, but none of the normal build should require that. Don't take the name of root in vain. - If you configured any of the parts of the kernel as `modules', you will also have to do "make modules_install". - Verbose kernel compile/build output: Normally, the kernel build system runs in a fairly quiet mode (but not totally silent). However, sometimes you or other kernel developers need to see compile, link, or other commands exactly as they are executed. For this, use "verbose" build mode. This is done by inserting "V=1" in the "make" command. E.g.: make V=1 all To have the build system also tell the reason for the rebuild of each target, use "V=2". The default is "V=0". - Keep a backup kernel handy in case something goes wrong. This is especially true for the development releases, since each new release contains new code which has not been debugged. Make sure you keep a backup of the modules corresponding to that kernel, as well. If you are installing a new kernel with the same version number as your working kernel, make a backup of your modules directory before you do a "make modules_install". Alternatively, before compiling, use the kernel config option "LOCALVERSION" to append a unique suffix to the regular kernel version. LOCALVERSION can be set in the "General Setup" menu. - In order to boot your new kernel, you'll need to copy the kernel image (e.g. .../linux/arch/i386/boot/bzImage after compilation) to the place where your regular bootable kernel is found. - Booting a kernel directly from a floppy without the assistance of a bootloader such as LILO, is no longer supported. If you boot Linux from the hard drive, chances are you use LILO, which uses the kernel image as specified in the file /etc/lilo.conf. The kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or /boot/bzImage. To use the new kernel, save a copy of the old image and copy the new image over the old one. Then, you MUST RERUN LILO to update the loading map!! If you don't, you won't be able to boot the new kernel image. Reinstalling LILO is usually a matter of running /sbin/lilo. You may wish to edit /etc/lilo.conf to specify an entry for your old kernel image (say, /vmlinux.old) in case the new one does not work. See the LILO docs for more information. After reinstalling LILO, you should be all set. Shutdown the system, reboot, and enjoy! If you ever need to change the default root device, video mode, ramdisk size, etc. in the kernel image, use the 'rdev' program (or alternatively the LILO boot options when appropriate). No need to recompile the kernel to change these parameters. - Reboot with the new kernel and enjoy. IF SOMETHING GOES WRONG: - If you have problems that seem to be due to kernel bugs, please check the file MAINTAINERS to see if there is a particular person associated with the part of the kernel that you are having trouble with. If there isn't anyone listed there, then the second best thing is to mail them to me (torvalds@linux-foundation.org), and possibly to any other relevant mailing-list or to the newsgroup. - In all bug-reports, *please* tell what kernel you are talking about, how to duplicate the problem, and what your setup is (use your common sense). If the problem is new, tell me so, and if the problem is old, please try to tell me when you first noticed it. - If the bug results in a message like unable to handle kernel paging request at address C0000010 Oops: 0002 EIP: 0010:XXXXXXXX eax: xxxxxxxx ebx: xxxxxxxx ecx: xxxxxxxx edx: xxxxxxxx esi: xxxxxxxx edi: xxxxxxxx ebp: xxxxxxxx ds: xxxx es: xxxx fs: xxxx gs: xxxx Pid: xx, process nr: xx xx xx xx xx xx xx xx xx xx xx or similar kernel debugging information on your screen or in your system log, please duplicate it *exactly*. The dump may look incomprehensible to you, but it does contain information that may help debugging the problem. The text above the dump is also important: it tells something about why the kernel dumped code (in the above example, it's due to a bad kernel pointer). More information on making sense of the dump is in Documentation/oops-tracing.txt - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump as is, otherwise you will have to use the "ksymoops" program to make sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred). This utility can be downloaded from ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ . Alternatively, you can do the dump lookup by hand: - In debugging dumps like the above, it helps enormously if you can look up what the EIP value means. The hex value as such doesn't help me or anybody else very much: it will depend on your particular kernel setup. What you should do is take the hex value from the EIP line (ignore the "0010:"), and look it up in the kernel namelist to see which kernel function contains the offending address. To find out the kernel function name, you'll need to find the system binary associated with the kernel that exhibited the symptom. This is the file 'linux/vmlinux'. To extract the namelist and match it against the EIP from the kernel crash, do: nm vmlinux | sort | less This will give you a list of kernel addresses sorted in ascending order, from which it is simple to find the function that contains the offending address. Note that the address given by the kernel debugging messages will not necessarily match exactly with the function addresses (in fact, that is very unlikely), so you can't just 'grep' the list: the list will, however, give you the starting point of each kernel function, so by looking for the function that has a starting address lower than the one you are searching for but is followed by a function with a higher address you will find the one you want. In fact, it may be a good idea to include a bit of "context" in your problem report, giving a few lines around the interesting one. If you for some reason cannot do the above (you have a pre-compiled kernel image or similar), telling me as much about your setup as possible will help. Please read the REPORTING-BUGS document for details. - Alternatively, you can use gdb on a running kernel. (read-only; i.e. you cannot change values or set break points.) To do this, first compile the kernel with -g; edit arch/i386/Makefile appropriately, then do a "make clean". You'll also need to enable CONFIG_PROC_FS (via "make config"). After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore". You can now use all the usual gdb commands. The command to look up the point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes with the EIP value.) gdb'ing a non-running kernel currently fails because gdb (wrongly) disregards the starting offset for which the kernel is compiled.
jina-ai
Jina Executor used for extracting images and text as chunks from PDF data
tjujingzong
一款智能合同审查工具——an intelligent contract review tool that extracts text and structure from PDFs/images to identify risky clauses.
weronikazak
Flask website integrated with Tesseract-OCR for reading multiple images, extracting text from them, and saving to Word, PDF, or txt file 🖼🡆🆎 [finished]
Techyuvi
To extract text from an image and PDF file
MistralOCR is an open-source application that transforms documents into structured data using Mistral AI's OCR capabilities. Built with FastAPI and Streamlit, it provides an intuitive interface for extracting and processing text from PDFs and images, making document digitization effortless and accurate.
diging
Distributed system based on Apache Kafka to run OCR on images and extract images and texts from PDF files.
daekeun-ml
A tool that extracts text, tables, and images from unstructed documents (pdf, xlsx, pptx, docx) and generates AI-powered summaries.
gagangulyani
OCR made for the specific use case of extracting Covid Info from Images, PDFs and Texts
OteyJo
Effortlessly extract text, images, tables, and metadata from PDF files using Python. Built with the unstructured.io framework and enhanced with AI for high accuracy.
Extracted tabular data from scanned images or PDF documents and restructured text into well-formatted tables exported to CSV/Excel files.
qigao
Extract image and text from PDF file by mupdf
Sweatnessstrong
This Python script converts a PDF file to Word format using OCR (Optical Character Recognition). It extracts text from each page of the PDF, converts the pages to images, performs OCR on the images, and saves the extracted text to text files.
MediaWiki:FileUploadWizard.js From Wikipedia, the free encyclopedia Jump to navigationJump to search Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button. Firefox: hold down the Shift key while clicking Reload (or press Ctrl-Shift-R). Google Chrome and Safari users can just click the Reload button. For details and instructions about other browsers, see Wikipedia:Bypass your cache. /* * =============================================================== * FileUploadWizard.js * Script for uploading files through a dynamic questionnaire. * This is the code to accompany [[Wikipedia:File Upload Wizard]]. * =============================================================== */ var fuwTesting = false; var fuwDefaultTextboxLength = 60; var fuwDefaultTextareaWidth = '90%'; var fuwDefaultTextareaLines = 3; // ================================================================ // Constructor function of global fuw (= File Upload Wizard) object // ================================================================ function fuwGlobal() { // Loading the accompanying .css mw.loader.load( mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?title=MediaWiki:FileUploadWizard.css&action=raw&ctype=text/css', 'text/css' ); // see if user is logged in, autoconfirmed, experienced etc. this.getUserStatus(); fuwSetVisible('warningLoggedOut', (this.userStatus == 'anon')); fuwSetVisible('warningNotConfirmed', (this.userStatus == 'notAutoconfirmed')); if ((this.userStatus == 'anon') || (this.userStatus == 'notAutoconfirmed')) { return; } fuwSetVisible('fuwStartScriptLink', false); // create the form element to wrap the main ScriptForm area // containing input elements of Step2 and Step3 var frm = fuwGet('fuwScriptForm'); if (! frm) { frm = document.createElement('form'); frm.id = "fuwScriptForm"; var area = fuwGet('placeholderScriptForm'); var parent = area.parentNode; parent.insertBefore(frm, area); parent.removeChild(area); frm.appendChild(area); } this.ScriptForm = frm; // create the TargetForm element that contains the filename // input box, together with hidden input controls. // This is the form that is actually submitted to the api.php. frm = fuwGet('TargetForm'); if (! frm) { frm = document.createElement('form'); frm.id = "TargetForm"; frm.method = "post"; frm.enctype = "multipart/form-data"; // "enctype" doesn't work properly on IE; need "encoding" instead: frm.encoding = "multipart/form-data"; // we'll submit via api.php, not index.php, mainly because that // allows us to use a proper edit summary different from the page content frm.action = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php'; // However, since api.php sends back a response page that humans won't want to read, // we'll have to channel that response away and discard it. We'll use a hidden iframe // for that purpose. // Unfortunately, it doesn't seem possible to submit file upload content through an // Xmlhtml object via Ajax. frm.target = "TargetIFrame"; //testing: //frm.target = "_blank"; var area = fuwGet('placeholderTargetForm'); var parent = area.parentNode; parent.insertBefore(frm, area); parent.removeChild(area); frm.appendChild(area); } this.TargetForm = frm; // For the testing version, create a third form that will display // the contents to be submitted, at the bottom of the page if (fuwTesting) { frm = fuwGet('fuwTestForm'); if (! frm) { frm = document.createElement('form'); frm.id = "fuwTestForm"; var area = fuwGet('placeholderTestForm'); var parent = area.parentNode; parent.insertBefore(frm, area); parent.removeChild(area); frm.appendChild(area); } this.TestForm = frm; } // objects to hold cached results during validation and processing this.opts = { }; this.warn = { }; // create the input filename box var filebox = document.createElement('input'); filebox.id = 'file'; filebox.name = 'file'; filebox.type = 'file'; filebox.size = fuwDefaultTextboxLength; filebox.onchange = fuwValidateFile; filebox.accept = 'image/png,image/jpeg,image/gif,image/svg+xml,image/tiff,image/x-xcf,application/pdf,image/vnd.djvu,audio/ogg,video/ogg,audio/rtp-midi'; fuwAppendInput('file', filebox); // create hidden controls for sending the remaining API parameters: fuwMakeHiddenfield('action', 'upload', 'apiAction'); fuwMakeHiddenfield('format', 'xml', 'apiFormat'); fuwMakeHiddenfield('filename', '', 'apiFilename'); fuwMakeHiddenfield('text', '', 'apiText'); fuwMakeHiddenfield('comment', '', 'apiComment'); fuwMakeHiddenfield('token', mw.user.tokens.get('editToken'), 'apiToken'); fuwMakeHiddenfield('ignorewarnings', 1, 'apiIgnorewarnings'); fuwMakeHiddenfield('watch', 1, 'apiWatch'); if (fuwTesting) { fuwMakeHiddenfield('title', mw.config.get('wgPageName') + "/sandbox", 'SandboxTitle'); fuwMakeHiddenfield('token', mw.user.tokens.get('editToken'), 'SandboxToken'); fuwMakeHiddenfield('recreate', 1, 'SandboxRecreate'); } // create a hidden IFrame to send the api.php response to var ifr = document.createElement('iframe'); ifr.id = "TargetIFrame"; ifr.name = "TargetIFrame"; //ifr.setAttribute('style', 'float:right;width:150px;height:150px;'); ifr.style.display = "none"; ifr.src = ""; fuwAppendInput('TargetIFrame', ifr); if (fuwTesting) { // create the sandbox submit button btn = document.createElement('input'); btn.id = 'SandboxButton'; btn.value = 'Sandbox'; btn.name = 'Sandbox'; btn.disabled = true; btn.type = 'button'; btn.style.width = '12em'; btn.onclick = fuwSubmitSandbox; fuwAppendInput('SandboxButton', btn); } // create the real submit button btn = document.createElement('input'); btn.id = "SubmitButton"; btn.value = "Upload"; btn.name = "Upload"; btn.disabled = true; btn.type = "button"; btn.onclick = fuwSubmitUpload; btn.style.width = '12em'; fuwAppendInput('SubmitButton', btn); // create the Commons submit button btn = document.createElement('input'); btn.id = "CommonsButton"; btn.value = "Upload on Commons"; btn.name = "Upload_on_Commons"; btn.disabled = true; btn.type = "button"; btn.onclick = fuwSubmitCommons; btn.style.width = '12em'; fuwAppendInput('CommonsButton', btn); // create reset buttons for (i = 1; i<=2; i++) { btn = document.createElement('input'); btn.id = 'ResetButton' + i; btn.value = "Reset form"; btn.name = "Reset form"; btn.type = "button"; btn.onclick = fuwReset; btn.style.width = '12em'; fuwAppendInput('ResetButton' + i, btn); } // names of radio button fields var optionRadioButtons = { // top-level copyright status choice 'FreeOrNonFree' : ['OptionFree','OptionNonFree','OptionNoGood'], // main subsections under OptionFree 'FreeOptions' : ['OptionOwnWork', 'OptionThirdParty', 'OptionFreeWebsite', 'OptionPDOld', 'OptionPDOther'], // main subsections under OptionNonFree 'NonFreeOptions': ['OptionNFSubject','OptionNF3D','OptionNFExcerpt', 'OptionNFCover','OptionNFLogo','OptionNFPortrait', 'OptionNFMisc'], // response options inside warningFileExists 'FileExistsOptions': ['NoOverwrite','OverwriteSame','OverwriteDifferent'], // choice of evidence in OptionThirdParty subsection 'ThirdPartyEvidenceOptions' : ['ThirdPartyEvidenceOptionLink', 'ThirdPartyEvidenceOptionOTRS', 'ThirdPartyEvidenceOptionOTRSForthcoming', 'ThirdPartyEvidenceOptionNone'], // choice of PD status in OptionPDOld subsection 'PDOldOptions' : ['PDUS1923','PDURAA','PDFormality','PDOldOther'], // choice of PD status in OptionPDOther subsection 'PDOtherOptions': ['PDOtherUSGov','PDOtherOfficial','PDOtherSimple', 'PDOtherOther'], // whether target article is wholly or only partly dedicated to discussing non-free work: 'NFSubjectCheck': ['NFSubjectCheckDedicated','NFSubjectCheckDiscussed'], 'NF3DCheck' : ['NF3DCheckDedicated','NF3DCheckDiscussed'], // choice about copyright status of photograph in OptionNF3D 'NF3DOptions' : ['NF3DOptionFree','NF3DOptionSame'] }; for (var group in optionRadioButtons) { var op = optionRadioButtons[group]; for (i=0; i<op.length; i++) { fuwMakeRadiobutton(group, op[i]); } } this.ScriptForm.NoOverwrite.checked = true; // input fields that trigger special // onchange() event handlers for validation: fuwMakeTextfield('InputName', fuwValidateFilename); fuwMakeTextfield('NFArticle', fuwValidateNFArticle); // names of input fields that trigger normal // validation event handler var activeTextfields = [ 'Artist3D','Country3D', 'Date','OwnWorkCreation','OwnWorkPublication', 'Author','Source', 'Permission','ThirdPartyOtherLicense', 'ThirdPartyEvidenceLink','ThirdPartyOTRSTicket', 'FreeWebsiteOtherLicense', 'PDOldAuthorLifetime','Publication', 'PDOldCountry','PDOldPermission', 'PDOfficialPermission','PDOtherPermission', 'NFSubjectPurpose', 'NF3DOrigDate', 'NF3DPurpose', 'NF3DCreator', 'NFPortraitDeceased', 'EditSummary' ]; for (i=0; i<activeTextfields.length; i++) { fuwMakeTextfield(activeTextfields[i]); } // names of multiline textareas var activeTextareas = [ 'InputDesc','NF3DPermission', 'NFCommercial','NFPurpose','NFReplaceableText', 'NFReplaceable','NFCommercial','NFMinimality','AnyOther' ]; for (i=0; i<activeTextareas.length; i++) { fuwMakeTextarea(activeTextareas[i]); }; var checkboxes = [ 'NFCoverCheckDedicated','NFLogoCheckDedicated','NFPortraitCheckDedicated' ]; for (i=0; i<checkboxes.length; i++) { fuwMakeCheckbox(checkboxes[i]); }; var licenseLists = { 'OwnWorkLicense' : // array structure as expected for input to fuwMakeSelection() function. // any entry that is a two-element array will be turned into an option // (first element is the value, second element is the display string). // Entries that are one-element arrays will be the label of an option group. // Zero-element arrays mark the end of an option group. [ ['Allow all use as long as others credit you and share it under similar conditions'], ['self|GFDL|cc-by-sa-4.0|migration=redundant', 'Creative Commons Attribution-Share Alike 4.0 + GFDL (recommended)', true], ['self|cc-by-sa-4.0', 'Creative Commons Attribution-Share Alike 4.0'], [], ['Allow all use as long as others credit you'], ['self|cc-by-4.0', 'Creative Commons Attribution 4.0'], [], ['Reserve no rights'], ['cc-zero', 'CC-zero Universal Public Domain Dedication'], [] ], 'ThirdPartyLicense' : [ ['', 'please select the correct license...'], ['Freely licensed:'], ['cc-by-sa-4.0', 'Creative Commons Attribution-Share Alike (cc-by-sa-4.0)'], ['cc-by-4.0', 'Creative Commons Attribution (cc-by-4.0)'], ['GFDL', 'GNU Free Documentation License (GFDL)'], [], ['No rights reserved:'], ['PD-author', 'Public domain'], [], ['Other (see below)'], [] ], 'FreeWebsiteLicense' : [ ['', 'please select the correct license...'], ['Freely licensed:'], ['cc-by-sa-4.0', 'Creative Commons Attribution-Share Alike (cc-by-sa-4.0)'], ['cc-by-4.0', 'Creative Commons Attribution (cc-by-4.0)'], ['GFDL', 'GNU Free Documentation License (GFDL)'], [], ['No rights reserved:'], ['PD-author', 'Public domain'], [], ['Other (see below)'], [] ], 'USGovLicense' : [ ['PD-USGov', 'US Federal Government'], ['PD-USGov-NASA','NASA'], ['PD-USGov-Military-Navy','US Navy'], ['PD-USGov-NOAA','US National Oceanic and Atmospheric Administration'], ['PD-USGov-Military-Air_Force','US Air Force'], ['PD-USGov-Military-Army','US Army'], ['PD-USGov-CIA-WF','CIA World Factbook'], ['PD-USGov-USGS','United States Geological Survey'] ], 'IneligibleLicense' : [ ['', 'please select one...'], ['PD-shape','Item consists solely of simple geometric shapes'], ['PD-text','Item consists solely of a few individual words or letters'], ['PD-textlogo','Logo or similar item consisting solely of letters and simple geometric shapes'], ['PD-chem','Chemical structural formula'], ['PD-ineligible','Other kind of item that contains no original authorship'] ], 'NFSubjectLicense' : [ ['', 'please select one...'], ['Non-free 2D art', '2-dimensional artwork (painting, drawing etc.)'], ['Non-free historic image', 'Unique historic photograph'], ['Non-free fair use in', 'something else (please describe in description field on top)'] ], 'NF3DLicense' : [ ['', 'please select one...'], ['Non-free architectural work', 'Architectural work'], ['Non-free 3D art', 'Other 3-dimensional creative work (sculpture etc.)'] ], 'NFCoverLicense' : [ ['', 'please select one...'], ['Non-free book cover', 'Cover page of a book'], ['Non-free album cover', 'Cover of a sound recording (album, single, song, CD)'], ['Non-free game cover', 'Cover of a video/computer game'], ['Non-free magazine cover', 'Cover page of a magazine'], ['Non-free video cover', 'Cover of a video'], ['Non-free software cover', 'Cover of a software product'], ['Non-free product cover', 'Cover of some commercial product'], ['Non-free title-card', 'Title screen of a TV programme'], ['Non-free movie poster', 'Movie poster'], ['Non-free poster', 'Official poster of an event'], ['Non-free fair use in', 'something else (please describe in description field on top)'] ], 'NFExcerptLicense' : [ ['', 'please select one...'], ['Non-free television screenshot', 'Television screenshot'], ['Non-free film screenshot', 'Movie screenshot'], ['Non-free game screenshot', 'Game screenshot'], ['Non-free video screenshot', 'Video screenshot'], ['Non-free music video screenshot', 'Music video screenshot'], ['Non-free software screenshot', 'Software screenshot'], ['Non-free web screenshot', 'Website screenshot'], ['Non-free speech', 'Audio excerpt from a speech'], ['Non-free audio sample', 'Sound sample of an audio recording'], ['Non-free video sample', 'Sample extract from a video'], ['Non-free sheet music', 'Sheet music representing a musical piece'], ['Non-free comic', 'Panel from a comic, graphic novel, manga etc.'], ['Non-free computer icon', 'Computer icon'], ['Non-free newspaper image', 'Page from a newspaper'], ['Non-free fair use in', 'something else (please describe in description field on top)'] ], 'NFLogoLicense' : [ ['Non-free logo', 'Logo of a company, organization etc.'], ['Non-free seal', 'Official seal, coat of arms etc'], ['Non-free symbol', 'Other official symbol'] ], 'NFMiscLicense' : [ ['Non-free fair use in', 'something else (please describe in description field on top)'], ['Non-free historic image', 'Historic photograph'], ['Non-free 2D art', '2-dimensional artwork (painting, drawing etc.)'], ['Non-free currency', 'Depiction of currency (banknotes, coins etc.)'], ['Non-free architectural work', 'Architectural work'], ['Non-free 3D art', 'Other 3-dimensional creative work (sculpture etc.)'], ['Non-free book cover', 'Cover page of a book'], ['Non-free album cover', 'Cover of a sound recording(album, single, song, CD)'], ['Non-free game cover', 'Cover of a video/computer game'], ['Non-free magazine cover', 'Cover page of a magazine'], ['Non-free video cover', 'Cover of a video'], ['Non-free software cover', 'Cover of a software product'], ['Non-free product cover', 'Cover of some commercial product'], ['Non-free title-card', 'Title screen of a TV programme'], ['Non-free movie poster', 'Movie poster'], ['Non-free poster', 'Official poster of an event'], ['Non-free television screenshot', 'Television screenshot'], ['Non-free film screenshot', 'Movie screenshot'], ['Non-free game screenshot', 'Game screenshot'], ['Non-free video screenshot', 'Video screenshot'], ['Non-free music video screenshot', 'Music video screenshot'], ['Non-free software screenshot', 'Software screenshot'], ['Non-free web screenshot', 'Website screenshot'], ['Non-free speech', 'Audio excerpt from a speech'], ['Non-free audio sample', 'Sound sample of an audio recording'], ['Non-free video sample', 'Sample extract from a video'], ['Non-free sheet music', 'Sheet music representing a musical piece'], ['Non-free comic', 'Panel from a comic, graphic novel, manga etc.'], ['Non-free computer icon', 'Computer icon'], ['Non-free newspaper image', 'Page from a newspaper'], ['Non-free logo', 'Logo of a company, organization etc.'], ['Non-free seal', 'Official seal, coat of arms etc'], ['Non-free symbol', 'Other official symbol'], ['Non-free sports uniform', 'Sports uniform'], ['Non-free stamp', 'Stamp'] ], 'NFExtraLicense' : [ ['', 'none'], ['Crown copyright and other governmental sources'], ['Non-free Crown copyright', 'UK Crown Copyright'], ['Non-free New Zealand Crown Copyright', 'NZ Crown Copyright'], ['Non-free Canadian Crown Copyright', 'Canadian Crown Copyright'], ['Non-free AUSPIC', 'AUSPIC (Australian Parliament image database)'], ['Non-free Philippines government', 'Philippines government'], ['Non-free Finnish Defence Forces', 'Finnish Defence Forces'], [], ['Other individual sources'], ['Non-free Denver Public Library image', 'Denver Public Library'], ['Non-free ESA media', 'ESA (European Space Agency)'], [], ['Possibly public domain in other countries'], ['Non-free Old-50', 'Author died more than 50 years ago.'], ['Non-free Old-70', 'Author died more than 70 years ago.'], [], ['Some permissions granted, but not completely free'], ['Non-free promotional', 'From promotional press kit'], ['Non-free with NC', 'Permission granted, but only for educational and/or non-commercial purposes'], ['Non-free with ND', 'Permission granted, but no derivative works allowed'], ['Non-free with permission', 'Permission granted, but only for Wikipedia'], [] ] }; for (var group in licenseLists) { fuwMakeSelection(group, licenseLists[group]); } this.knownCommonsLicenses = { 'self|GFDL|cc-by-sa-all|migration=redundant' : 1, 'self|Cc-zero' : 1, 'PD-self' : 1, 'self|GFDL|cc-by-sa-4.0|migration=redundant' : 1, 'self|GFDL|cc-by-4.0|migration=redundant' : 1, 'self|GFDL|cc-by-sa-3.0|migration=redundant' : 1, 'self|GFDL|cc-by-3.0|migration=redundant' : 1, 'self|cc-by-sa-4.0' : 1, 'self|cc-by-sa-3.0' : 1, 'cc-by-sa-4.0' : 1, 'cc-by-sa-3.0' : 1, 'cc-by-sa-2.5' : 1, 'cc-by-4.0' : 1, 'cc-by-3.0' : 1, 'cc-by-2.5' : 1, 'FAL' : 1, 'PD-old-100' : 1, 'PD-old' : 1, 'PD-Art' : 1, 'PD-US' : 1, 'PD-USGov' : 1, 'PD-USGov-NASA' : 1, 'PD-USGov-Military-Navy' : 1, 'PD-ineligible' : 1, 'Attribution' : 1, 'Copyrighted free use' : 1 }; // textfields that don't react directly // to user input and are used only for assembling stuff: if (fuwTesting) { fuwMakeTextfield('SandboxSummary', function(){void(0);}); fuwMakeTextarea('SandboxText', function(){void(0);}); fuwGet('SandboxSummary').disabled="disabled"; fuwGet('SandboxText').disabled="disabled"; fuwGet('SandboxText').rows = 12; } // set links to "_blank" target, so we don't accidentally leave the page, // because on some browsers that would destroy all the input the user has already entered $('.fuwOutLink a').each(function() { this.target = '_blank'; }); // make main area visible fuwSetVisible('UploadScriptArea', true); } // ====================================== // end of fuwGlobal constructor function // ====================================== function fuwRadioClick(e) { var ev = e || event; var src = ev.target || ev.srcElement; //alert('onclick event from ' + src + ' (' + src.value + ')'); fuwUpdateOptions(); return true; } /* * ============================================================= * function fuwUpdateOptions * ============================================================= * This is the onchange event handler for most of the input * elements in the main form. It changes visibility and disabled * status for the various sections of the input form in response * to which options are chosen. */ function fuwUpdateOptions() { var fuw = window.fuw; var warn = fuw.warn; var opts = fuw.opts = { }; opts.InputFilename = $('#TargetForm input#file').val(); var widgets = fuw.ScriptForm.elements; for (i = 0; i < widgets.length; i++) { var w = widgets[i]; if (w.type == "radio") { var nm = w.name; var id = w.id; var vl = w.checked && !w.disabled && fuwIsVisible(w); opts[id] = vl; if (vl) opts[nm] = id; } else { var id = w.id; var active = !w.disabled && fuwIsVisible(w); if (active) { var value = ((type == 'checkbox') ? w.checked : w.value); opts[id] = value; } } }; opts.MainOption = opts.FreeOptions || opts.NonFreeOptions; // some parts of the input form are re-used across sections // and must be moved into the currently active input section: // minimality section is shared between all NF sections fuwMove('NFMinimalitySection', 'detailsNFSubject', (opts.OptionNFSubject)) || fuwMove('NFMinimalitySection', 'detailsNF3D', (opts.OptionNF3D)) || fuwMove('NFMinimalitySection', 'detailsNFExcerpt', (opts.OptionNFExcerpt)) || fuwMove('NFMinimalitySection', 'detailsNFCover', (opts.OptionNFCover)) || fuwMove('NFMinimalitySection', 'detailsNFLogo', (opts.OptionNFLogo)) || fuwMove('NFMinimalitySection', 'detailsNFPortrait', (opts.OptionNFPortrait)) || fuwMove('NFMinimalitySection', 'detailsNFMisc', true); // AnyOtherInfo section is shared between all fuwMove('AnyOtherInfo', 'detailsOwnWork', opts.OptionOwnWork) || fuwMove('AnyOtherInfo', 'detailsThirdParty', opts.OptionThirdParty) || fuwMove('AnyOtherInfo', 'detailsFreeWebsite', opts.OptionFreeWebsite) || fuwMove('AnyOtherInfo', 'detailsPDOld', opts.OptionPDOld) || fuwMove('AnyOtherInfo', 'detailsPDOther', opts.OptionPDOther) || fuwMove('AnyOtherInfo', 'detailsNFSubject', opts.OptionNFSubject) || fuwMove('AnyOtherInfo', 'detailsNF3D', opts.OptionNF3D) || fuwMove('AnyOtherInfo', 'detailsNFExcerpt', opts.OptionNFExcerpt) || fuwMove('AnyOtherInfo', 'detailsNFCover', opts.OptionNFCover) || fuwMove('AnyOtherInfo', 'detailsNFLogo', opts.OptionNFLogo) || fuwMove('AnyOtherInfo', 'detailsNFPortrait', opts.OptionNFPortrait) || fuwMove('AnyOtherInfo', 'detailsNFMisc', opts.OptionNFMisc); // author input field is shared between all sections except "Own Work". // (will serve for the immediate/photographic author, in those cases where there // are two author fields) fuwMove('Author', 'placeholderFreeWebsiteAuthor', (opts.OptionFreeWebsite)) || fuwMove('Author', 'placeholderPDOldAuthor', (opts.OptionPDOld)) || fuwMove('Author', 'placeholderPDOtherAuthor', (opts.OptionPDOther)) || fuwMove('Author', 'placeholderNFSubjectAuthor', (opts.OptionNFSubject)) || fuwMove('Author', 'placeholderNF3DAuthor', (opts.OptionNF3D)) || fuwMove('Author', 'placeholderNFExcerptAuthor', (opts.OptionNFExcerpt)) || fuwMove('Author', 'placeholderNFCoverAuthor', (opts.OptionNFCover)) || fuwMove('Author', 'placeholderNFPortraitAuthor', (opts.OptionNFPortrait)) || fuwMove('Author', 'placeholderNFMiscAuthor', (opts.OptionNFMisc)) || fuwMove('Author', 'placeholderAuthor', true); // source input field is shared between all sections except "Own Work". // (will serve for immediate/web source, in those cases where there are two // source fields involved) fuwMove('Source', 'placeholderFreeWebsiteSource', (opts.OptionFreeWebsite)) || fuwMove('Source', 'placeholderPDOldSource', (opts.OptionPDOld)) || fuwMove('Source', 'placeholderPDOtherSource', (opts.OptionPDOther)) || fuwMove('Source', 'placeholderNFSubjectSource', (opts.OptionNFSubject)) || fuwMove('Source', 'placeholderNF3DSource', (opts.OptionNF3D)) || fuwMove('Source', 'placeholderNFExcerptSource', (opts.OptionNFExcerpt)) || fuwMove('Source', 'placeholderNFCoverSource', (opts.OptionNFCover)) || fuwMove('Source', 'placeholderNFLogoSource', (opts.OptionNFLogo)) || fuwMove('Source', 'placeholderNFPortraitSource', (opts.OptionNFPortrait)) || fuwMove('Source', 'placeholderNFMiscSource', (opts.OptionNFMisc)) || fuwMove('Source', 'placeholderSource', true); // date input field is shared between all sections except "Logo", which doesn't need it. // will serve for derived/photographic date in the case of 3D items fuwMove('Date', 'placeholderFreeWebsiteDate', (opts.OptionFreeWebsite)) || fuwMove('Date', 'placeholderThirdPartyDate', (opts.OptionThirdParty)) || fuwMove('Date', 'placeholderPDOldDate', (opts.OptionPDOld)) || fuwMove('Date', 'placeholderPDOtherDate', (opts.OptionPDOther)) || fuwMove('Date', 'placeholderNFSubjectDate', (opts.OptionNFSubject)) || fuwMove('Date', 'placeholderNF3DDate', (opts.OptionNF3D)) || fuwMove('Date', 'placeholderNFExcerptDate', (opts.OptionNFExcerpt)) || fuwMove('Date', 'placeholderNFCoverDate', (opts.OptionNFCover)) || fuwMove('Date', 'placeholderNFPortraitDate', (opts.OptionNFPortrait)) || fuwMove('Date', 'placeholderNFMiscDate', (opts.OptionNFMisc)) || fuwMove('Date', 'placeholderDate', true); // permission field is shared between ThirdParty and FreeWebsite sections fuwMove('Permission', 'placeholderFreeWebsitePermission', (opts.OptionFreeWebsite)) || fuwMove('Permission', 'placeholderPermission', true); // publication field is shared between PDOld, NFPortrait and NFMisc fuwMove('Publication', 'placeholderNFPortraitPublication', (opts.OptionNFPortrait)) || fuwMove('Publication', 'placeholderNFMiscPublication', (opts.OptionNFMisc)) || fuwMove('Publication', 'placeholderPublication', true); // Purpose, Commercial, Replaceable and ReplaceableText FUR fields are shared // between some but not all of the non-free sections fuwMove('NFPurpose', 'placeholderNFExcerptPurpose', (opts.OptionNFExcerpt)) || fuwMove('NFPurpose', 'placeholderNFPurpose'); fuwMove('NFCommercial', 'placeholderNFPortraitCommercial', (opts.OptionNFPortrait)) || fuwMove('NFCommercial', 'placeholderNFCommercial'); fuwMove('NFReplaceable', 'placeholderNFPortraitReplaceable', (opts.OptionNFPortrait)) || fuwMove('NFReplaceable', 'placeholderNFReplaceable'); fuwMove('NFReplaceableText', 'placeholderNFExcerptReplaceable', (opts.OptionNFExcerpt)) || fuwMove('NFReplaceableText', 'placeholderNFReplaceableText', true); // submit button goes to Step1 if user has chosen a plain overwrite of an existing file, // and to the active section of Step3 if otherwise fuwMove('fuwSubmit', 'UploadScriptStep1', (warn.ImageExists && opts.OverwriteSame)) || fuwMove('fuwSubmit', 'detailsOwnWork', opts.OptionOwnWork) || fuwMove('fuwSubmit', 'detailsThirdParty', opts.OptionThirdParty) || fuwMove('fuwSubmit', 'detailsFreeWebsite', opts.OptionFreeWebsite) || fuwMove('fuwSubmit', 'detailsPDOld', opts.OptionPDOld) || fuwMove('fuwSubmit', 'detailsPDOther', opts.OptionPDOther) || fuwMove('fuwSubmit', 'detailsNFSubject', opts.OptionNFSubject) || fuwMove('fuwSubmit', 'detailsNF3D', opts.OptionNF3D) || fuwMove('fuwSubmit', 'detailsNFExcerpt', opts.OptionNFExcerpt) || fuwMove('fuwSubmit', 'detailsNFCover', opts.OptionNFCover) || fuwMove('fuwSubmit', 'detailsNFLogo', opts.OptionNFLogo) || fuwMove('fuwSubmit', 'detailsNFPortrait', opts.OptionNFPortrait) || fuwMove('fuwSubmit', 'fuwSubmitHost', true); // Show and hide warnings: // filename-related warnings: fuwSetVisible('warningIllegalChars', warn.IllegalChars); fuwSetVisible('warningBadFilename', warn.BadFilename); fuwSetVisible('warningImageOnCommons', warn.ImageOnCommons); fuwSetVisible('warningImageExists', warn.ImageExists); fuwMove('warningImageThumb', 'warningImageOnCommons', warn.ImageOnCommons, true) || fuwMove('warningImageThumb', 'warningImageExists', true, true); // notices related to the top-level options: fuwSetVisible('warningWhyNotCommons', opts.OptionFree); fuwSetVisible('warningNF', opts.OptionNonFree); fuwSetVisible('warningNoGood', opts.OptionNoGood); // warnings related to non-free "used in" article fuwSetVisible('warningNFArticleNotFound', warn.NFArticleNotFound); fuwSetVisible('warningNFArticleNotMainspace', warn.NFArticleNotMainspace); fuwSetVisible('warningUserspaceDraft', warn.UserspaceDraft); fuwSetVisible('warningNFArticleDab', warn.NFArticleDab); fuwSetVisible('NFArticleOK', warn.NFArticleOK); // warnings depending on user status: if (fuw.userStatus.match(/problem|newbie|notAutoconfirmed/)) { fuwSetVisible('warningFreeWebsite', opts.OptionFreeWebsite); fuwSetVisible('warningOwnWork', opts.OptionOwnWork); fuwSetVisible('warningPDOther', opts.OptionPDOther); fuwSetVisible('warningNFSubject', opts.OptionNFSubject); }
Jefino9488
This project implements an AI chatbot that can converse with users, generate images based on prompts, and extract text from PDF files to use as context for chat interactions. It uses the Gemini models for generating responses and the Monster API for image generation.
FreeDurok
OCRacle is a modular Python tool that recursively scans directories, extracts text from PDF and image files (native PDF text and OCR), and searches for keywords or regex patterns.
sheicky
An intelligent chat interface (Google's Gemini AI flash 2.0 API) that goes beyond simple text responses. This application is similar to perplexity.ai; and can analyze , extract information from various sources including YouTube videos, PDFs, CSV files, images, and web pages.
KENDAXA-Development
Extracting text, images and annotations from pdf files.